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

CCNA

This article is all about static routing. In this article, we learn how to configure static routing on a router. Static routing is very secure routing from all another 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 a small network. Now I will show you how to configure static routing on a router by a lab example.

Also Read: Learn how to configure static routing on 4 routers?

static routing
configure static routing on the router

First of all, go to router R1 and type below-given 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 to 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 is assigned to 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 below-given 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 communicating 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 communicate each other perfectly in the different type of networks.

THAT’S IT

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

 

Your thoughts?

This site uses Akismet to reduce spam. Learn how your comment data is processed.