|
|
Fixing a stubborn netmask setting
Okay, a little lesson in IP networking.
Those netmask numbers are really bits. Each of the 4 octets has 8 bits. Each one goes like so: 128 64 32 16 8 4 2 1 0 0 0 0 0 0 0 0Now, for the first example, let's look at your last octet. You had a .1, so the only bit you had turned on was the last one. 0 0 0 0 0 0 0 1Now, that would be cool if it were an IP address, but netmasks are different. You're specifying at what point you're going to start paying attention to the address as yours, because you're doing a variable length subnet. (Uh...layman's terms......might be instead of specifying what state you're in, or what town you're in, or even what street you're on, you're giving an exact house number. I could tell you I live at 211, but what 211? You don't know without the other info, but if you're already at the right street, in the right city, in the right state, all you care about is 211. That's what the netmask is for.) So we have this: State.City.Street.Number or, in network-ese Network.Network.Network.Host That's called a class C. In our above example, that give you all bits turned on in the first three octets. 8+8+8, a /24. Or if you add the values of those bits together, 255.255.255.0. Okay, so what happens if you want to split your street up into blocks? I want to be able to talk to everyone else on my block, but not everyone on the street, because the guys three blocks down are morons. :P Well, then you a varlable length subnet. You start stealing host bits (bits that belong to the hosts...the computers on your network) and give them to the network so that you can further segment things. The last octet looks like this without the variable length subnet:
| H H H H H H H H | 128 64 32 16 8 4 2 1 | 0 0 0 0 0 0 0 0Well, okay, so we want to let just the guys on my block talk to one another. There's 10 guys on each block that want to talk to one another, so we need to solve for this equation: H stands for host bits
2^H >= 10 Okay, so we need 3 host bits to service my block, the rest go to the network:
N N N N N | H H H 128 64 32 16 8 | 4 2 1 1 1 1 1 1 | 0 0 0That gives us a last octet of 128+64+32+16+8, or 255.255.255.248, or 8+8+8+5, /29. In your situation you have 255.255.255.1. Looking above where our network/host split happen...that's not possible. You can't have a .1 as a netmask. The 'smallest' number you can have in a non-zero octet is 128, because that's the first bit to get turned on. More than likely you were pinging yourself, not your router. Why on earth OS X's IP stack did that to you I don't know, but I suspect had you pinged your router, then did an arp -a, the hardware (mac) address for your router would have been the same as your NIC's. Okay, you can all go take your CCNA's. Hope you pass. ;)
Fixing a stubborn netmask setting
A netmask like the above would tend to deny access to every other host on your local LAN - although would be very dependent upon the implementation of the IP stack.
Fixing a stubborn netmask setting
Most likely this is minor bug in the GUI where you set the mask.
Fixing a stubborn netmask setting
I agree that it's likely a bug in the GUI. If I ever come across this again, I think I would have a look at the
ifconfig -a output, and see if I can fix it there.
P.S. I'm a network engineer by trade, so imagine my surprise when I saw 255.255.255.1 for a netmask. ---
Fixing a stubborn netmask setting
Numbski wrote:
Network.Network.Network.HostDoes the CCNA test ask the difference between "/24" and "class C"? :) For clarification, all class C addresses are defined to fall in the IP address range 192.0.0.0 - 223.255.255.255. Networks that use class C addresses should use a /24 netmask (255.255.255.0). In contrast, not all /24 networks need to fall in class C address space. Class A (1.0.0.0 - 126.255.255.255) and class B (128.0.0.0 - 191.255.255.255) addresses can be subnetted using /24 netmasks if the network equipment supports CIDR. (And if your gear doesn't do CIDR, try to sell it! :) Apple's corporate network would have melted by now if they haven't subnetted their class A. --- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.14 seconds |
|