Figure 1.1
In this topology, I will use static route to connect the R1 and R2 networks. Static route can use the outgoing interface or next hop address, also can combine that two configure.
R1
ip route 192.168.2.0 255.255.255.128 10.1.13.3
ip route 192.168.2.128 255.255.255.128 10.1.13.3
R2
ip route 192.168.1.0 255.255.255.0 10.1.23.3
R3
ip route 192.168.1.0 255.255.255.0 10.1.13.1
ip route 192.168.2.0 255.255.255.0 f1/0
At R3 we can use summary route for 192.168.2.0/25 and 192.168.2.128/25.
R1#sh ip route
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.13.0 is directly connected, FastEthernet1/0
C 10.1.12.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback0
192.168.2.0/25 is subnetted, 2 subnets
S 192.168.2.0 [1/0] via 10.1.13.3
S 192.168.2.128 [1/0] via 10.1.13.3
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.13.0 is directly connected, FastEthernet1/0
C 10.1.12.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback0
192.168.2.0/25 is subnetted, 2 subnets
S 192.168.2.0 [1/0] via 10.1.13.3
S 192.168.2.128 [1/0] via 10.1.13.3
R1#ping 192.168.2.1 source lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/158/436 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/158/436 ms
R1#ping 192.168.2.129 source lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.129, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 76/92/100 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.129, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 76/92/100 ms
Ok it done. Let move on alternative route. As Figure 1.2 R1 and R2 connect directly but it is optional.
Figure 1.2
R1
ip route 192.168.2.0 255.255.255.0 10.1.12.2
R2
ip route 192.168.1.0 255.255.255.0 10.1.12.1
R1#sh ip route
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.13.0 is directly connected, FastEthernet1/0
C 10.1.12.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback0
192.168.2.0/24 is variably subnetted, 3 subnets, 2 masks
S 192.168.2.0/25 [1/0] via 10.1.13.3
S 192.168.2.0/24 [1/0] via 10.1.12.2
S 192.168.2.128/25 [1/0] via 10.1.13.3
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.13.0 is directly connected, FastEthernet1/0
C 10.1.12.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback0
192.168.2.0/24 is variably subnetted, 3 subnets, 2 masks
S 192.168.2.0/25 [1/0] via 10.1.13.3
S 192.168.2.0/24 [1/0] via 10.1.12.2
S 192.168.2.128/25 [1/0] via 10.1.13.3
Now we have two routing path for R1 and R2 networks. Let see what path is choose as a routed path.
No.1.S 192.168.2.0/25 [1/0] via 10.1.13.3
No.2.S 192.168.2.0/24 [1/0] via 10.1.12.2
No.2.S 192.168.2.0/24 [1/0] via 10.1.12.2
What do you think route path choose 1 or 2?
R1#traceroute 192.168.2.1 source 192.168.1.1
Type escape sequence to abort.
Tracing the route to 192.168.2.1
1 10.1.13.3 104 msec 64 msec 68 msec
2 10.1.23.2 244 msec 100 msec 64 msec
Tracing the route to 192.168.2.1
1 10.1.13.3 104 msec 64 msec 68 msec
2 10.1.23.2 244 msec 100 msec 64 msec
Because of best routing selection, No.1 is match with longest match rule. Network prefix is more detail than No.2.
Ok let move on Floating Static Route.
It appears in the routing table only preferred route failure. If R3 is down we want to use directly connected link between R1 and R2. In this cause we use static route with administrative distance.
R1
ip route 192.168.2.0 255.255.255.0 10.1.13.3
ip route 192.168.2.0 255.255.255.0 10.1.12.2 10
Verify the routing table before and after the link down.
Before
R1#sh ip route static
S 192.168.2.0/24 [1/0] via 10.1.13.3
S 192.168.2.0/24 [1/0] via 10.1.13.3
R1(config)#int f1/0
R1(config-if)#sh
R1(config-if)#sh
After
R1#sh ip route static
S 192.168.2.0/24 [10/0] via 10.1.12.2
S 192.168.2.0/24 [10/0] via 10.1.12.2
R1#trace 192.168.2.1 source 192.168.1.1
Type escape sequence to abort.
Tracing the route to 192.168.2.1
1 10.1.12.2 64 msec 64 msec 64 msec
Type escape sequence to abort.
Tracing the route to 192.168.2.1
1 10.1.12.2 64 msec 64 msec 64 msec
R1#ping 192.168.2.1 so lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
*Mar 1 00:46:18.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:18.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:20.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:20.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:22.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:22.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:24.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:24.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:26.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:26.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
Success rate is 0 percent (0/5)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
*Mar 1 00:46:18.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:18.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:20.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:20.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:22.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:22.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:24.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:24.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
*Mar 1 00:46:26.819: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:46:26.819: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending.
Success rate is 0 percent (0/5)
Ping is fail because of R2. R2 only know 192.168.1.0 network can reach from R3. We need to shut down the R2 interface connected with R3.
R2
int f1/0
sh
Testing again.
R1#ping 192.168.2.1 so lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/72 ms
R1#
*Mar 1 00:47:00.067: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.067: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.139: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.139: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.143: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.143: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.211: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.211: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.215: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.215: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.283: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.283: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.287: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.287: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.355: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.355: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.359: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.359: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.427: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.427: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/72 ms
R1#
*Mar 1 00:47:00.067: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.067: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.139: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.139: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.143: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.143: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.211: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.211: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.215: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.215: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.283: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.283: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.287: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.287: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.355: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.355: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
*Mar 1 00:47:00.359: IP: tableid=0, s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), routed via FIB
*Mar 1 00:47:00.359: IP: s=192.168.1.1 (local), d=192.168.2.1 (FastEthernet0/0), len 100, sending
*Mar 1 00:47:00.427: IP: tableid=0, s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1 (Loopback0), routed via RIB
*Mar 1 00:47:00.427: IP: s=192.168.2.1 (FastEthernet0/0), d=192.168.1.1, len 100, rcvd 4
Comments
Post a Comment