Saturday, 8 November 2014

BGP route advertisment using the network command

Hi all,

So we are have established ebgp peering with R1 and R2. Now we need to start routing traffic. To start advertising route over our bgp peer the simplest way to do this is using the network statement command.

R1#config t
R1(config)#router bgp 100
R1(config-router)#network mask

This will generate an UPDATE message for  R2 to add  the network into its BGP table and if the network  is valid and best it will be added to the routing table. Note valid and best are indicated in the bgp table as  * valid, > best.

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

R2 Routing Table:
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 is subnetted, 1 subnets
C is directly connected, Loopback0 is subnetted, 2 subnets
C is directly connected, Serial0/0
B [20/0] via, 5d20h

Above in the bgp table snip shows R2 has learnt of the network through BGP (B), and that it has come from AS 100 and that we have reachability through the next hop ip address of

How let take a look at BGP the UPDATE and NOTIFICATION messages that took place I have captured the message types on the wireshark


No comments:

Post a Comment