Skip to main content

BGP Lab 1


Study lab for ebgp and ibgp. 
Figure 1.1
In this scenario ebgp and ibgp configured.

Router 1 and router 2 connect as eBGP. Router 1 and router 3 connect as iBGP.

R2
router bgp 100
neighbor 10.1.12.1 remote 200

R1 
router bgp 200
neighbor 10.1.12.2 remote 100
neighbor 10.1.13.3 remote 200

R3
router bgp 200
neighbor 10.1.13.1 remote 200


Now neighbor is up we can verify neighbors with 'show ip bgp summary'.

R2#show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 7, main routing table version 7
2 network entries using 234 bytes of memory
2 path entries using 104 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 734 total bytes of memory
BGP activity 4/2 prefixes, 4/2 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.12.1       4   200       5       5                   7      0    0     00:00:05        1

Verify the routing tables.

R1
R1#show ip route bgp
     2.0.0.0/24 is subnetted, 1 subnets
B       2.2.2.0 [20/0] via 10.1.12.2, 00:25:33
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [200/0] via 10.1.13.3, 00:30:02

R2
R2#show ip route bgp
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [20/0] via 10.1.12.1, 00:24:44

R3
R3#show ip route
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.13.0 is directly connected, FastEthernet0/0

At router 1 and 2 can see the 3.3.3.0/24 and 2.2.2.0/24 networks but router can't see the 2.2.2.0/24 network. So we check with another way.

show ip bgp 
This command to check bgp network are best route or fail.

R3#show ip bgp
BGP table version is 2, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i2.2.2.0/24       10.1.12.2                0    100      0 100 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i

2.2.20/24 is valid but not best, it next hop router is R2. R3 don't know R2 so we must change in R1 as next hop router. 
Next hop self concept is like, if you want to go U.S from Myanmar, you need to go air port.
In this scenario R1 is like air port.
 
R1 
router bgp 200
neighbor 10.1.13.3 next-hop-self

Now we see the change at next hop router.

R3#sh ip bgp
BGP table version is 3, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i2.2.2.0/24       10.1.13.1                0    100      0 100 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i

R3#sh ip route bgp
     2.0.0.0/24 is subnetted, 1 subnets
B       2.2.2.0 [200/0] via 10.1.13.1, 00:14:33

Testing
R3#ping 2.2.2.2 source 3.3.3.3

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 3.3.3.3
!!!!!

R3#traceroute 2.2.2.2 source 3.3.3.3

Type escape sequence to abort.
Tracing the route to 2.2.2.2

  1 10.1.13.1 24 msec 40 msec 52 msec
  2 10.1.12.2 68 msec 72 msec 80 msec


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