05-02-2018 09:02 AM - edited 03-05-2019 10:22 AM
Hi All,
This may be a remedial question but do you have to advertise a local network for the BGP peering to come up? I have very little experience with BGP. Thanks in advance! Best.
05-02-2018 09:20 AM
Hi,
The address that you use for bgp peering mush be reachable. For iBGP peering you can use an igp for reachability and ttl by default is 255 in ibgp.
In ebgp by default the ttl value is 1, but it can be increased. If you are using a directly connected interface in ebgp then reachability will be there without any additional configuration, but if you decide to use a loopback address for ebgp peering then you can use a static route for reachability to loopback addresses and either increase the hopcount or disable the connected check.
05-02-2018 09:55 AM
Hi Coffee,
So, its safe to say for eBGP peering, you need to specify a network in the BGP configuration?
05-02-2018 10:34 AM - edited 05-02-2018 10:37 AM
Hi,
lets say you have 2 routers that are directly connected and using 192.168.1.0/30 address space and you are using directly connected network for the peering.
Below is sample configuration:
router 1:
router bgp 100
neighbor 192.168.1.2 remote-as 200
router 2:
router bgp 200
neighbor 192.168.1.1 remote-as 100
* now I am not sure what you meant by specifying networks. If you are talking about using the network command in bgp, then that is used when you are advertising a network to your bgp peer.
05-02-2018 10:52 AM
Sweet! I was told I had to use the network command to initiate peering with the provider by specifying internal networks that you want to advertise.
I appreciate your patience.
05-02-2018 11:25 AM
Hello,
on a side note, have a look at the configuration example below:
R1
interface GigabitEthernet0/0
description Link to R2
ip address 192.168.1.1 255.255.255.252
router bgp 1
neighbor 192.168.1.2 remote-as 2
R2
interface GigabitEthernet0/0
description Link to R1
ip address 192.168.1.2 255.255.255.252
router bgp 2
neighbor 192.168.1.1 remote-as 1
--> the neighbors will be up without doing anything
In this example:
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0
description Link to R2
ip address 192.168.1.1 255.255.255.252
router bgp 1
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 ebgp-multihop 2
neighbor 2.2.2.2 update-source Loopback0
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface GigabitEthernet0/0
description Link to R1
ip address 192.168.1.2 255.255.255.252
router bgp 2
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Looback0
--> neighbors will not establish, even if you advertise the local networks. You either need a static route pointing to the respective loopback address, or, as cofee mentioned, an IGP.
So, this will not work:
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0
description Link to R2
ip address 192.168.1.1 255.255.255.252
router bgp 1
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 ebgp-multihop 2
neighbor 2.2.2.2 update-source Loopback0
network 2.2.2.2 mask 255.255.255.255
network 192.168.1.0 mask 255.255.255.252
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface GigabitEthernet0/0
description Link to R1
ip address 192.168.1.2 255.255.255.252
router bgp 2
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Looback0
network 1.1.1.1 mask 255.255.255.255
network 192.168.1.0 mask 255.255.255.252
And this will:
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0
description Link to R2
ip address 192.168.1.1 255.255.255.252
router bgp 1
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 ebgp-multihop 2
neighbor 2.2.2.2 update-source Loopback0
ip route 2.2.2.2 255.255.255.255 192.168.1.2
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface GigabitEthernet0/0
description Link to R1
ip address 192.168.1.2 255.255.255.252
router bgp 2
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Looback0
ip route 1.1.1.1 255.255.255.255 192.168.1.1
And this will work as well:
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0
description Link to R2
ip address 192.168.1.1 255.255.255.252
router eigrp 1
network 0.0.0.0
router bgp 1
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 ebgp-multihop 2
neighbor 2.2.2.2 update-source Loopback0
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface GigabitEthernet0/0
description Link to R1
ip address 192.168.1.2 255.255.255.252
router eigrp 1
network 0.0.0.0
router bgp 2
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 ebgp-multihop 2
neighbor 1.1.1.1 update-source Looback0
05-03-2018 12:49 AM
router bgp 2
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Looback0
network 1.1.1.1 mask 255.255.255.255
Simple Explanation of this is under:
1.) Router bgp 2 means my BGP AS is 2.
2.) neighbor 1.1.1.1 remote-as 1 means my peer's BGP AS is 1.
3.) neighbor 1.1.1.1 update-source Looback0 means reachability between my loopback0 and 1.1.1.1 IP should be OK(Simply means this should ping using my loopback 0 as source)
4.) network 1.1.1.1 mask 255.255.255.255 means I will advertise 1.1.1.1/32 in my BGP updates if this prefix is eligble for BGP routing announcements.
Reach ability between bgp peering IP's does not always require a routing protocol it may be through static routing as well.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide