Super-Networking Blog

Adding a Network to BGP

by admin on Feb.20, 2007, under Networking, Routers

Recently I was working on adding a new /24 network into our BGP advertisement networks. I added the new network into the network list under the BGP config, I added it into my prefix-list and route-map that restricts what networks we advertise to our BGP peers.

When I checked what routes were being advertised using the “show ip bgp neighbors X.X.X.X advertised-routes” command the new network was not there. If I ran the command “show ip bgp all” the network did not show up either.

When I ran the command “ip bgp route-map localonly” which points to “ip as-path access-list 10 permit ^$” the new network also was not listed.

I tried clearing the BGP sessions, removing and readding the route-map and prefix-list but it did not help.

I had added a ip route X.X.X.X 255.255.255.0 Null0 into my routing table so I knew that wasn’t the problem. I ran the command “ip bgp prefix-list” and saw that the new network was not listed there either. I ran the command “ip prefix-list” and the new network was there.

What ended up being the problem was that if the network you are adding matches the ip class you are adding you do not need a mask but if it doesn’t you need to add the mask in the BGP config.

Example (Not Actual IPs):

If you add a 9.X.X.X network to the BGP config it is a class A so you either would have to advertise “network 9.0.0.0″ or if say yours was 9.1.1.0 then you would have to advertise “network 9.1.1.0 mask 255.255.255.0″ for it to work. If you add a network like 200.1.1.0 since this is in the Class C you could just add “network 200.1.1.0″ into your BGP config.

Here is a good troubleshooting doc on this:

BGP No Advertise


1 views

Leave a Reply

Security Code:

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Your Ad Here