Pages

Tuesday, March 19, 2013

BGP - Troubleshooting Lab

In this blogtorial, I will be posting configs of the routers and a few commands. Please leave me comments on what you think the issue maybe.

Consider this topology below. 
Objective: 
  • 11.11.11.11/32 should be pingable from R4. 
  • Static routes or artificial routes cannot be installed anywhere!! 
Hint -- There are three issues.

The entire config can be downloaded here so you can lab it up in GNS3.

 !  
 hostname R1  
 !  
 interface Loopback1  
  ip address 11.11.11.11 255.255.255.255  
  ip ospf network point-to-point  
 !  
 interface FastEthernet1/0  
  description connected to R2  
  ip address 1.1.1.1 255.255.255.0  
  duplex auto  
  speed auto  
 !  
 router ospf 1  
  log-adjacency-changes  
  redistribute connected subnets route-map lo-2-ospf  
  network 1.1.1.1 0.0.0.0 area 0  
 !  
 ip prefix-list lo-2-ospf seq 10 permit 11.11.11.0/24  
 !  
 route-map lo-2-ospf permit 10  
  match ip address prefix-list lo-2-ospf  
 !  

 !  
 hostname R2  
 !  
 interface FastEthernet1/0  
  description connected to R1  
  ip address 1.1.1.2 255.255.255.0  
  duplex auto  
  speed auto  
 !  
 interface FastEthernet1/1  
  description connected to R3  
  ip address 2.2.2.2 255.255.255.0  
  duplex auto  
  speed auto  
 !  
 router ospf 1  
  log-adjacency-changes  
  network 1.1.1.0 0.0.0.255 area 0  
  default-information originate always  
 !  
 router bgp 2  
  no synchronization  
  bgp log-neighbor-changes  
  bgp soft-reconfig-backup  
  redistribute ospf 1 match internal external 2 route-map ospf-2-bgp  
  neighbor 2.2.2.3 remote-as 2  
  no auto-summary  
 !  
 ip prefix-list ospf-2-bgp seq 10 permit 11.11.11.11/32  
 !  
 route-map ospf-2-bgp permit 10  
  match ip address prefix-list ospf-2-bgp  
 !  

 !  
 hostname R3  
 !  
 interface FastEthernet1/0  
  description connected to r4  
  ip address 3.3.3.3 255.255.255.0  
  duplex auto  
  speed auto  
 !  
 interface FastEthernet1/1  
  description connected to R2  
  ip address 2.2.2.3 255.255.255.0  
  duplex auto  
  speed auto  
 !  
 router ospf 1  
  log-adjacency-changes  
  redistribute bgp 2 subnets route-map bgp-2-ospf  
  network 3.3.3.0 0.0.0.255 area 0  
 !  
 router bgp 2  
  no synchronization  
  bgp log-neighbor-changes  
  bgp soft-reconfig-backup  
  redistribute ospf 1  
  neighbor 2.2.2.2 remote-as 2  
  neighbor 2.2.2.2 soft-reconfiguration inbound  
  no auto-summary  
 !  
 ip prefix-list bgp-2-ospf seq 10 permit 11.11.11.11/32  
 !  
 route-map bgp-2-ospf permit 10  
  match ip address prefix-list bgp-2-ospf  
 !  

 !  
 hostname R4  
 !  
 interface FastEthernet1/0  
  description connected to r3  
  ip address 3.3.3.4 255.255.255.0  
  duplex auto  
  speed auto  
 !  
 router ospf 1  
  log-adjacency-changes  
  network 3.3.3.0 0.0.0.255 area 0  
 !  


'Show ip route' on R4 does not list 11.11.11.11/32 in its routing table.

Why doesn't R4 see the 11.11.11.11/32? Why can't R4 ping 11.11.11.11/32? How can you make it work? Leave comments :)

6 comments:

  1. R1 has the IP PREFIX-LIST

    ip prefix-list lo-2-ospf seq 10 permit 11.11.11.0/24

    This will not match the loopback which needs to be redistributed.

    Changing the prefix-list will do the trick.

    I haven't labbed it up and just had a quick look and found the first issue. Will probabl lab it up to check the rest of the config for any more gotchas.

    Parag Kapdi

    ReplyDelete
  2. 1) Change "ip prefix-list lo-2-ospf seq 10 permit 11.11.11.0/24" on R1 to "ip prefix-list lo-2-ospf seq 10 permit 11.11.11.11/32"
    2) R2(config-router)#neighbor 2.2.2.3 next-hop-self
    3) R3(config-router)#bgp redistribute-internal

    R4#ping 11.11.11.11

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds:
    !!!!!
    Success rate is 100 percent (5/5), round-trip min/avg/max = 32/68/88 ms

    ReplyDelete
    Replies
    1. iBGP redistribution into IGP is disabled by default which is why you need the "bgp redistribute-internal" ..

      Next-hop self is needed on R2 because R3 does not know about R1 so it will fail the Next hop reachability check.

      Nicely done Anonymous :)

      Delete
    2. Thanks man!
      Btw, your blog is awesome. I'm looking forward to more quizzes.
      Regards,
      Robert

      Delete
    3. :) thanks... I've got 3 more troubleshooting labs coming up. Stay tuned!!

      Delete
    4. Here is another troubleshooting lab.

      http://ithitman.blogspot.com/2013/03/bgp-troubleshooting-lab-2.html

      Delete