BGP Neighbor Configuration Explained

basic bgp config example

BGP neighbor configuration, is the first step about configuring BGP. Neighbors are manually configured at Border Gateway Protocol. It takes about 60 seconds to establish a BGP neighbor adjecency. ( can be verified by “sh ip bgp summary” command )

bgp neighbor config example

IGP : OSPF , R1 Loopback : , R4 Loopback :

R5(config)# router bgp 6500
R5(config-router)# neighbor remote-as 5500     // "remote as" value refers to remote autonomous system number that neighbor belongs to //
R4(config)# router bgp 5500
R4(config-router)#neighbor remote-as 6500
R4(config-router)#neighbor remote-as 5500
R4(config-router)#update source loopback 4
R1(config)# router bgp 5500
R1(config-router)#neighbor remote-as 5500

These commands are not enough to establish a neighbor adjacency in the same AS. Because Router 4 can send packet from or 34.2 as source address. But Router-1 knows loopback as a neighbor. Because of this “update source loopback” command is used.

R1(config-router)#update source loopback 1
R5(config)# int l0

// For example if there would be a connection between Router – 4 and Router – 5, loopback should have been created on Router – 5 too. //

R5(config-if)#ip add
R5(config)# ip route
R4(config)# ip route

ISP and corporate network can’t communicate via OSPF or etc. because of that we are using static route to do it. After all commands above, BGP adjacency is not established yet. Please never forget that eBGP neighbors should be “directly connected”. The commands below resolves that issue.

R4(config)# router bgp 5500
R4(config-router)#neighbor ebgp-multihop 2

Leave a Reply

Your email address will not be published. Required fields are marked *