cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5163
Views
5
Helpful
8
Replies

A Quick Question - OSPF

Jaylene
Visitor

An OSPF router has 3 directly connected networks;

172.16.0.0/16, 172.16.1.0/16 and 172.16.2.0/16

 Which OSPF network command would advertise only the

172.16.1.0 network

to neighbors?

   

A. rtr(config-router)# network 172.16.1.0 0.0.255.255 area 0
    B. rtr(config-router)# network 172.16.0.0 0.0.15.255 area 0
    C.
rtr(config-router)# network 172.16.1.0 255.255.255.0 area 0
    D.
rtr(config-router)# network 172.16.1.0 0.0.0.0 area 0



Jaylene
1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @Jaylene ,

both the question and all the answers have some errors.

First of all, the network ,mask cannot be

/16

on all three interfaces because this would lead to overlapping addresses that are not supported on real routers.

If you try to configure them in a real device or in an emulated one you get the address overapping error.

Given the

network addresses 172.16.0.0, 172.16.1.0, 172.16.2.0

the first prefix length that avoids overlapping is

/24

So the correct answer should be

network 172.16.1.0 0.0.0.255 area 0

 

as an alternative if the router inferface has

IP address 172.16.1.1

also the following will work

 

network 172.16.1.1 0.0.0.0 area 0

 

Hope to help

Giuseppe

 

View solution in original post

8 Replies 8

luis_cordova
VIP Alumni
VIP Alumni

Hi @Jaylene 

 

Correct answer is A

 

Regards

@luis_cordova  If we go for Option A, it will advertise the rest of the network as well.

Jaylene

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @Jaylene ,

both the question and all the answers have some errors.

First of all, the network ,mask cannot be

/16

on all three interfaces because this would lead to overlapping addresses that are not supported on real routers.

If you try to configure them in a real device or in an emulated one you get the address overapping error.

Given the

network addresses 172.16.0.0, 172.16.1.0, 172.16.2.0

the first prefix length that avoids overlapping is

/24

So the correct answer should be

network 172.16.1.0 0.0.0.255 area 0

 

as an alternative if the router inferface has

IP address 172.16.1.1

also the following will work

 

network 172.16.1.1 0.0.0.0 area 0

 

Hope to help

Giuseppe

 

Sebaso
Frequent Visitor
Frequent Visitor

I tried to solve this question before... by reducing answares.....

A. rtr(config-router)# network 172.16.1.0 0.0.255.255 area 0        this will propagate all three  
    B. rtr(config-router)# network 172.16.0.0 0.0.15.255 area 0 this will propagate all three
    C.
rtr(config-router)# network 172.16.1.0 255.255.255.0 area 0
    D.
rtr(config-router)# network 172.16.1.0 0.0.0.0 area 0

 So for me C, D left.... we do not have a network diagram so we are not able to see if D will propagare the net.

So if router support the use of network mask and will automatically change it to wildcard the correct answare is C.

@Sebaso have you read and understand @Giuseppe Larosa 's reply?

As he correctly noted, the 3 "networks" are only but 1 network, 172.16.0.0/16.

172.16.1.0/16 and 172.16.2.0/16 are both legitimate IP addresses within the network 172.16.0.0/16.

172.16.0.0/16 is also an IP address within the network 172.16.0.0/16, but it usually wouldn't be used as a host address, but let's assume it is.  If so, any of those 3 addresses, as an interface address, could be matched by an OSPF network statement in multiple ways, but all three, would advertise the 172.16.0.0/16 network.

The OSPF network statement's wildcard mask has nothing to do with the actual network that's advertised.  It, and the statement's IP address, are used, much, but not exactly, like an ACL ACE to match an interface IP address.  The interface's IP address and mask is what determines the advertised network.

Assuming the interface address was 172.16.1.0 255.255.0.0, answer D would be correct to only match it, but, again, the network advertised would be 172.16.0.0/16.

xiniayuan
Community Member

Option A

I'm always willing to learn.

@xiniayuan and @Sebaso would you please explain your answer choices?

Joseph W. Doherty
Hall of Fame
Hall of Fame

As @Giuseppe Larosa described, the OP question, as described, has multiple problems.

An OSPF router has 3 directly connected networks;

172.16.0.0/16, 172.16.1.0/16 and 172.16.2.0/16

As I've, in an earlier reply, noted, two of those "networks" are NOT networks.  All three are IP addresses within the same network although the one, as it overlaps with the network address, and conflicts a (with very old) network broadcast usage address, would generally not be used as a host address.

As @Giuseppe Larosa further described if multiple interfaces attempt to use addresses from the same network, Cisco devices won't allow a combination of them, unless they are in different VRFs or possibly if only one is "up".

Which OSPF network command would advertise only the

172.16.1.0 network

to neighbors?

As I've also replied earlier, the OSPF network does NOT have direct control over what is the advertised network.  The OSPF network statement selects interfaces, and the addressing information, on the interface determines what's the advertised network.

Both @Giuseppe Larosa and myself, show an example of a somewhat similar question, with a correct answer, but perhaps that further confused.

Since the OP question doesn't provide interface addressing information, we cannot determine if any of the provided network statement answer choices is the correct answer.

I might add, @Sebaso , I believe answer C is syntactically invalid.

@xiniayuan and @Sebaso , or anyone else, if you can obtain the free version of CML, use it, and see what results you obtain.  If what you see seems counter to what @Giuseppe Larosa or I have provided, please post a follow up.

If what @Giuseppe Larosa or I is describing is unclear, please post on that too.