Ospf wildcard mask

MikdillyMikdilly Member Posts: 309
Came across this practice ques:

Which of the following network commands , following the 'router ospf 1' command, tells the router to start using OSPF on interfaces whose ip addresses are 10.1.1.1, 10.1.100.1, and 10.1.120.1?

A) network 10.1.1.0 255.0.0.0 area 0
B) network 10.0.0.0 0.255.255.0 area 0
C) network 10.0.0.0 255.0.0.0 area 0
D) network 0.0.0.0 255.255.255.255 area 0

Choose 1 answer.

More than 1 answer looked correct to me but i'll leave it unanswered if someone wants to try it out.

Comments

  • gabrielbtoledogabrielbtoledo Member Posts: 217
    I did a similar question to that one in some where too.

    I think the answer is C and D.
    A+ Certified - Network+ - MCP (70-290)
    MCSA - CCNA - Security+ (soon)
  • networker050184networker050184 Mod Posts: 11,962 Mod
    The only possible answer is D. The zeros mean must match. The noloy one that matches all is D
    An expert is a man who has made all the mistakes which can be made.
  • EdTheLadEdTheLad Member Posts: 2,111 ■■■■□□□□□□
    D is correct, 0 means exact match all other network statements end with .0 and a .0 mask, all of the supplied ip addresses end with .1 and are not .0, hence the only answer an be D.
    Networking, sometimes i love it, mostly i hate it.Its all about the $$$$
  • MikdillyMikdilly Member Posts: 309
    Why not B, wouldn't the 0's in the first and last octets of the mask be the do care bits that would match to the 10 in the first and 1 in the last octet of each interface? The 255's would match anything in between. Or am i thinking of the mask entirely wrong
  • networker050184networker050184 Mod Posts: 11,962 Mod
    For B the wild card mask is 10.0.0.0 0.255.255.0 that means all addresses have to have a 10 in the first octet and a 0 in the last. All the addresses in the question start with 10 but they do not end with 0 so this mask would not match any of them.
    An expert is a man who has made all the mistakes which can be made.
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    network 10.0.0.1 0.255.255.0 area 0 would work or

    network 10.1.0.1 0.0.255.0 area 0

    I saw a simlar question in the ICND book.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • MikdillyMikdilly Member Posts: 309
    For B the wild card mask is 10.0.0.0 0.255.255.0 that means all addresses have to have a 10 in the first octet and a 0 in the last. All the addresses in the question start with 10 but they do not end with 0 so this mask would not match any of them.

    Should have remembered that, thanks for setting me straight.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    No problem!
    An expert is a man who has made all the mistakes which can be made.
  • 12beatechie12beatechie Member Posts: 74 ■■□□□□□□□□
    Mikdilly wrote:
    Why not B, wouldn't the 0's in the first and last octets of the mask be the do care bits that would match to the 10 in the first and 1 in the last octet of each interface? The 255's would match anything in between. Or am i thinking of the mask entirely wrong

    The last octet is a 1. For B, with the 0 mask, the last octet is a 0. That's why B is not the answer. Hope that helps!
    The sky is the limit!
  • gabrielbtoledogabrielbtoledo Member Posts: 217
    Oh, I thought C was right too. Because the second, third and fourth octets would cover any number when the same octets are "zero" on the mask. And the "255" on the mask will make sure that the network has to start with "10".
    C) network 10.0.0.0 255.0.0.0 area 0
    A+ Certified - Network+ - MCP (70-290)
    MCSA - CCNA - Security+ (soon)
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    It's the other way around. 0 means match exactly.

    Plus 255.0.0.0 is a subnet mask, not an inverse mask which is used for ospf.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • networker050184networker050184 Mod Posts: 11,962 Mod
    0 is match 255 is any, then you can get into the difficult ones!
    An expert is a man who has made all the mistakes which can be made.
  • gabrielbtoledogabrielbtoledo Member Posts: 217
    0 is match 255 is any, then you can get into the difficult ones!
    I see, I was confused then. I guess the mask should have been 0.255.255.255

    Thanks for clarifying.
    A+ Certified - Network+ - MCP (70-290)
    MCSA - CCNA - Security+ (soon)
  • bohra_ajaybohra_ajay Member Posts: 21 ■□□□□□□□□□
    Refering to the CCNA Study Guide 5th Edition by Todd Lammle

    " A wildcard Review: A 0 octet in the wildcard mask indicates that the corresponding octet in the network must match exactly. On the other hand a 255 indicates that you dont care what the corresponding octet is in the network number."

    as per the question the networks are 10.1.1.1, 10.1.100.1 and 10.1.120.1


    the option in the answers is not there but the correct one must be

    network 10.1.0.0 0.0.255.255 area 0

    or

    network 10.0.0.0 0.255.255.255 area 0

    am i right???
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    well you could read the the whole thread and answer that question.
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • bohra_ajaybohra_ajay Member Posts: 21 ■□□□□□□□□□
    Netstudent wrote:
    well you could read the the whole thread and answer that question.

    got it right now dude....

    i was thinking of this all nite n early this morning i woke up to check that i was not right abt the masks....

    in this case B is the best choice....
  • jadenblissjadenbliss Member Posts: 7 ■□□□□□□□□□
    For B the wild card mask is 10.0.0.0 0.255.255.0 that means all addresses have to have a 10 in the first octet and a 0 in the last. All the addresses in the question start with 10 but they do not end with 0 so this mask would not match any of them.

    If u find this query foolish then i'm sorry in advance but the question thats ticking in my mind is that how can the mask 0.255.255.0 means all addresses have to have 10 in first octet and 0 in the last octet.

    either it should mean 0 in the first octet and zero in the last octet or
    it should also support 10 in the first and <b> 1 in the last octet </b> as one is common in the above given ip addresses.
  • kryollakryolla Member Posts: 785
    jadenbliss wrote: »
    If u find this query foolish then i'm sorry in advance but the question thats ticking in my mind is that how can the mask 0.255.255.0 means all addresses have to have 10 in first octet and 0 in the last octet.

    either it should mean 0 in the first octet and zero in the last octet or
    it should also support 10 in the first and <b> 1 in the last octet </b> as one is common in the above given ip addresses.

    The IP is 10.0.0.0 with an inverse mask of 0.255.255.0 so that mean the first and last octet has to match which is 10 and 0 the second and third octet can be anything.
    Studying for CCIE and drinking Home Brew
  • jadenblissjadenbliss Member Posts: 7 ■□□□□□□□□□
    kryolla wrote: »
    The IP is 10.0.0.0 with an inverse mask of 0.255.255.0 so that mean the first and last octet has to match which is 10 and 0 the second and third octet can be anything.

    Thanks a lot kryolla i totally got what u wanted to say

    Now i u clearly understand why network 0.0.0.0 255.255.255.255 area 0 could be the only ans to the above asked que

    Jaden icon_cheers.gif
  • cisconoobletcisconooblet Member Posts: 32 ■■□□□□□□□□
    In OSPF your wildcard mask must be all binary 0's followed by all 1's or vise versa. You can't do a mask of 0.255.255.0
    CCNA
    Network+
  • jadenblissjadenbliss Member Posts: 7 ■□□□□□□□□□
    In OSPF your wildcard mask must be all binary 0's followed by all 1's or vise versa. You can't do a mask of 0.255.255.0

    could'nt understand what u meant to say can u pls describe it. What do u mean by mask must be all binary 0's followed by all 1's ...??


    JAden icon_confused.gif:
  • kryollakryolla Member Posts: 785
    it has to be contigous
    Studying for CCIE and drinking Home Brew
  • jadenblissjadenbliss Member Posts: 7 ■□□□□□□□□□
    kryolla wrote: »
    it has to be contigous
    does this means that all the bits in an octet can be either 1 or 0

    and this is true for all the 4 octets icon_redface.gif

    Jaden
  • kryollakryolla Member Posts: 785
    it means you cant have 0,1,0s mixed
    Studying for CCIE and drinking Home Brew
  • jadenblissjadenbliss Member Posts: 7 ■□□□□□□□□□
    but in 0.255.255.0 we r not mixing 0's and 1's in an octet then why is it wrong??
  • cisconoobletcisconooblet Member Posts: 32 ■■□□□□□□□□
    Your looking at it from the octets point of view. You have to look at the whole mask in binary. 00000000000000001111111111111111 would be valid.


    00000000111111111111111100000000 would not be valid. You must have all 1's followed by all 0's or vise versa.



    0.255.255.255 valid
    0.0.0.255 valid
    255.0.0.0 valid

    0.255.255.0 NOT valid

    Answer B is the ONLY answer in the question with an invalid mask and should be crossed out in your mind as soon as you see it. The rest you have to decide if they work or not.
    CCNA
    Network+
  • blackngold4877blackngold4877 Member Posts: 19 ■□□□□□□□□□
    Your looking at it from the octets point of view. You have to look at the whole mask in binary. 00000000000000001111111111111111 would be valid.


    00000000111111111111111100000000 would not be valid. You must have all 1's followed by all 0's or vise versa.



    0.255.255.255 valid
    0.0.0.255 valid
    255.0.0.0 valid

    0.255.255.0 NOT valid

    Answer B is the ONLY answer in the question with an invalid mask and should be crossed out in your mind as soon as you see it. The rest you have to decide if they work or not.

    Right. You can't mix and match, it has to be your zeros and then your ones, it will never be zero one zero. For example, a network that spans 172.16.16.0-172.16.19.255 would be written "network 172.16.16.0 0.0.3.255" or written out in binary 00000000.00000000.00000011.11111111. The all zero octet is "must much" the all 1 octet is "I don't care." the third octet is a 3 because the network is 172.16.16.0 /22, the mask for /22 being 255.255.252.0. To find the wildcard mask subtract:

    255.255.255.255
    255.255.252.0

    = 0.0.3.255

    Hope that didn't make it more confusing.
  • creamy_stewcreamy_stew Member Posts: 406 ■■■□□□□□□□
    Wow, I hope this q doesn't come up when I take the exam!

    Entering answer a) into a recent IOS yields "network 10.0.0.0 0.255.255.255 area 0" in the running-config. I.e, IOS translates the subnet mask to a wildcard mask. As cisco exams afaik assume a recent IOS, this answer is the best one IMO. I learned about this trick here on techexams: http://www.techexams.net/forums/ccna-ccent/42143-ospf-question.html

    I haven't tried this on production router yet, but I just tried it in PT:
    (edit: Actually, come to think about it, I'm pretty sure I tried this on an 1812)
    ---
    --- System Configuration Dialog ---

    Continue with configuration dialog? [yes/no]: n


    Press RETURN to get started!



    Router>sh ip int brie
    Interface IP-Address OK? Method Status Protocol

    FastEthernet0/0 unassigned YES manual administratively down down



    Router>en
    Router#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    Router(config)#interface FastEthernet0/0.1
    Router(config-subif)#
    Router(config-subif)# encapsulation dot1Q 1
    Router(config-subif)#
    Router(config-subif)# ip address 10.1.1.1 255.255.255.0
    Router(config-subif)#
    Router(config-subif)#interface FastEthernet0/0.2
    Router(config-subif)#
    Router(config-subif)# encapsulation dot1Q 2
    Router(config-subif)#
    Router(config-subif)# ip address 10.1.100.1 255.255.255.0
    Router(config-subif)#
    Router(config-subif)#interface FastEthernet0/0.3
    Router(config-subif)#
    Router(config-subif)# encapsulation dot1Q 3
    Router(config-subif)#
    Router(config-subif)# ip address 10.1.120.1 255.255.255.0
    Router(config-subif)#
    Router(config-subif)#router ospf 1
    Router(config-router)#
    Router(config-router)# network 10.1.1.0 255.0.0.0 area 0
    Router(config-router)#^Z
    %SYS-5-CONFIG_I: Configured from console by console


    (Ok, let's do sh run. Notice how "network 10.1.1.0 255.0.0.0 area 0" turned into "network 10.0.0.0 0.255.255.255 area 0" in the config?)

    Router#sh run
    Building configuration...

    Current configuration : 589 bytes
    !
    version 12.2
    no service password-encryption
    !
    hostname Router
    !
    !
    !
    !
    !
    ip ssh version 1
    !
    !
    interface FastEthernet0/0
    no ip address
    duplex auto
    speed auto
    shutdown
    !
    interface FastEthernet0/0.1
    encapsulation dot1Q 1 native
    ip address 10.1.1.1 255.255.255.0
    !
    interface FastEthernet0/0.2
    encapsulation dot1Q 2
    ip address 10.1.100.1 255.255.255.0
    !
    interface FastEthernet0/0.3
    encapsulation dot1Q 3
    ip address 10.1.120.1 255.255.255.0
    !
    router ospf 1
    log-adjacency-changes
    network 10.0.0.0 0.255.255.255 area 0
    !
    ip classless
    !
    !

    <snip>


    (Oh, I forgot to enable the physical int)

    Router#conf t
    Enter configuration commands, one per line. End with CNTL/Z.
    Router(config)#int fa 0/0
    Router(config-if)#no shut

    %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
    %LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to up
    %LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up
    %LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up
    Router(config-if)#^Z
    %SYS-5-CONFIG_I: Configured from console by console
    Router#
    Router#sh ip ospf int
    FastEthernet0/0.1 is up, line protocol is up
    Internet address is 10.1.1.1/24, Area 0
    Process ID 1, Router ID 10.1.120.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State WAITING, Priority 1
    No designated router on this network
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06
    Index 1/1, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 1, maximum is 1
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0
    Suppress hello for 0 neighbor(s)
    FastEthernet0/0.2 is up, line protocol is up
    Internet address is 10.1.100.1/24, Area 0
    Process ID 1, Router ID 10.1.120.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State WAITING, Priority 1
    No designated router on this network
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06
    Index 2/2, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 1, maximum is 1
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0
    Suppress hello for 0 neighbor(s)
    FastEthernet0/0.3 is up, line protocol is up
    Internet address is 10.1.120.1/24, Area 0
    Process ID 1, Router ID 10.1.120.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State WAITING, Priority 1
    No designated router on this network
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06
    Index 3/3, flood queue length 0
    Next 0x0(0)/0x0(0)
    Last flood scan length is 1, maximum is 1
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0
    Suppress hello for 0 neighbor(s)

    Tadah! It works!
    Itchy... Tasty!
    [X] DCICN
    [X] IINS

    [ ] CCDA
    [ ] DCICT
Sign In or Register to comment.