06-19-2011 02:58 PM - edited 03-04-2019 12:45 PM
Please help me out clearing up a little confusion about this topic. It is my understanding that using "network 1.1.1.0 255.255.255.0" under router bgp or router eigrp simply activates the particular router process on any interfaces that the router has on those subnets. Is this correct? Are there any other uses of this command? What happens if one was to use "router 2.2.2.0 255.255.255.0" on a router that doesn't have an interface on that network? Does the router simply ignore the command? If so, what doesn't the IOS simply kick out an error stating there are no interfaces that on that network? Lastly what are the differences using the "network" command under eigrp and bgp.
Thanks,
Diego
06-19-2011 03:51 PM
Network Command in BGP tells which networks to be advertise, but it does not turn on BGP on any of the interfaces included under this command
In other routing protocols (IGPs) the network command does two things.
1) Advertises the subnets included in the nw command to its neighbors
2) It also tells on which interfaces the IGP should be turned on.(influence who will be the neighbors)
In BGP, every neighborship to be formed is manually configured by a "neighbor
Hope this helps/Karthic.R
06-20-2011 07:25 AM
Hi Diego,
Karthic has covered the point very well, so let me just add my two cents.
The network command behaves very differently for BGP and IGP protocols. In BGP, the network command causes BGP to look into your current routing table if there is a corresponding network present - from any source! - and if it is, then inject it into BGP. In this aspect, the network command for BGP behaves essentially like a redistribution. There is no such thing as activating BGP on a selected interface because as you well know, in BGP, there are targeted peerings which must be always preconfigured manually.
In IGP protocols, the network command activates the appropriate IGP over all interfaces whose IP address falls under the range specified by the network command. In this application, however, the network command is very confusing because it suggests that it injects a network into the IGP exactly as written, including its netmask. The truth is that the network command in IGP only defines a range of addresses. If a directly connected interface has an IP address falling into this range, then the IGP will be run on that interface and the true network of that interface (including its real mask) will be advertised. From this viewpoint, the way of activating the IGP directly in the interface configuration (such as ip ospf PROCESS area AREA for OSPF or ip router isis for IS-IS, or all IPv6 IGP protocols) is much more understandable and clearer.
The router will not issue any warning or error message if you enter a network command that refers to a non-existent network. The router simply considers this network as disconnected. If it ever gets connected back, it will be advertised just as any other network.
Best regards,
Peter
06-20-2011 01:59 PM
So is it correct to say that networks to be advertised to BGP nieghbors must be explicitly defined with the network command?
Conversely, with an IGP type protocol all networks in the routing table will be automatically advertised as long as the router has an active interface that matches the IP range defined with the network command.
Is this correct?
TIA,
Diego
06-21-2011 02:44 AM
Hi,
the networks to be advertised MUST be present in the routing table and advertised with a correct network statement or redistributed so they get into the BGP table.
and for IGP it is correct.
Regards.
Alain.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide