OSPF Wildcard Mask

JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
What range of networks will be advertised in the OSPF updates by the command Router1(config-router)# network 192.168.0.0 0.0.15.255 area 100?

192.168.0.0/24 through 192.168.0.15/24
192.168.0.0/24 through 192.168.15.0/24
192.168.15.0/24 through 192.168.31.0/24
192.168.15.0/24 through 192.168.255.0/24
192.168.16.0/24 through 192.168.255.0/24

I know that 0.0.15.255 corresponds to a subnet mask of 255.255.240.0 because the math is:

255.255.255.255
- xxx.xxx.xxx.xxx (subnet mask)
_______________
0.0.15.255 (wildcard mask)

So in the first octet 255-x=0 (x=255), in the second octet 255-x=0 (x=255), in the third octet 255-x=15 (x=240) and in the final octet 255-x=255 (x=0).

Ok, I'm all set on the math with wildcard masks. Now, I know that a subnet mask of 255.255.240.0 has an increment of 16. But I'm still not sure how the answer (bolded above) is derived. Any help would be greatly appreciated.

Comments

  • Excellent1Excellent1 Member Posts: 462 ■■■■■■■□□□
    As you said, the /20 mask (255.255.240.0) gives you an increment of 16, or your "block size". Given that the initial network is 192.168.0.0, the 16 block size in the 3rd octect means your network range is 192.168.0.0 to 192.168.15.255, with 192.168.16.0 being the network number for the next subnet that isn't being advertised. Keep in mind, this is a summary advertisement, which basically advertises a range of subnets.

    If you haven't already, check out the subnetting made easy post here and go through that. Subnetting really is one of those things you have to practice a while, then you'll know it like the back of your hand.
  • Excellent1Excellent1 Member Posts: 462 ■■■■■■■□□□
    I guess to clarify a little more, what that command is doing is essentially adding advertisements for multiple /24 networks:

    192.168.0.0 through 192.168.0.255 (255.255.255.0 mask)
    192.168.1.0 through 192.168.1.255 (255.255.255.0 mask)
    192.168.2.0 through 192.168.2.255 (255.255.255.0 mask)
    ...
    192.168.15.0 through 192.168.15.255 (255.255.255.0 mask)

    The command "network 192.168.0.0 0.0.15.255 area 100" advertises all of these at once in a summary. Hopefully that makes sense. I'm not exactly the world's foremost expert, so maybe someone can clarify it a little better.
  • JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
    I get subnetting, just having a hard time with the "weird" look of wildcards, although they both mean the same thing. Doing this out in binary helped me:


    11000000.10101000.00000000.00000000 (192.168.0.0)
    11111111.11111111.11110000.00000000 (255.255.240.0 ... 0.0.15.255)

    The only bits that can change are the network bits in the 3rd octet which can be arranged as:

    0000
    0001
    0010
    0011
    .
    .
    .
    1111

    From 0 through 15. So the summarization is of networks:

    192.168.1.0
    192.168.2.0
    .
    .
    .
    192.168.14.0
    192.168.15.0

    I just wish I could do this faster in my head.
  • Excellent1Excellent1 Member Posts: 462 ■■■■■■■□□□
    Nice, sounds like you got it down. To be honest, you already have it made--all you have to do now is practice. Once you get it, you get faster with practice. One thing I would suggest--leave binary behind if you can. Once you understand the binary ANDing process, use the shortcuts to do it in your head, i.e., subtract the octet value from 256 to get your block size, etc.

    One of the sites that I think is great for this is Practice Subnet Skills: Summarize a VLSM Network This site lets you practice the basics (network address / broadcast address), as well as VLSM, etc. Rather than having to come up with your own problems, you can just practice and work on your speed. There are a lot of sites out there, but this one has everything I needed--it might or might not suite your needs. Good luck.
  • JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
    Thanks Excellent1. I'll give that site a try. I appreciate your responses. :)
  • Excellent1Excellent1 Member Posts: 462 ■■■■■■■□□□
    No worries, I'm learning too. Lot of good information on this site and a lot of folks with a lot of experience. Also, there is a thread about it here, but as a heads up, there are free streaming videos from INE available through the end of the month: INE - Sign In You have to sign up, but the videos are decent supplemental info.
  • MrXpertMrXpert Member Posts: 586 ■■■□□□□□□□
    Sorry to go slightly off topic, but with OSPF summarization, don't you need an additional special command to actually implement it? I don't think it works purely with the calculated wildcard masks. EIGRP uses the "ip summary-address eigrp" command and OSPF's uses?
    I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    Excellent1 wrote: »
    I guess to clarify a little more, what that command is doing is essentially adding advertisements for multiple /24 networks:

    Actually, to be perfectly clear, it's not doing that.

    What that command actually does is to tell OSPF to go look at the interfaces with IP's configured on them, and if they fall within the range covered by the ip and wildcard mark, activate those interfaces in OSPF. If you had no interfaces that fell within those ranges, then absolutely nothing would be advertised. If you had a single /24 that fell within that range, then only that /24 would be advertised.

    It's an important distinction - the subnets which are actually advertised into OSPF is entirely dependant on the interfaces configured IP and subnet mask. The only thing the network command does is provide a mask to limit which interfaces the OSPF process looks at when determining what to advertise.
  • Excellent1Excellent1 Member Posts: 462 ■■■■■■■□□□
    Actually, to be perfectly clear, it's not doing that.

    What that command actually does is to tell OSPF to go look at the interfaces with IP's configured on them, and if they fall within the range covered by the ip and wildcard mark, activate those interfaces in OSPF. If you had no interfaces that fell within those ranges, then absolutely nothing would be advertised. If you had a single /24 that fell within that range, then only that /24 would be advertised.

    It's an important distinction - the subnets which are actually advertised into OSPF is entirely dependant on the interfaces configured IP and subnet mask. The only thing the network command does is provide a mask to limit which interfaces the OSPF process looks at when determining what to advertise.

    Yeah, I figured someone would call me out on the distinction. My lack of specificity wasn't unintentional, as I was trying to use the same terminology as the test question referenced by the OP.

    That being said, I appreciate the response--many times you have contributed something to a thread that was all new material to me. In fact, there have been many times when I've been googling something for my lab or just a general question where you and a few others have been direct hits on those searches. It's kind of funny reading threads several years old and rediscovering things that are buried in the forums. Lot of good stuff here, for sure.
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    Excellent1 wrote: »
    Yeah, I figured someone would call me out on the distinction. My lack of specificity wasn't unintentional, as I was trying to use the same terminology as the test question referenced by the OP.

    Yup, I wasn't trying to call you out directly, or anything. I think the way the question was presented was bad, and if that's the exact question that was asked, I'd say the author may not have a very good understanding of OSPF. The implication in the question is that the command would advertise all the subnets covered by that command, which while it's technically possible, isn't usually the case, and leads to the perception that the network command determines advertisements, and not interface configuration. I could understand if someone new were to draw the implication that the network command could also do summarization in the context of that question.
    That being said, I appreciate the response--many times you have contributed something to a thread that was all new material to me. In fact, there have been many times when I've been googling something for my lab or just a general question where you and a few others have been direct hits on those searches. It's kind of funny reading threads several years old and rediscovering things that are buried in the forums. Lot of good stuff here, for sure.

    Yeah, that's one of the reasons I try and strive for technical accuracy on this forum when I answer a question. There are several threads on this forum which come up ranked very high in the search results for Google, and I don't like the idea of propagating bad information.
Sign In or Register to comment.