Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Bgp network command

Hello

I'm a bit confused with the bgp network command can someone explain it to me.

From what I understand the network command is used to correlate a public ip to an AS so different AS can communicate. How do I make use of the network mask though?

Eg. As has subnet of 1.1.0.0 255.255.128.0 assigned to it what would the bgp network command look like?

Or As has 131.50.0.0 255.255.240.0 assigned to it what would the bgp network command look like?

Also lets assume the network admin further subnets an assigned public ip does that affect the bgp network mask?

Thanks for your time and help

2 REPLIES
Cisco Employee

Re: Bgp network command

The BGP network command is used to originate a given prefix.

In the case of your AS owns prefix 1.1.0.0 255.255.128 the network command would as follow:

network 1.1.0.0 mask 255.255.128.0

If your AS owns 131.50.0.0 255.255.240.0 then the network command would look like this:

network 131.50.0.0 mask 255.255.240.0

Generally, the prefix you originate via BGP would not change whether you change the subneting inside you network or not.

Also note that the network statement has to perfectly match a prefix in the routing table (a static route, most of the time) for BGP to originate the prefix.

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: Bgp network command

The network command specifies which IP prefix the router should announce into BGP. You're usually announcing the address space you "own" as a single prefix (specifying address and mask).

For the prefix to be inserted in BGP table (and announced to other BGP routers), an exactly matching IP route has to be in the IP routing table (usually inserted with a static route to null 0 if you're originating the prefix on a single router).

If you're a Cisco partner, you can try this out for free - go to Partner e-learning connection, Lab central, find BGP labs and start the "Configuring basic BGP" lab.

156
Views
9
Helpful
2
Replies
CreatePlease to create content