Skip to main content

Static Route Lab 1

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

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

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

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

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


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

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

 R1(config)#int f1/0
R1(config-if)#sh

After
R1#sh ip route static
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


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)

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

Comments

Popular posts from this blog

Access-list at SVI

SVI (Switch Virtual Interfaces) We use the SVI for inter vlan routing. In this scenario I will configure the access list with SVI. In this scenario I want to permit vlan 10 network to vlan 50 Server farm. Vlan 10 and vlan 20 can communicate each other. First create vlan and then interface vlan#. Switch(config)#vlan 10 Switch(config)#interface vlan 10 Switch(config-if)#ip address 192.168.10.254 255.255.255.0 Switch(config)#vlan 20 Switch(config)#interface vlan 20 Switch(config-if)#ip address 192.168.20.254 255.255.255.0 Switch(config)#vlan 50 Switch(config)#interface vlan 50 Switch(config-if)#ip address 192.168.50.254 255.255.255.0 when we finish the vlan interface create make sure the switch port are belong to each vlan. Port to vlan assign configure is Switch(config)#interface g0/1 Switch(config-if)#switchport access vlan 10 Switch(config)#interface g0/2 Switch(config-if)#switchport access vlan 20 Switch(config)#int...

OSPF Stub

The following restrictions apply to stub areas:     You cannot create a virtual link through a stub area.   A stub area cannot contain an AS boundary router.   You cannot configure the backbone as a stub area.   You cannot configure an area as both a stub area and an not-so-stubby area (NSSA). Ref : Juniper.net

OSPF Virtual Link

OSPF Virtual Link OSPF virtual link is use for that area far from backbone area 0. At this figure 1.1 area 2 is far from area 0 so area 2 can't reach other area. Figure 1.1 After configure OSPF, neighbor is up but router 2 don't see 3.3.3.0/24 network. R3#sh ip ospf nei Neighbor ID     Pri   State           Dead Time   Address         Interface 2.2.2.2           1   FULL/DR         00:00:39    10.1.2.1        FastEthernet0/0 R2#sh ip route      10.0.0.0/30 is subnetted, 2 subnets C       10.1.2.0 is directly connected, FastEthernet1/0 C       10.1.1.0 is directly connected, FastEthernet0/0 One of OSPF rule all area must connect to area 0.In this cause we can use virtual link at area 1. R2 router ospf 1  router-id 2.2.2.2  log-adjace...