Sunday 3 May 2020

BGP CHAPTER 11 - Autosummary in BGP

Today in this post we will study regarding autosummary in BGP .

Let's begin -

  • In chapter no.5-Understanding Network Advertisement in BGP  we have seen how to advertise networks in BGP .
  • BGP refer its routing table to install route in BGP and whenever we want to advertise network in BGP we need to mention exact network and subnet mask (by using keyword mask)that we want to advertise .
  • For example . if we need to advertise an network 100.0.0.0/24 we would advertise it using following cmds
  • R1(config-router)#network 100.0.0.0 mask 255.255.255.0
  • With autosummary enable in BGP , there is a small change how network command works.
  • When BGP Autosummary is enabled we can advertise a classful network and we dont need to mention the subnet mask.
  • Autosummary is not enabled by default.


Lets configure Interfaces for R1 and R2

R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#
R1(config)#int s0
R1(config-if)#ip add 12.1.1.1 255.255.255.0
R1(config-if)#descr **CONNECTION TO R2**
R1(config-if)#no shut
R1(config-if)#^Z
R1#

R2#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int s0
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config-if)#descr **CONNECTION TO R1**
R2(config-if)#no shut
R2(config-if)#^Z

Lets ping and test

R1#ping 12.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/14/52 ms

Configuring BGP Neighborship

R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router bgp 100
R1(config-router)#neig
R1(config-router)#neighbor 12.1.1.2 remote-as 200
R1(config-router)#^Z
R1#
R1#
Apr 12 09:03:22.519: %SYS-5-CONFIG_I: Configured from console by console

R2#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router bgp 200
R2(config-router)#neighbor 12.1.1.1 remote-as 100
R2(config-router)#^Z
R2#


R1#sh ip bgp sum
BGP router identifier 12.1.1.1, local AS number 100
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.1.1.2        4   200       2       2        0    0    0 00:00:15        0
R1#

R2#sh ip bgp sum
BGP router identifier 12.1.1.2, local AS number 200
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.1.1.1        4   100       2       2        0    0    0 00:00:27        0


R1(config)#int loopback 0
R1(config-if)#ip add
Apr 12 09:05:09.307: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R1(config-if)#ip add 100.0.0.1 255.255.255.0
R1(config-if)#^Z
R1#

R1(config)#router bgp 100
R1(config-router)#network 100.0.0.0 mask 255.255.255.0
R1(config-router)#^Z
R1#

R1#sh ip bgp
BGP table version is 2, local router ID is 12.1.1.1
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
*> 100.0.0.0/24     0.0.0.0                  0         32768 i

R2#sh ip bgp
BGP table version is 2, local router ID is 12.1.1.2
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
*> 100.0.0.0/24     12.1.1.1                 0             0 100 i
R2#

R2#ping 100.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/35/40 ms

R1(config)#router bgp 100
R1(config-router)#no network 100.0.0.0 mask 255.255.255.0
R1(config-router)#auto-summary
R1(config-router)#network 100.0.0.0
R1(config-router)#^Z

R1#sh ip bgp
BGP table version is 4, local router ID is 12.1.1.1
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
*> 100.0.0.0        0.0.0.0                  0         32768 i

R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

B    100.0.0.0/8 [20/0] via 12.1.1.1, 00:01:35
     12.0.0.0/24 is subnetted, 1 subnets
C       12.1.1.0 is directly connected, Serial0

R2#sh ip bgp
BGP table version is 4, local router ID is 12.1.1.2
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
*> 100.0.0.0        12.1.1.1                 0             0 100 i
R2#

R2#ping 100.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/36/52 ms
R2#

Thanks for reading the post !!

No comments:

Post a Comment