Network Statement

kwyapkwyap Member Posts: 6 ■□□□□□□□□□
Hi,

Could anyone tell me what is Network Statement? What does network statement contain?


Thanks!

Comments

  • JVEJVE Member Posts: 76 ■■□□□□□□□□
  • rockstar81rockstar81 Member Posts: 151
    A 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)
  • keenonkeenon Member Posts: 1,922 ■■■■□□□□□□
    the network statement under a routing process defines which interfaces will speak that routing protocol
    Become the stainless steel sharp knife in a drawer full of rusty spoons
  • kwyapkwyap 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.
  • PCHoldmannPCHoldmann Member Posts: 450
    enables 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.

    HTH
    There's no place like ^$
    Visit me at Route, Switch, Blog
  • kwyapkwyap 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?
  • PCHoldmannPCHoldmann Member Posts: 450
    It 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
Sign In or Register to comment.