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 )
IGP : OSPF , R1 Loopback : 1.1.1.1 , R4 Loopback : 4.4.4.4
R5(config)# router bgp 6500 R5(config-router)# neighbor 10.1.45.1 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 10.1.45.2 remote-as 6500 R4(config-router)#neighbor 1.1.1.1 remote-as 5500 R4(config-router)#update source loopback 4
R1(config)# router bgp 5500 R1(config-router)#neighbor 4.4.4.4 remote-as 5500
These commands are not enough to establish a neighbor adjacency in the same AS. Because Router 4 can send packet from 10.1.24.2 or 34.2 as source address. But Router-1 knows 4.4.4.4 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 5.5.5.5 255.255.255.255 R5(config)# ip route 4.4.4.4 255.255.255.255 10.1.45.1
R4(config)# ip route 5.5.5.5 255.255.255.255 10.1.45.2
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 5.5.5.5 ebgp-multihop 2