network command on cisco router

Answered Question
Nov 10th, 2011
User Badges:

Hi all,


I was reading about network command when we configure the Routing protocols like RIP or ospf.


it says network command does two things


what network to advertise to  other routers  and which interfaces it will advertise the network.


if we have 3 routers  , router a b and c


Router  A  has this config


2 interfaces one to WAN  and one to LAN  connection.


Router A  config


fa0/1  wan interface

ip address 70.x.x..x


fa0/0 lan interface

ip address 192.168.5.3


router rip

version 2

network 70.0.0.0

network 192.168.5.0



Router B  config


int fa0/0 connectes to router A

ip address 192.168.5.2


int fa0/1 connects to switch A on vlan 10

ip address 192.168.10.1

int fa0/2 connects to switch B on vlan 20

ip address 192.168.20.1


int fa0/3 connects to Router C 


ip address 192.168.4.2


now we enable RIP on Router 2

router rip

network 192.168.5.0

network 192.168.10.0

network 192.168.20.0

network 192.168.4.0


Router C

int fa0/0

ip address 192.168.4.3   connects to Router B


router rip

network 192.168.4.0



***********************************************************************************

now my question is router B has


network 192.168.5.0 it will advertise that to both Router A and C  right?????


Router A is directly connected to B  Router so it already knows about it right???


Router C  will came to know about Network 192.168.5.0  right ????? when Router B  advertise??????


So Now Router B will advertise network on both interfaces that connect to Router A and C  or only on interface that has ip address 192.168.5.2???



thanks

Correct Answer by cadet alain about 5 years 5 months ago

Hi,


Yep that's it.


Regards.


Alain

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
cadet alain Thu, 11/10/2011 - 13:20
User Badges:
  • Purple, 4500 points or more

Hi,


network 192.168.5.0 it will advertise that to both Router A and C  right?????


No it won't advertise it to A but it will listen for rip messages and send rip messages out this interface.


Router A is directly connected to B  Router so it already knows about it right???


Yes for both routers this is a connected route


Router C  will came to know about Network 192.168.5.0  right ????? when Router B  advertise??????


Yes exactly


So Now Router B will advertise network on both interfaces that connect  to Router A and C  or only on interface that has ip address  192.168.5.2???


it will advertise networks on all interfaces where rip is enabled due to network command if the interface is not passive and it will listen to rip updates on all interfaces enabled for rip due to network command But due to spli-horizon it won't advertise a route on an interface where it already received this route.



Regards.


Alain

mahesh18 Thu, 11/10/2011 - 14:15
User Badges:

Hi alain


Thanks for reply.


network 192.168.5.0 it will advertise that to both Router A and C  right?????


No it won't advertise it to A but it will listen for rip messages and send rip messages out this interface.


so this means that as Router A and B are directly connected so thats reason it will not advertise 192.168.5.0 to Router

A??

Correct Answer
cadet alain Fri, 11/11/2011 - 01:33
User Badges:
  • Purple, 4500 points or more

Hi,


Yep that's it.


Regards.


Alain

mahesh18 Sat, 11/12/2011 - 22:36
User Badges:

Hi Alain,


Many thanks for good explanation.


Regards


Mahesh

Actions

This Discussion