How to configure static routing on routers along with switches

CCNA

This article is all about how to configure static routing on Cisco routers along with switches. In the previous posts in CCNA we learn many of things about routers and routing but we never learn about how to configure routing on routers along with switches. In this tutorial, we take routers and switches to understand this routing concept in a simple way with ease. In this tutorial, we learn some tricky static routing. Generally, we use routers to connect two different networks and switches in the same network to provide a medium to communicate PCs with each other.

Here in this tutorial, we create a lab in which we mix routers and switches. After that configure static routing on routers to provide a medium to communicate between PCs which are in different networks and use switches to communicate PCs and routers in the same network. After reading this post you easily differentiate switches and routers and their work also. So let’s start here how to configure static routing on routers along with switches.

Also Read: How to configure CHAP {Challenge-Handshake Authentication Protocol} on Cisco routers

Now to understand this whole configuration we take a lab in cisco packet tracer. In this lab, we take four routers, four PCs, and one switch and configure static routing on routers. the arrangement of routers, PCs, and the switch is given below in the figure

static routing along with switches

Now, first of all, we assign IP address on all the interfaces of the routers and up all the interfaces using no shut command. After that, we configure static routing on Cisco routers and also assign an IP address to all the PCs and use the ping command to check whether they are communicating with each other or not.

Now first of all assign IP address on the interfaces of the routers using given below command

For router R1

Router>enable

Router#configure terminal

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

Router(config)#hostname R1

R1(config)#interface FastEthernet0/0

R1(config-if)#ip address 5.0.0.1 255.0.0.0

R1(config-if)#no shutdown

%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 1.0.0.1 255.0.0.0

R1(config-if)#no shutdown

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

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

R1(config-if)#exit

 

For router R2

Router>enable

Router#configure terminal

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

Router(config)#hostname R2

R2(config)#interface FastEthernet0/0

R2(config-if)#ip address 5.0.0.2 255.0.0.0

R2(config-if)#no shutdown

%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 2.0.0.1 255.0.0.0

R2(config-if)#no shutdown

%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

 

For router R3

Router>enable

Router#configure terminal

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

Router(config)#hostname R3

R3(config)#interface FastEthernet0/0

R3(config-if)#ip address 5.0.0.3 255.0.0.0

R3(config-if)#no shutdown

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

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

R3(config-if)#exit

R3(config)#interface FastEthernet0/1

R3(config-if)#ip address 3.0.0.1 255.0.0.0

R3(config-if)#no shutdown

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

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

R3(config-if)#exit

 

For router R4

Router>enable

Router#configure terminal

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

Router(config)#hostname R4

R4(config)#interface FastEthernet0/0

R4(config-if)#ip address 4.0.0.1 255.0.0.0

 

R4(config-if)#no shutdown

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

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

R4(config-if)#exit

R4(config)#interface FastEthernet0/1

R4(config-if)#ip address 5.0.0.4 255.0.0.0

R4(config-if)#no shutdown

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

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

R4(config-if)#exit

 

Now configure static routing on routers using given below command

For router R1

R1(config)#ip route 2.0.0.0 255.0.0.0 5.0.0.2

R1(config)#ip route 3.0.0.0 255.0.0.0 5.0.0.3

R1(config)#ip route 4.0.0.0 255.0.0.0 5.0.0.4

 

For router R2

R2(config)#ip route 1.0.0.0 255.0.0.0 5.0.0.1

R2(config)#ip route 3.0.0.0 255.0.0.0 5.0.0.3

R2(config)#ip route 4.0.0.0 255.0.0.0 5.0.0.4

 

For router R3

R3(config)#ip route 1.0.0.0 255.0.0.0 5.0.0.1

R3(config)#ip route 2.0.0.0 255.0.0.0 5.0.0.2

R3(config)#ip route 4.0.0.0 255.0.0.0 5.0.0.4

 

For router R4

R4(config)#ip route 1.0.0.0 255.0.0.0 5.0.0.1

R4(config)#ip route 2.0.0.0 255.0.0.0 5.0.0.2

R4(config)#ip route 3.0.0.0 255.0.0.0 5.0.0.3

THAT’S IT

Now assign the IP address to all the PCs and check whether they are communicating with each other or not using the ping command on your PCs. If you have any queries regarding this solved out through the comment section and also provide feedback because your feedback is valuable to us.

2 thoughts on “How to configure static routing on routers along with switches

  1. Hi. sir i made same lab as u explain. but i had an issue, when i gave a ip route ip route 1.0.0.0 255.0.0.0 5.0.0.1 command from R2, R3, R4. it was no showing or ping from other routers . but R1 ping all connected PCs.
    plz check and reply

    1. But these commands perfectly work on my PC. Please try again same procedure as given in the article.

Leave a Reply