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

How to setup AWS VPC Peering (VPC to VPC)

    Hi Everyone... ဒီကနေ့တော့ VPC Peering လုပ်တဲ့ အကြောင်းလေးပြောပြပေးသွားမှာပါ။ VPC peering ဘာလို့လုပ်တာလဲ ဘယ်အချိန်တွေမှာသုံးတာလဲဆိုတာကို ကြည့်ရအောင်... သိတဲ့ အတိုင်း ပဲ AWS networking မှာ VPC ကမပါမဖြစ်အရေးပါပါတယ် AWS account တခုရဲ့ AWS region တခုမှာ VPC 5ခုအများဆုံး ထားလို့ရပါတယ်... AZ မဟုတ်ပါဘူး အဲ့ဒါလေးတော့သတိထားရမှာပါ.. peering က one to one ဖြစ်တဲ့အတွက် VPC များလာရင်တော့ configuation complex ဖြစ်လာပါမယ်၊ နောက်တခုကတခြား AWS account တွေရဲ့ VPC နဲ့ချိတ်ဆက်သုံးချင်တာတွေလဲရှိနိုင်ပါတယ် အဲ့လို VPC တွေများလာမယ်ဆိုရင်တော့ Transit Gateway ကိုသုံးတာက ပိုစိတ်ချမ်းသာရပါတယ်။ VPC နည်းသေးတယ် နောင်လဲတိုးလာဖို့ မရှိသေးဘူးဆိုရင်တော့ အခုနည်းလမ်းက ပိုအဆင်ပြေပါတယ်. ဆိုတော့ Pubilc VPC နဲ့ Private VPC ဆိုပြီးရှိတယ်ဆိုပါစို့ Pubilc VPC ထဲက webserver က Private VPC ထဲ က database ကိုလှမ်းသုံးချင်တယ်ဆိုရင် အဲ့ဒီ VPC တွေကို peering လုပ်ပေးဖို့လိုပါတယ်.. Peering လုပ်မယ်ဆိုရင်တော့ VPC ထဲက peering connections ကိုရွေးရပါမယ်. ပြီးရင်တော့ Create peering connections ကို click ပါ၊ ဒီ box ကျလာရင်တော့ name မှာ

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

BGP Disable Connected Check and EBGP Multi Hop

Figure 1.1 In this scenario I use OSPF for TCP reachability. We can see the difference 'disable connected' check and 'EBGP multihop'. We can use both for EBGP neighbor connection with loopback address. Disable connected check This command used to disable the connection verification process for ebgp. Use for ebgp neighbor are directly connected and they using the loopback address for peering. It not increment TTL but neighbor must reachable at single hop. EBGP multihop This command can use for ebgp neighbor are not directly connected. It increment TTL. R1 router bgp 100  neighbor 2.2.2.2 remote-as 200  neighbor 2.2.2.2 disable-connected-check  neighbor 2.2.2.2 update-source Loopback0  neighbor 3.3.3.3 remote-as 300  neighbor 3.3.3.3 ebgp-multihop 2  neighbor 3.3.3.3 update-source Loopback0 R2 router bgp 200  neighbor 1.1.1.1 remote-as 100  neighbor 1.1.1.1 disable-connected-check  neighbor 1.1.1.1 update-source Loopback0 R3