You are on page 1of 6

Static Routing Configuration:

Topology:

Add 4 PCs, 2 Switches (2960) and 2 Routers (1941) to the workplace.

Cabling:

Select copper straight through to connect PC s to the Switches.

PCs Interfaces Switch0 Interfaces


PC0 (FastEthernet0) Fast Ethernet 0/1
PC1 (FastEthernet0) Fast Ethernet 0/2

PCs Interfaces Switch1 Interfaces


PC 2 (FastEthernet0) Fast Ethernet 0/1
PC 3(FastEthernet0) Fast Ethernet 0/2

Select copper straight through to connect Switches to the Routers.


Select Fast Ethernet 0/3 of the Switch 0 connect to Gigabit Ethernet 0/0
of Router 0
Select Fast Ethernet 0/3 of the Switch 1 connect to Gigabit Ethernet 0/0
of Router 1
Select cross-over to connect Router 0 to Router 1.
Select Gigabit Ethernet 0/1 of the Router 0 connect to Gigabit Ethernet
0/1 of Router1

PCs IP address:

PC0: PC2:
IP Address: 192.168.1.1 IP Address: 192.168.2.1
Subnet mask: 255.255.255.0 Subnet mask: 255.255.255.0
Default Gateway: 192.168.1.3 Default Gateway: 192.168.2.3

PC1: PC3:
IP Address: 192.168.1.2 IP Address: 192.168.2.2
Subnet mask: 255.255.255.0 Subnet mask: 255.255.255.0
Default Gateway: 192.168.1.3 Default Gateway: 192.168.2.3

Router 0 Configuration (Assigning IP addresses):

First assign IP addresses to the interfaces Gigabit Ethernet 0/0 and Gigabit
Ethernet 0/1 of Router 0 from CLI. (All coding is done at the
Configuration mode).

Gigabit Ethernet 0/0

Router>enable

Router# conf t

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

Router(config)# interface g0/0

Router(config-if)# ip address 192.168.1.3 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit
Gigabit Ethernet 0/1
Router(config)#interface g0/1
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit

Router 1 Configuration (Assigning IP addresses):


Assign IP addresses to the interfaces Gigabit Ethernet 0/0 and Gigabit
Ethernet 0/1 of Router 1 from CLI.

Gigabit Ethernet 0/0


Router>enable
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface g0/0
Router(config-if)#ip address 192.168.2.3 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to
up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/0, changed state to up
Router(config-if)#exit

Gigabit Ethernet 0/1


Router(config)#interface g0/1
Router(config-if)#ip address 192.168.3.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to
up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/1, changed state to up
Router(config-if)#exit

Note: Please try to ping from PC 0 to PC 2 and from PC 2 to PC 0 before


enabling static routing
From PC 0 open Command Prompt and (ping 192.168.2.1) and wait for a
result (The result is time out).
From PC2 open Command Prompt and (ping 192.168.1.1) and wait for a
result (The result is time out).

- Now it is time to creating or enabling static routing at both Router 0 and


Router 1

Router 0:
Ensure That you are at the configuration mode.
If you are not at the configuration mode. You must first enter to the
configuration mode.
Router>enable
Router# conf t
Router(config)#ip route <Network Address ><Default Subnet Mask>
<Next Hope>
Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2
Router1:
Ensure That you are at the configuration mode.
If you are not at the configuration mode. You must first enter to the
configuration mode.
Router>enable
Router# conf t
Router(config)#ip route <Network Address ><Default Subnet Mask>
<Next Hope>
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
Displaying Routing Table:
Router>enable
Router# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks


C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.3/32 is directly connected, GigabitEthernet0/0
S 192.168.2.0/24 [1/0] via 192.168.3.2
192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.3.0/24 is directly connected, GigabitEthernet0/1
L 192.168.3.1/32 is directly connected, GigabitEthernet0/1

Test For Connectivity:

After enabling static routing at the both routers, we can now test for
connectivity of different networks, because before enabling static routing at
the routers PC s at the different networks cannot communicate or pinging is
time out. But after configure of static routing so the PCs at the different
networks can communicate and sending data successfully.
Pinging from PC 0 (192.168.1.1) which means that is Network
1(192.168.1.0) PC to the PC2(192.168.2.1) at the Network 2(192.168.2.0)

Pinging from PC2 (192.168.2.1) which means that is Network


1(192.168.2.0) PC to the PC0 (192.168.1.1) at the Network 2(192.168.1.0)

You might also like