How to configure static routing on two or more than two routers?


This article is all about static routing. In this article we learn how to configure static routing on router. Static routing is very secure routing from all other routing like rip routing, ospf routing, eigrp routing, and dynamic routing. the main benefits of this routing is it is more secure then others. static routing is easy to configure in small network. Now i will show you how to configure static routing on router by a lab example.

static routing
configure static routing on router

First of all go to router   R1 and type given below code step by step

— System Configuration Dialog —

Continue with configuration dialog? [yes/no]: n

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R1

R1(config)#

R1(config)#interface FastEthernet0/0

R1(config-if)#ip address 1.0.0.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R1(config-if)#exit

R1(config)#interface FastEthernet0/1

R1(config-if)#ip address 2.0.0.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

R1(config-if)#exit

R1(config)#

by using these codes port of router 1 will be up and ip assigned on the interfaces of the routers.

Now go to second router R2 and configure it by using given below code

— System Configuration Dialog —

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R2

R2(config)#

R2(config)#interface FastEthernet0/0

R2(config-if)#ip address 2.0.0.2 255.0.0.0

R2(config-if)#no shutdown

R2(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R2(config-if)#exit

R2(config)#interface FastEthernet0/1

R2(config-if)#ip address 3.0.0.1 255.0.0.0

R2(config-if)#no shutdown

R2(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R2(config-if)#exit

R2(config)#

here your all ports will be up and ip assigned at all interfaces of routers

now assign ip on all pc you ave taken in this lab by ip configuration and check they are communicate each other or not. surely they are not communicated each other because they are in different networks.

Now to communicate pc from each other we are configure static routing on each router

To configure static routing on router type given below codes

For router R1 type

R1(config)#ip route 3.0.0.0 255.0.0.0 2.0.0.2

For router R2 we type

R2(config)#ip route 1.0.0.0 255.0.0.0 2.0.0.1

Now your static routing will be configured on each router to check this go to any pc and check they are communicate or not by command prompt

like i am taking pc0 with ip address 1.0.0.2 and ping with ip 3.0.0.2 result will be given below

PC>ping 3.0.0.2

Pinging 3.0.0.2 with 32 bytes of data:

Reply from 3.0.0.2: bytes=32 time=1ms TTL=126

Reply from 3.0.0.2: bytes=32 time=1ms TTL=126

Reply from 3.0.0.2: bytes=32 time=1ms TTL=126

Reply from 3.0.0.2: bytes=32 time=1ms TTL=126

Ping statistics for 3.0.0.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 1ms, Maximum = 1ms, Average = 1ms

if you have this type of result your static routing will be configured perfectly on each router and your pc will be communicate each other perfectly in different type of networks.

If you have any type of queries and doubt comment below and contact us. I will be here for helping you.

If you want to know more knowledge about static routing read this article. How to configured static routing on 4 routers

One thought on “How to configure static routing on two or more than two routers?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s