Bgp network command

Unanswered Question
Mar 27th, 2007
User Badges:

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


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (2 ratings)
Loading.
Harold Ritter Tue, 03/27/2007 - 15:06
User Badges:
  • Cisco Employee,

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,

IVAN PEPELNJAK Wed, 03/28/2007 - 23:36
User Badges:

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.

Actions

This Discussion