
for the range 0-1 andĪ standard way of representing this is with the lowest number from the to indicate the "unused"īit after the end of the prefix, we have 00. Now if we have two routing table entries, one for addresses 0 and 1,Īnd another for addreses 2 and 3, we can store them under the binary Given the numbers 0-7, we can represent them in binary as so: 0 000 Information, so we can use a form of radix tree to compress these Information is that adjacent addresses are likely to use the same Of the length of the routing table¹ prefixes.Ī naïve implementation of a routing table would list every possible IPĪddress so that, given any IP address, you'd look up that exact oneĪnd get back the routing information² associated with it.Ĭlearly some sort of compression is needed. What you're looking at are not subnet masks.

kinda need to better define what u mean by exist. The IP address and subnet mask (which is what you are dealing with) are two different although related things.Ĭan a host exist without a network id : can you exist without having a first and last name or without an address? yes the host can exist. What will its network id be: I assume you mean what will ip address be, and ip address will be whatever you set it to be. you can only talk to yourself if you don't have a gateway set up to reach outside that netmask. What does using /32 mean : I don't believe it is an invalid setting however it effectively turns off networking. with /32 it's just you.Ī subnet mask is a number that defines a range of IP addresses available within a network That means you can only have one ip address, on your network before needing a gateway/router to get outside that network. The /32 is the CIDR (shorthand) and refers to how many 1's are in the subnet mask. 31 addresses are also all host IDs with no reserved 0th address.Įasiest thing is web search and read articles related to subnet mask and subnet mask binary shorthand and CIDR In the case of /32, this doesn't apply as the address is both a network ID and host ID.

#POWER OF 2 TABLE SUBNETTING CHART MAC#
The "openwrt.lan" entry above (which I'm pretty sure is actually 192.168.1.1, just listed by name rather than number) says that it's routed via en0 to the MAC address 46:94:fc:63:fc:7. I don't know why macOS creates these redundant address-specific entries, but it's probably related to another thing you can see in the listing above: macOS lists its ARP table entries in the routing table. If you compare those /32 entries with the 192.168.1 entry, they're basically redundant duplicates they say the same thing, just about specific addresses instead of the entire network range. 192.168.1.1 and 192.168.1.125 are both specific addresses within that network range. This is the network that the Mac itself is on.

Note that 192.168.1 (short for 192.168.1.0/24) is routed over en0 (aka link#4) not via any gateway, just over the interface itself.

Let me add some lines before the ones you quoted: Destination Gateway Flags Refs Use Netif Expire Usually the two are the same (because you route a network or subnet as a unit, right?), but macOS does things a little different for other hosts on the same local network. There's a bit of confusion here that /32 doesn't refer to the size of any (sub)network, but to the range of addresses that particular routing table entry applies to.
