2018
Static Routing
Configuration for
CCNA Students
By
Eng. Abeer Hosni
Lab1 (IPV4 static routing)
Objectives:
• Configure the network shown above so that PC1 can reach all other PCs in the
network using static routing.
• If you configure R1 to use its exit interface, figure out why this is not the
preferred way.
Configuration:
PC1> ip 10.0.0.100 255.255.255.0 10.0.0.1
PC2> ip 12.0.0.100 255.255.255.0 12.0.0.2
PC3> ip 12.0.0.101 255.255.255.0 12.0.0.2
PC4> ip 12.0.0.102 255.255.255.0 12.0.0.2
R1(config)#int f0/0
R1(config-if)#ip address 10.0.0.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#int f0/0
R1(config-if)#int f1/0
R1(config-if)#ip address 11.0.0.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#int f0/0
R2(config-if)#ip address 11.0.0.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int f1/0
R2(config-if)#ip address 12.0.0.2 255.255.255.0
R2(config-if)#no shutdown
The network is not yet pingable since we haven’t configured static routing yet.
PC1> ping 12.0.0.100
*10.0.0.1 icmp_seq=1 ttl=255 time=109.127 ms (ICMP type:3, code:1, Destination host unreachable)
*10.0.0.1 icmp_seq=2 ttl=255 time=10.226 ms (ICMP type:3, code:1, Destination host unreachable)
*10.0.0.1 icmp_seq=3 ttl=255 time=10.247 ms (ICMP type:3, code:1, Destination host unreachable)
*10.0.0.1 icmp_seq=4 ttl=255 time=11.181 ms (ICMP type:3, code:1, Destination host unreachable)
*10.0.0.1 icmp_seq=5 ttl=255 time=9.350 ms (ICMP type:3, code:1, Destination host unreachable)
Since this is a broadcast network, in IPv4 it’s recommended to use next hop IP address instead of the
router exit interface.
R1(config)#ip route 12.0.0.0 255.255.255.0 11.0.0.2
The network is still not pingable since R2 doesn’t have a route back to the 10.0.0.0/24 network.
PC1> ping 12.0.0.100
12.0.0.100 icmp_seq=1 timeout 12.0.0.100
icmp_seq=2 timeout 12.0.0.100 icmp_seq=3
timeout 12.0.0.100 icmp_seq=4 timeout
12.0.0.100 icmp_seq=5 timeout
R2(config)#ip route 10.0.0.0 255.255.255.0 11.0.0.1 Now the
network should be pingable.
PC1> ping 12.0.0.100
12.0.0.100 icmp_seq=1 timeout
12.0.0.100 icmp_seq=2 timeout
84 bytes from 12.0.0.100 icmp_seq=3 ttl=62 time=44.190 ms
84 bytes from 12.0.0.100 icmp_seq=4 ttl=62 time=43.210 ms
84 bytes from 12.0.0.100 icmp_seq=5 ttl=62 time=32.269 ms
Verification:
R1#show ip route
<Output omitted>
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, FastEthernet0/0
L 10.0.0.1/32 is directly connected, FastEthernet0/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.0.0.0/24 is directly connected, FastEthernet1/0
L 11.0.0.1/32 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
S 12.0.0.0 [1/0] via 11.0.0.2
R2#show ip route
<Output omitted>
10.0.0.0/24 is subnetted, 1 subnets
S 10.0.0.0 [1/0] via 11.0.0.1
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.0.0.0/24 is directly connected, FastEthernet0/0
L 11.0.0.2/32 is directly connected, FastEthernet0/0
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0.0/24 is directly connected, FastEthernet1/0
L 12.0.0.2/32 is directly connected, FastEthernet1/0
After pinging PC2, PC3 and PC4:
R1#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.0.0.1 - ca01.0200.0000 ARPA FastEthernet0/0
Internet 10.0.0.100 1 0050.7966.6800 ARPA FastEthernet0/0
Internet 11.0.0.1 - ca01.0200.001c ARPA FastEthernet1/0
Internet 11.0.0.2 7 ca02.0718.0000 ARPA FastEthernet1/0
If we configure R1 to use its exit interface instead of next hop IP address:
R1(config)#no ip route 12.0.0.0 255.255.255.0 11.0.0.2
R1(config)#ip route 12.0.0.0 255.255.255.0 f1/0
After pinging PC2, PC3 and PC4:
R1#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.0.0.1 - ca01.0200.0000 ARPA FastEthernet0/0
Internet 10.0.0.100 0 0050.7966.6800 ARPA FastEthernet0/0
Internet 11.0.0.1 - ca01.0200.001c ARPA FastEthernet1/0
Internet 11.0.0.2 46 ca02.0718.0000 ARPA FastEthernet1/0
Internet 12.0.0.100 0 ca02.0718.0000 ARPA FastEthernet1/0
Internet 12.0.0.101 0 ca02.0718.0000 ARPA FastEthernet1/0 Internet
12.0.0.102 0 ca02.0718.0000 ARPA FastEthernet1/0
R1 will ARP for each destination IP we want to reach using the next hop MAC address.
R2#show ip int f0/0 | include Proxy
Proxy ARP is enabled
Local Proxy ARP is disabled
That’s why it’s recommended in IPV4 broadcast networks to use next hop IP address to not increase
the size of the ARP cache table.
Lab2 (IPV4 Default Route)
Objective:
Add loopback interfaces to R2, and then configure R1 to reach those interfaces in only one step.
Configuration:
R2(config)#int loopback 0
R2(config-if)#ip address 13.0.0.2 255.255.255.0
R2(config-if)#int loopback 1
R2(config-if)#ip address 14.0.0.2 255.255.255.0
R2(config-if)#int loopback 2
R2(config-if)#ip address 15.0.0.2 255.255.255.0
R1(config)#ip route 0.0.0.0 0.0.0.0 11.0.0.2
Verification:
R1#show ip route
<Output omitted>
Gateway of last resort is 11.0.0.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 11.0.0.2
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, FastEthernet0/0
L 10.0.0.1/32 is directly connected, FastEthernet0/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.0.0.0/24 is directly connected, FastEthernet1/0
L 11.0.0.1/32 is directly connected, FastEthernet1/0
12.0.0.0/24 is subnetted, 1 subnets
S 12.0.0.0 [1/0] via 11.0.0.2
R2#show ip route
<Output omitted>
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
S 10.0.0.0 [1/0] via 11.0.0.1
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.0.0.0/24 is directly connected, FastEthernet0/0
L 11.0.0.2/32 is directly connected, FastEthernet0/0
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.0.0.0/24 is directly connected, FastEthernet1/0
L 12.0.0.2/32 is directly connected, FastEthernet1/0
13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 13.0.0.0/24 is directly connected, Loopback0
L 13.0.0.2/32 is directly connected, Loopback0
14.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 14.0.0.0/24 is directly connected, Loopback1
L 14.0.0.2/32 is directly connected, Loopback1
15.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 15.0.0.0/24 is directly connected, Loopback2
L 15.0.0.2/32 is directly connected, Loopback2
PC1> ping 13.0.0.2
84 bytes from 13.0.0.2 icmp_seq=1 ttl=254 time=62.372 ms
84 bytes from 13.0.0.2 icmp_seq=2 ttl=254 time=32.335 ms
84 bytes from 13.0.0.2 icmp_seq=3 ttl=254 time=22.299 ms
84 bytes from 13.0.0.2 icmp_seq=4 ttl=254 time=24.343 ms
84 bytes from 13.0.0.2 icmp_seq=5 ttl=254 time=32.313 ms
Lab3 (IPV4 Static Routing)
Objectives:
Configure this network using static and default routes to be a pingable one.
Configuration:
R1(config)#int f0/0
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#int loopback 1
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R2(config)#int f1/0
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#int f0/0
R2(config-if)#ip address 11.0.0.1 255.255.255.252
R2(config-if)#no shutdown
R3(config)#int f1/0
R3(config-if)#ip address 11.0.0.2 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#int loopback 3
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2
R2(config)#ip route 0.0.0.0 0.0.0.0 11.0.0.2
R2(config)#ip route 1.1.1.1 255.255.255.255 10.0.0.1
R3(config)#ip route 1.1.1.1 255.255.255.255 11.0.0.1
R3(config)#ip route 10.0.0.0 255.255.255.252 11.0.0.1
Verification:
R1#show ip route static
<Output omitted>
S* 0.0.0.0/0 [1/0] via 10.0.0.2
R2#show ip route static
<Output omitted>
S* 0.0.0.0/0 [1/0] via 11.0.0.2
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 10.0.0.1
R3#show ip route static
<Output omitted>
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 11.0.0.1
10.0.0.0/30 is subnetted, 1 subnets
S 10.0.0.0 [1/0] via 11.0.0.1
R1#ping 3.3.3.3 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/49/120 ms
Lab4 (IPV4 Floating Static Route)
Objective:
Configure R1 to reach the 2.2.2.2/32 network using its f1/0 interface. If it is down, R1 should use its
f0/0 interface to reach the network until the f1/0 interface is up again. Use static route configuration
to accomplish that.
Configuration:
R1(config)#int f0/0
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#int f1/0
R1(config-if)#ip address 11.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#int loopback 1
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R2(config)#int f0/0
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#int f1/0
R2(config-if)#ip address 11.0.0.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#int loop 2
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R1(config)#ip route 2.2.2.2 255.255.255.255 10.0.0.2 5
R1(config)#ip route 2.2.2.2 255.255.255.255 11.0.0.2
R2(config)#ip route 1.1.1.1 255.255.255.255 10.0.0.1 5
R2(config)#ip route 1.1.1.1 255.255.255.255 11.0.0.1
Verification:
R1#show run | include ip route ip route
2.2.2.2 255.255.255.255 11.0.0.2 ip route
2.2.2.2 255.255.255.255 10.0.0.2 5
R1#show ip route 2.2.2.2
Routing entry for 2.2.2.2/32
Known via "static", distance 1, metric 0 Routing
Descriptor Blocks:
* 11.0.0.2
Route metric is 0, traffic share count is 1
R1#ping 2.2.2.2 source loopback 1 Type
escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/43/100 ms
R1(config)#int f1/0
R1(config-if)#shutdown
R1(config-if)#do show ip route 2.2.2.2
Routing entry for 2.2.2.2/32
Known via "static", distance 5, metric 0 Routing
Descriptor Blocks:
* 10.0.0.2
Route metric is 0, traffic share count is 1
R1(config-if)#no shutdown
Routing entry for 2.2.2.2/32
Known via "static", distance 1, metric 0 Routing
Descriptor Blocks:
* 11.0.0.2
Route metric is 0, traffic share count is 1
Hint:
The route back from R2 to R1 doesn’t have to be the same path that R1 takes to reach the
1.1.1.1/32 network.
Best Wishes
Abeer