Network Statement
kwyap
Member Posts: 6 ■□□□□□□□□□
in CCNA & CCENT
Hi,
Could anyone tell me what is Network Statement? What does network statement contain?
Thanks!
Could anyone tell me what is Network Statement? What does network statement contain?
Thanks!
Comments
-
rockstar81 Member Posts: 151A network segment is a portion of a computer network separated by a computer networking device, including:
Repeater or Ethernet hub (both OSI layer 1 devices)
Bridge or switch (OSI layer 2 devices)
Router (OSI layer 3 device) -
keenon Member Posts: 1,922 ■■■■□□□□□□the network statement under a routing process defines which interfaces will speak that routing protocolBecome the stainless steel sharp knife in a drawer full of rusty spoons
-
kwyap Member Posts: 6 ■□□□□□□□□□Thanks for explanation!
How is the network statement look like? From my understanding, routing protocol will learn something from the network statement propagate by the neighbor router. Please correct me if i'm off base. -
PCHoldmann Member Posts: 450enables routing on interfaces and tells the router what local networks to advertise (networks learned by a routing protocol are from another router are passed on by default) BGP is the exception to this rule. The network statement has several varients:
RIP V1 (classful) is simply the network, no mask:
network 172.16.0.0
this would enable RIP on any interface that is in the 172.16.0.0 network, including if the network was subnetted. If it is subnetted, RIP assumes a consistant subnet mask, gets a mask from one of it's interfaces, and uses that. RIP V2 uses the same format, but will transmit masks in the routing updates.
EIGRP and OSPF use the network command in the same way, but include a wildcard mask like an access list. Any 0 bits in the wildcard mask are compared exactly between the interface addresses and the address in the network statement, and any 1s can be any value. Although the most common usage is basicaly a reversed subnet mask, i.e. 0.0.0.255 will match networks the same way we would expect 255.255.255.0 to, some interesting effects can be achived. OSPF also requires an area statement:
network 192.168.1.0 0.0.0.255 area 0
puts an interface in the 192.168.1.0 network in the backbone area, and enables OSPF on that interface.
BGP uses the network statement to determine what networks to advertise, not what interfaces to use. the "network 192.168.1.0 mask 255.255.255.0" command tells BGP to advertise that network to configured neigbors. I would not worry about that until you get past the CCNA.
HTHThere's no place like ^$
Visit me at Route, Switch, Blog -
kwyap Member Posts: 6 ■□□□□□□□□□Much appreciate for your detail replied.
May i know how to determine which routing protocol will learn something from the network statement? -
PCHoldmann Member Posts: 450It is used in router config mode, so if you enter "router rip" the prompt changes to (config-router)# and you are configuring RIP. So it is used for whatever protocol you are configuring.There's no place like ^$
Visit me at Route, Switch, Blog