【Lab Objectives】
1. To master the configuration methods which established on the basis of loopback of BGP neighbor relationship.
2. To understand the objective of using loopback.
【Lab Topology】
【Lab Steps】
1. Configure the router’s IP address, and use the command Ping to confirm the connect’s interoperability of each router.
2. To configure RIPv2 routing protocols of AS 64512 system of self-government.
R1(config)#router rip R1(config-router)#network 172.16.0.0 R1(config-router)#version 2 R1(config-router)#no auto-summary R1(config-router)#exit |
R2(config)#router rip R2(config-router)#no auto-summary R2(config-router)#version 2 R2(config-router)#network 172.16.0.0 R2(config-router)#exit |
3. First of all, to create neighbors relationship by using loopback on R1 and R2, the configuration is shown as below:
R1(config)#router bgp 64512 R1(config-router)#network 172.16.0.0 mask 255.255.255.0 R1(config-router)#network 172.16.1.0 mask 255.255.255.0 R1(config-router)#neighbor 172.16.16.1 remote-as 64512 R1(config-router)#exit |
R2(config)#router bgp 64512 R2(config-router)#network 172.16.255.0 mask 255.255.255.252 R2(config-router)#network 10.1.255.0 mask 255.255.255.252 R2(config-router)# R2(config-router)#neighbor 172.16.0.1 remote-as 64512 R2(config-router)#exit |
4. Because BGP needs more time to create the peer, so it needs a bit long time to check the BGP summary information of R1 and R2.
R1#show ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.16.16.1 4 64512 0 0 0 0 0 never Active R1# |
R2#show ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.16.0.1 4 64512 0 0 0 0 0 never Active |
5. Opening the debugging of BGP on router R1:
R1#debug ip bgp in *Mar 30 11:42:34.607: BGP: 172.16.16.1 multihop open delayed 19731ms (no route) *Mar 30 11:42:54.339: BGP: 172.16.16.1 multihop open delayed 17735ms (no route) *Mar 30 11:43:12.075: BGP: 172.16.16.1 multihop open delayed 17459ms (no route) *Mar 30 11:43:29.535: BGP: 172.16.16.1 multihop open delayed 14687ms (no route) |
6. As the R1 and R2 is in the same system of self-government, so we use RIPv2 protocol to resolve the non-reach problem, at the same time, points out that using loopback to configure the neighbors relationship in BGP protocol, the specific configuration is shown as below:
R1(config)#router rip R1(config-router)#version 2 R1(config-router)#no auto-summary R1(config-router)# R1(config-router)#network 172.16.0.0 R1(config-router)#exit R1(config)# R1(config)#router bgp 64512 R1(config-router)#neighbor 172.16.16.1 update-source loopback 0 R1(config-router)#exit |
R2(config)#router rip R2(config-router)#version 2 R2(config-router)#no auto-summary R2(config-router)#network 172.16.0.0 R2(config-router)#exit R2(config)# R2(config)#router bgp 64512 R2(config-router)#neighbor 172.16.0.1 update-source loopback 0 R2(config-router)#exit |
7. Wait a minute or directly clear ip bgp *, check the BGP summary of R1 again:
R1#sh ip bgp summary Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.16.16.1 4 64512 5 5 6 0 0 00:00:20 2 |
8. Re-configue R2 and R3 to create eBGP neighbors relationship by using loopback:
R2(config)#router bgp 64512 R2(config-router)#neighbor 192.168.0.1 remote-as 64513 R2(config-router)#neighbor 192.168.0.1 update-source loopback 0 R2(config-router)#neighbor 192.168.0.1 ebgp-multihop 2 R2(config-router)#exit R2(config)#ip route 192.168.0.1 255.255.255.255 10.1.255.2 |
R3(config)#router bgp 64513 R3(config-router)#neighbor 172.16.16.1 remote-as 64512 R3(config-router)#neighbor 172.16.16.1 update-source loopback 0 R3(config-router)#neighbor 172.16.16.1 ebgp-multihop 2 R3(config-router)# R3(config-router)#network 192.168.0.0 R3(config-router)#network 192.168.1.0 R3(config-router)#network 10.1.255.0 mask 255.255.255.252 R3(config-router)#exit R3(config)#ip route 172.16.16.1 255.255.255.255 10.1.255.1 |
9. To observe the state of BGP neighbors relationship on R2:
R2#show ip bgp summary Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.16.0.1 4 64512 19 20 9 0 0 00:14:11 2 192.168.0.1 4 64513 5 6 9 0 0 00:00:10 3 |
10. Lab completed.
Hope to helpful for you!