There is a manual for me to learn Junos.
you see the external peer configuration, there is no local-address
option, but internal has. why eBGP configuration do not need it?
Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.
Sign up to join this communityThere's no real difference between iBGP and eBGP here since you can specify a local-address
for both.
If you do not specify a local-address
, the router will pick the address itself, typically the IP of the interface used to reach the peer.
If you want to use a different address as a BGP source address, you can specify a local-address
. In iBGP, this can be useful to setup BGP sessions to create a peering session between two routers (typically by using loopback addresses), regardless of the exact path used between those two routers. You can use a protocol like OSPF or IS-IS to connect the two routers, and on top of that use iBGP between loopback addresses to exchange routes.
In almost all situations, iBGP sessions should be between loopback addresses. To achieve this, you must configure a local-address
.
In almost all situations, eBGP sessions should be between interface addresses. This is the default.
eBGP sessions should be between interface addresses
, but there do not set a interface address.
local-address
is configured for the iBGP group in your example.
Mar 18, 2021 at 14:47
If no explicit source IP is specified, nearly all IP stacks will use the interface address of the interface facing the destination at the time the TCP connection is opened.
The big difference between iBGP and eBGP here is that an eBGP session is normally used to manage traffic over a single L2 link. If the L2 link goes down then the corresponding BGP session should also go down. So it's fine to just accept the default behaviour of using the interface address.
On the other hand an iBGP session is used distribute external routes across your internal network. If an internal link goes down then that is (for the most part) an issue for your IGP to deal with and the iBGP sessions should not be effected. So the iBGP sessions should be associated with loopback IPs that can be reliablly re-routed by your IGP. Since this is not the default behaviour of the network stack it needs to be specified explicitly.