cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13687
Views
5
Helpful
5
Replies

BGP not advertising networks because of no static routes?

Athiqur Rahman
Level 1
Level 1

Hi,

I currently am advertising my /20 subnet to a my 2 ISP, from whom I am only receiving default routes. My current configuration which looks like this is working fine

router bgp 1000
no synchronization
bgp router-id 200.73.64.110
bgp log-neighbor-changes
network 200.73.64.0 mask 255.255.240.0
neighbor 140.6.126.217 remote-as 2000
neighbor 140.6.126.217 weight 150
neighbor 200.113.10.89 remote-as 4000
neighbor 200.113.10.89 weight 100
auto-summary
!
ip local pool pptp-pool 172.16.10.1 172.16.10.254
ip forward-protocol nd
ip route 10.8.1.0 255.255.255.0 172.16.0.20
ip route 10.8.2.0 255.255.255.0 172.16.0.110
ip route 172.16.129.0 255.255.255.0 172.16.0.110
ip route 200.73.64.0 255.255.240.0 Null0 200
ip route 200.73.71.0 255.255.255.0 200.73.64.57

My routing table looks like this

Gateway of last resort is 140.6.126.200 to network 0.0.0.0

C    200.73.64.0/24 is directly connected, FastEthernet0/1
     200.113.10.0/29 is subnetted, 1 subnets
C       200.113.10.88 is directly connected, FastEthernet0/0
     172.16.0.0/24 is subnetted, 3 subnets
S       172.16.129.0 [1/0] via 172.16.0.110
C       172.16.0.0 is directly connected, GigabitEthernet0/2
C       172.16.1.0 is directly connected, GigabitEthernet0/2
S    200.73.71.0/24 [1/0] via 200.73.64.57
     10.0.0.0/24 is subnetted, 2 subnets
S       10.8.2.0 [1/0] via 172.16.0.110
S       10.8.1.0 [1/0] via 172.16.0.20
     140.6.0.0/29 is subnetted, 1 subnets
C       140.6.126.216 is directly connected, GigabitEthernet0/1
C    200.73.78.0/24 is directly connected, GigabitEthernet0/3.11
     200.73.79.0/28 is subnetted, 3 subnets
C       200.73.79.192 is directly connected, GigabitEthernet0/3.13
C       200.73.79.240 is directly connected, GigabitEthernet0/3.10
C       200.73.79.224 is directly connected, GigabitEthernet0/3.12
B*   0.0.0.0/0 [20/0] via 140.6.126.200, 11:15:04
S    200.73.64.0/20 is directly connected, Null0

What I want to do now is to advertise only the following

200.73.64.0/255.255.254.0 , 200.73.71.0/255.255.255.0 and 200.73.78.0/255.255.254.0

So I changed the bgp router configuration to

router bgp 1000
  no synchronization
  bgp router-id 200.73.64.110
  bgp log-neighbor-changes
  network 200.73.64.0 mask 255.255.254.0

network 200.73.71.0

network 200.73.78.0 mask 255.255.254.0
  neighbor 140.6.126.217 remote-as 2000
  neighbor 140.6.126.217 weight 150
  neighbor 200.113.10.89 remote-as 4000
  neighbor 200.113.10.89 weight 100
  auto-summary

After making this change, the desired networks were not being advertised. The only route being advertised was

7206vxr.rb#sh ip bgp neighbors 140.6.126.217 advertised-routes

BGP table version is 5, local router ID is 200.73.64.110

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

*> 0.0.0.0          140.6.126.217            0           150 2000 i

*> 200.73.71.0      200.73.64.57             0         32768 i

I am guessing that this is because that route was the only static route in my routing table? If I want to advertise the other networks I have to create static routes for them in my routing table as well?

Thanks

1 Accepted Solution

Accepted Solutions

If you have those networks in your routing table, than you can advertise them via BGP!


Try it and let me know if it's working, please

Good luck,

Calin

View solution in original post

5 Replies 5

Calin C.
Level 5
Level 5

Hello,

You have to see the problem like this: BGP will not advertise something (network) that doesn't exist in your routing table. You need to have a specific subnet in your routing table, before it can be advertised through BGP.

What you did there with ip route through Null0, is a so called "dirty trick" to make BGP see that you have the network that you want to advertise  through BGP in the routing table. This can help sometime but is not recommended all the time.

Better you should receive those networks from LAN through IGP, have static connected networks or as last resort static routing, to have them add into your routing table.

Cheers,

Calin

Hi Calin,

So in order for me advertise my desired subnets 200.73.64.0/23, 200.73.71.0/24, 200.73.78.0/23 I should have a static route for each?

I already have following routes in my table

C    200.73.64.0/24 is directly connected, FastEthernet0/1

C    200.73.78.0/24 is directly connected, GigabitEthernet0/3.11

S    200.73.71.0/24 [1/0] via 200.73.64.57

If I just add the following routes

S    200.73.79.0/24 is directly connected, Null0

S    200.73.65.0/24 is directly connected, Null0

will BGP advertise my desired networks? Or do i have to make sure that the static route subnet is exactly what i advertised?

The reason I am using Null0 is because I do not know much about BGP and or any IGP,  and it says here

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800945ff.shtml#topic4

If you have those networks in your routing table, than you can advertise them via BGP!


Try it and let me know if it's working, please

Good luck,

Calin

Thanks Calin,

I will have to try this config out side of hours when our traffic is at it's minimum. I will post the outcome most likely tomorrow.

Calin,

I have added static routes like you mentioned and it has worked!

Thanks very much for your help

Getting Started

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:

Review Cisco Networking products for a $25 gift card