Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

Bgp network command


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 assigned to it what would the bgp network command look like?

Or As has 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

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 255.255.128 the network command would as follow:

network mask

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

network mask

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)
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
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.

CreatePlease to create content