Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
we can configure BGP with loopback address by configuring "neighbor x.x.x.x update-source Loopback", where x.x.x.x is the neighbour peer Loopback IP address. This configuration is done in "router bgp" configuration mode
Take two routers:
R1 and R2.
R1 has2 interface (s1/0 -10.1.1.1/30, Loopback1 - 1.1.1.1/32) connected directly to R2 (s1/0 -10.1.1.2/30, Loopback1 -2.2.2.2/32)
Now as the question is not clear, if it is IBGP or EBGP.
but dont worry, I will tell you the solution for both cases.
lets take EBGP first.
in this case we will configure BGP AS65001 on R1 and BGP AS65002 on R2.
(do this on both routers in global configuration mode)
R1(config)#router bgp65001
R1(config-router)#neighbor2.2.2.2 remote-as65002
R1(config-router)#neighbor2.2.2.2 ebgp-multihop2
R1(config-router)#neighbor2.2.2.2 update-source loopback1
R1(config-router)#exit
R1(config)#end
On router2
R2(config)#router bgp65002
R2(config-router)#neighbor 1.1.1.1 remote-as65001
R2(config-router)#neighbor1.1.1.1 ebgp-multihop2
R2(config-router)#neighbor1.1.1.1 update-source loopback1
R2(config-router)#exit
R2(config)#end
Make sure you have a static route/ reachability from R1 to loopback of R2, and Vice-Versa.
At last you verify the configuration using "sh ip bgp summary" command.(in privileged mode)
Now,2nd case when R1 and R2 are IBGP neighbors.
On R1
R1(config)#router bgp65001
R1(config-router)#neighbor2.2.2.2 remote-as65002
R1(config-router)#neighbor2.2.2.2 update-source loopback1
R1(config-router)#exit
R1(config)#end
On R2
R2(config)#router bgp65002
R2(config-router)#neighbor 1.1.1.1 remote-as65001
R2(config-router)#neighbor1.1.1.1 update-source loopback1
R2(config-router)#exit
R2(config)#end
NOTE : in IBGP we dont need to give multihop command.
Now you will ask why ?
So in EBGP when a router send neighborship request it send the packet with TTL value of1 bydefault.
in that case we need ebgp-multihop command with a reference of how far the remote neighbor is.
but in IBGP, TTL value is not set to1.
Hope now its clear to you.
If not, you can ping me.
There are two categories of BGP
1) iBGP
2) eBGP
It is recommended to create peers using loopbacks within your Autonomous System i.e. using iBGP meaning creating peers between two peers with same Autonomous System and as for creating peers between two different Autonomous System (here BGP would be called eBGP) then the peers should be directly connected no matter what.And if you want to create peering between two different Autonomous System using loopbacks then you would need to configure static routes on both ends so that the routers would know how to reach the loopback and also an additional command would be needed for that under the bgp process i.e
#neighbour ( loopback ip address of neighbour) ebgp-multihop2
along with the update-source loopback cmd.