ā12-02-2013 11:05 AM - edited ā03-04-2019 09:44 PM
Please find the scenorio and confifiguration. Find out the mistake why loopback of Router R1 is not reachable from R2 and vice versa(eventhough routing was available in routing table). How to rectify it and explanation.
R1 configuration.
interface Loopback0
ip address 10.10.10.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router bgp 1
no synchronization
bgp log-neighbor-changes
network 10.10.10.0 mask 255.255.255.0
neighbor 192.168.1.2 remote-as 2
auto-summary
R2 configuration
interface Loopback0
ip address 30.30.30.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.2.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router bgp 3
no synchronization
bgp log-neighbor-changes
network 30.30.30.0 mask 255.255.255.0
neighbor 192.168.2.1 remote-as 2
auto-summary
interface Loopback0
ip address 20.20.20.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
router bgp 2
no synchronization
bgp log-neighbor-changes
network 20.20.20.0 mask 255.255.255.0
neighbor 192.168.1.1 remote-as 1
neighbor 192.168.2.2 remote-as 3
auto-summary
R1#sh 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
20.0.0.0/24 is subnetted, 1 subnets
B 20.20.20.0 [20/0] via 192.168.1.2, 00:10:42
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
B 30.30.30.0 [20/0] via 192.168.1.2, 00:00:54
R1#sh ip bg
R1#sh ip bgp
BGP table version is 22, local router ID is 10.10.10.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.0/24 0.0.0.0 0 32768 i
*> 20.20.20.0/24 192.168.1.2 0 0 2 i
*> 30.30.30.0/24 192.168.1.2 0 2 3 i
R2#sh 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
20.0.0.0/24 is subnetted, 1 subnets
B 20.20.20.0 [20/0] via 192.168.2.1, 00:01:25
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.10.0 [20/0] via 192.168.2.1, 00:01:25
C 192.168.2.0/24 is directly connected, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
C 30.30.30.0 is directly connected, Loopback0
R2#sh ip bg
R2#sh ip bgp
BGP table version is 17, local router ID is 30.30.30.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.0/24 192.168.2.1 0 2 1 i
*> 20.20.20.0/24 192.168.2.1 0 0 2 i
*> 30.30.30.0/24 0.0.0.0 0 32768 i
R3#sh ip rou
R3#sh 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
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.10.0 [20/0] via 192.168.1.1, 00:11:48
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet0/1
30.0.0.0/24 is subnetted, 1 subnets
B 30.30.30.0 [20/0] via 192.168.2.2, 00:01:52
R3#sh ip bg
R3#sh ip bgp
BGP table version is 8, local router ID is 20.20.20.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.10.0/24 192.168.1.1 0 0 1 i
*> 20.20.20.0/24 0.0.0.0 0 32768 i
*> 30.30.30.0/24 192.168.2.2 0 0 3 i
R1#ping 30.30.30.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.30.30.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R1#ping 20.20.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/87/132 ms
R1#
R2#ping 20.20.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.20.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 132/182/208 ms
R2#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
ā12-02-2013 11:24 AM
Dinesh
When R2 pings R1 it will have a source IP of 192.168.2.2. But R1 knows nothing about that network so it cannot send the return packet. Same reason R1 cannot ping loopback on R2 ie. R2 knows nothing about 192.168.1.x network.
Either -
1) when you do the pings use the extended ping and make the source interface the loopback address
or
2) advertise the 192.168.1.0/24 network to R2 and the 192.168.2.0/24 network to R1
Jon
ā12-02-2013 11:43 AM
But its Pingable through loopback source how?
R1#ping 30.30.30.1 source 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.30.30.1, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 212/260/360 ms
R2#ping 10.10.10.1 source 30.30.30.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
Packet sent with a source address of 30.30.30.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 156/223/288 ms
Explain now how it was reachable?
is it necessary to advertise.. what are other ways to solve this issue..
ā12-02-2013 11:54 AM
Dinesh
Explain now how it was reachable?
Look at your routing tables -
R1 pings R2 without using loopback as source so source IP is 192.168.1.2. When the packet arrives at R2 that router looks in it's routing table for the 192.168.1.x network and there is no entry so it drops it.
R1 pings R2 using it's loopback as the source IP. When the packet arrives at R2 it looks in it's routing table and sees a route for 10.10.10.0 255.255.255.0 via R3 so it forwards it to R3 which then forwards it to R1.
is it necessary to advertise.. what are other ways to solve this issue..
You have to have full routing information on all routers so you need to advertise them somehow. In the real world you don't really need to ping an EBGP router that is not a direct neighbor but for your setup you will have to advertise those networks if you want the ping to work.
Jon
ā12-02-2013 12:12 PM
i will explain in my point of view.
We can use reditribute connected command to reach the loop back R2 and R1 vice versa instead of advertising.
We are advertising the loopback interface on each router. So advertise routes will learn by other routes but neighbour command was configured as with physical interface. So it try to reach through neighbour command only. But Physical interface was not advertised so it will not reachable directly. But through loopback interface it can reachable. Since it was advertised. 10.10.10.1 was learned by R1 through 30.30.30.1 only.
Another way to solve this issue. Configured loopback interface as neighbour and update the neighbour x.x.x.x update source lo under BGP u can able to reachable since neighbour address was loop back address.
I Hope u agree?
ā12-02-2013 12:27 PM
Dinesh
We can use reditribute connected command to reach the loop back R2 and R1 vice versa instead of advertising.
That is advertising. Doesn't matter whether you add network statements under BGP or use redistribute connected you are still advertising routes. Note that you would use that command on R3.
So it try to reach through neighbour command only
Not sure what you mean by this ?
Another way to solve this issue. Configured loopback interface as neighbour and update the neighbour x.x.x.x update source lo under BGP u can able to reachable since neighbour address was loop back address.
I think you are getting confused between the neighbor statement and IP routing. If you configured the neighbor to use the loopback address on R1 and then did a ping it would still use 192.168.1.1 as the source IP. So R2 still needs to know how to reach the 192.168.1.x network. This has nothing to do with your BGP config it is just how a router works ie. the source IP is the IP address of the interface used to get to the remote network.
So when you ping R2 the router looks in it's routjng table for a route. It does not look at it's BGP config because that has nothing to do with sending a ping to R2. Only the routing table matters.
Jon
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: