Configuring

BGP routers do not detect or announce each other in the way the IGPs did, configuration of peers is manual. To configure router 2 in the previous network example I must define the neighbouring routers and which AS they represent. I also must declare exactly which networks I will advertise, including the subnet mask. The mask must match exactly to a real network in my routing table, so pay attention to the mask.

router bgp 2
 neighbor 10.1.12.1 remote-as 1
 neighbor 10.1.23.3 remote-as 3 
 network 10.255.255.2 mask 255.255.255.255
 network 192.168.2.0 mask 255.255.255.0
 redistribute connected

You should consider using the neighbour password command which will calculate an MD5 digest for every message (not functional in Packet Tracer 6.x). I could use the redistribute connected option as previously demonstrated with IGPs, or I could have explicitly advertised individual networks by using the network command.

BGP does not evaluate bandwidth and is slow to converge. We cannot determine the path our traffic will take through a complex network; as an administrator, I can determine my exit path only. Each AS I pass through will have only its best path in the routing table and my border router will only learn about that best path.

Router2#sh ip bgp summary 
BGP router identifier 10.255.255.2, local AS number 2
BGP table version is 18, main routing table version 6
8 network entries using 1056 bytes of memory
8 path entries using 416 bytes of memory
6/6 BGP path/bestpath attribute entries using 1104 bytes of memory
4 BGP AS-PATH entries using 96 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
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 2704 total bytes of memory
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs

Neighbor	V	AS	MsgRcvd	MsgSent	TblVer  	InQ 	OutQ 	Up/Down  	State/PfxRcd
10.1.12.1	4	1	72      	68    		18   	0    	0 	00:24:17        	4
10.1.23.3	4	3	70      	64        		18    	0    	0 	00:23:17        	4

There are parameters BGP may use to determine the preferred path, these are called BGP attributes. However, the simplest way for BGP to operate is to pass through the minimum number of ASs from source to destination; BGP does not have a default metric like OSPF or RIP, although we have an attribute called MED which is the equivalent.

Each router will have only a handful of connected routers in other AS and the algorithm primarily prevents loops. If BGP sees the same AS number in two different paths, it knows there is a potential loop. BGP only needs to know the path to the AS which contains the subnet it needs to get to. Once a packet gets to the destination AS, BGP is no longer used, an IGP will be used to get the packet about inside the destination AS.

When we look at the routing tables, we see BGP has an administrative distance of 20. This is Cisco’s default value for eBGP and it is given the lowest administrative distance of all the dynamic protocols and therefore the highest credibility.

If we used iBGP by contrast, this has an administrative distance of 200 and is considered less credible than the IGPs.

If we were using OSPF as an IGP in any of our AS, we could advertise its routes by using the command redistribute OSPF.

There is extra information we can add to a prefix to allow for traffic engineering; these are BGP Communities.

Last updated