Advertising Routes in BGP with Cisco IOS

Recently I configured a router to be part of an MPLS, and it was using BGP for advertising routes with in the MPLS “cloud”. By default BGP will advertise routes for interfaces directly attached to the router. Unfortunately I needed to also advertise more subnets that were “behind” the router, than those that were directly attached. I knew there had to be a simple way to add this, and quickly found that I needed a “network” statement in the BGP section of the configuration.

I needed to advertise 172.31.0.0 255.255.0.0 to the rest of the cloud.

I already had the following BGP configuration:
router bgp 65025
no synchronization
bgp log-neighbor-changes
redistribute connected
redistribute static
neighbor 63.xxx.xxx.117 remote-as xxx
no auto-summary

I needed to add:
network 172.31.0.0 mask 255.255.0.0

mpls-router1#config t
mpls-router1(config)#router bgp 65025
mpls-router1(config-router)# network 172.31.0.0 mask 255.255.0.0

The resulting configuration looked like:

router bgp 65025
no synchronization
bgp log-neighbor-changes
network 172.31.0.0 mask 255.255.0.0
redistribute connected
redistribute static
neighbor 63.xxx.xxx.117 remote-as xxx
no auto-summary

While I concede that I am new to the BGP world, this worked for me. As in most things, there are probably different ways of doing it and accomplishing similar results

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.