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 10.1.0.0 mask 255.255.255.0
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 2.2.2.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 *> 10.1.0.0/24 10.1.1.1 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
172.17.0.0/24 is subnetted, 1 subnets
C 172.17.0.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 2 subnets
C 10.1.1.0 is directly connected, Serial0/0
B 10.1.0.0 [20/0] via 10.1.1.1, 5d20h
Above in the bgp table snip shows R2 has learnt of the 10.1.0.0/24 network through BGP (B), and that it has come from AS 100 and that we have reachability through the next hop ip address of 10.1.1.1.
How let take a look at BGP the UPDATE and NOTIFICATION messages that took place I have captured the message types on the wireshark