For the neighbor relationship, the update source IP from router R1 must match the neighbor command on router R2, and vice versa
To test the above,I set up my lab with R1 and R2 to test the above.(refer the pic shown below)
R1#sho ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 1.1.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Loopback0 11.11.11.11 YES manual up up
R1#
R1#
R1#sho run | sec router bgp
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 22.22.22.22 remote-as 2
neighbor 22.22.22.22 ebgp-multihop 2
no auto-summary
R1#
R1#sho ip route 22.22.22.22
Routing entry for 22.0.0.0/8
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 1.1.1.2
Route metric is 0, traffic share count is 1
R1#sho ip bgp summary | b Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
22.22.22.22 4 2 13 12 0 0 0 00:26:10 Active
For R2, i have
R2#sho ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 1.1.1.2 YES manual up up
Loopback0 22.22.22.22 YES manual up up
R2#sho run | sec router bgp
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 11.11.11.11 remote-as 1
neighbor 11.11.11.11 ebgp-multihop 2
no auto-summary
R2#
R2#sho ip route 11.11.11.11
Routing entry for 11.0.0.0/8
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 1.1.1.1
Route metric is 0, traffic share count is 1
R2#sho ip bgp summary | b Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
11.11.11.11 4 1 6 7 0 0 0 00:17:27 Active
R2#
Q1:As you see, my BGP neighborship is stuck in active state.From what i understand, R1 expects the neighborship packets from R2 with a source-ip of 22.22.22.22
If you do sho ip route
on R2 for 11.11.11.11, you see that it is learnt via 1.1.1.1
as static route
. Therefore, the bgp neighborship packets sourced from R2 will use this egress source ip(1.1.1.2
)
Please confirm if my understanding is correct
Q2:I add the following on R2.
R2(config)#router bgp 2
R2(config-router)#ne
R2(config-router)#nei
R2(config-router)#neighbor 11.11.11.11 up
R2(config-router)#neighbor 11.11.11.11 update-source lo
R2(config-router)#neighbor 11.11.11.11 update-source loopback 0
R2(config-router)#end
R2#
*Mar 1 00:56:26.211: %SYS-5-CONFIG_I: Configured from console by console
R2#sho ip bgp summary | b Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
11.11.11.11 4 1 6 7 0 0 0 00:35:17 Active
R2#
*Mar 1 00:56:37.107: %BGP-5-ADJCHANGE: neighbor 11.11.11.11 Up
R2#
The bgp neighborship now comes up. My question is- why does the neighborship not come up as seen in the first case?
Q3:Now i advertise a different loopback from R2 towards R1 as follows
R2(config-router)#do sho run int lo2
Building configuration...
Current configuration : 61 bytes
!
interface Loopback2
ip address 222.222.222.222 255.255.0.0
end
R2(config)#router bgp 2
R2(config-router)#network 222.222.0.0 mask 255.255.0.0
Then on R1, i see the prefix received
R1#sho ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 1.0.0.0/8 is directly connected, FastEthernet0/0
S 22.0.0.0/8 [1/0] via 1.1.1.2
C 11.0.0.0/8 is directly connected, Loopback0
B 222.222.0.0/16 [20/0] via 22.22.22.22, 00:04:53
R1#
Q: R1 is learning 222.222.0.0
with a next hop of 22.22.22.22
.
Why is 22.22.22.22
the next-hop ?