2

enter image description here

I have above scenario where I got public IP subnet got from ISP 74.100.100.0/23 and i have configured eBGP and iBGP as you can see in diagram, I have configured those Public IP in HSRP my LAN side. ISP sending BGP default route to us.

BGP config

router bgp 3xxxx8
  router-id 192.168.255.20
  log-neighbor-changes
  address-family ipv4 unicast
    network 74.100.100.0/23
  neighbor 74.1.1.69
    remote-as 1xxxx2
    timers 10 30
    address-family ipv4 unicast
      send-community
  neighbor 192.168.255.19
    remote-as 3xxxx8
    update-source loopback0
    address-family ipv4 unicast
      next-hop-self

HSRP config

interface Vlan100
  hsrp version 2
  hsrp 101
    preempt
    priority 110
    ip 74.100.100.1

At this point everything working great! now i have requested for more public IPs so ISP provided new public pool 74.200.200.0/23 and i have config it here like following.

BGP config (new subnet)

  router bgp 3xxxx8
      router-id 192.168.255.20
      log-neighbor-changes
      address-family ipv4 unicast
        network 74.100.100.0/23
        network 74.200.200.0/23
      neighbor 74.1.1.69
        remote-as 1xxxx2
        timers 10 30
        address-family ipv4 unicast
          send-community
      neighbor 192.168.255.19
        remote-as 3xxxx8
        update-source loopback0
        address-family ipv4 unicast
          next-hop-self

On HSRP side ( i have divided /23 in two /24 subnet to isolate traffic)

subnet 74.200.200.0/24

interface Vlan101
  hsrp version 2
  hsrp 101
    preempt
    priority 110
    ip 74.200.200.1 

Now HSRP working fine, but somehow i can't ping 74.200.200.1 from outside. Look like something is missing in route table somewhere. I have announce public subnet on OSPF like following.

interface Vlan101
  no ip ospf passive-interface
  ip router ospf 100 area 0.0.0.0

my BGP table view

core1# sh ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 122, local router ID is 192.168.255.20
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-injected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup

   Network            Next Hop            Metric     LocPrf     Weight Path
*>e0.0.0.0/0          74.1.1.69                                  0 1xxxx2 i
* i                   192.168.255.19                    100          0 1xxxx2 i
* i74.100.100.0/23    192.168.255.19                    100          0 i
*>l                   0.0.0.0                           100      32768 i
  l74.200.200.0/23    0.0.0.0                           100      32768 i

I am not seeing new subnet in advertised list

core1# show bgp ip unicast neighbors 74.1.1.69 

   Network            Next Hop            Metric     LocPrf     Weight Path
*>l74.100.100.0/23    0.0.0.0   

                    100      32768 i

my OSPF table view

74.100.100.0/23, ubest/mbest: 2/0
    *via 192.168.250.2, Eth2/12, [110/41], 12w6d, ospf-100, intra
    *via 192.168.250.14, Eth2/11, [110/41], 12w6d, ospf-100, intra
74.200.200.0/24, ubest/mbest: 2/0
    *via 192.168.250.2, Eth2/12, [110/41], 02:03:03, ospf-100, intra
    *via 192.168.250.14, Eth2/11, [110/41], 02:03:03, ospf-100, intra

I did clear ip bgp on my peers also. In HSRP i divided /23 subnet in /24 so do you think i should use network 74.200.200.0/24 in BGP config?

2 Answers 2

2

Solved

Nevermind, I think issue was announced subnet mask. If OSPF sending /24 then you have to add /24 in BGP network statement, I think there must be a work around for this issue (like summarization) but for now i am good.

  router bgp 3xxxx8
      router-id 192.168.255.20
      log-neighbor-changes
      address-family ipv4 unicast
        network 74.100.100.0/23
        network 74.200.200.0/24
0
2

When you use the BGP network statement, BGP will only announce that prefix if the prefix exists in the IP routing table exactly. So if you have 74.200.200.0/23, that exact prefix must exist in the routing table for it to be announced.

One option to get around this is to create a static route pointing to Null0:

ip route 74.200.200.0/23 Null0

The router will advertise the route through BGP unconditionally. This may not be a bad thing if this router is the only router announcing the prefix to the Internet. Any traffic arriving that does not match something more specific (i.e. the OSPF route) will be black holed (routed to Null0)

Another option is to use BGP aggregate-address to advertise the /23 and suppress the component /24:

aggregate-address 74.200.200.0/23 summary-only

The aggregate will only be announced if there is a component route within the BGP table, so your aggregate will not be announced to the Internet if the component route is not present.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.