we know that an ipv4 address is written in dotted decimal format so it is easier for humans to perceive it... 32 bits of 4 8 bit octets... but that is not the router's perception of the address; the router interprets the ipv4 address, not as four one byte octets, but as a single binary string...
so 10.1.1.1 is actually 167837953 in decimal and binary
00001010 00000001 00000001 00000001
the router doesn't see the dots, or the spaces, nor does it care about the decimal equivalent...
the router sees this:
00001010000000010000000100000001
bit count format v decimal (default)
dls1#term ip netmask-format decimal
dls1#sh ip route 172.16.100.0
Routing entry for 172.16.100.0 255.255.255.0
Known via "connected", distance 0, metric 0 (connected, via interface)
Routing Descriptor Blocks:
* directly connected, via Vlan100
Route metric is 0, traffic share count is 1
dls1#term ip netmask-format bit-count
dls1#sh ip route 172.16.100.0
Routing entry for 172.16.100.0/24
Known via "connected", distance 0, metric 0 (connected, via interface)
Routing Descriptor Blocks:
* directly connected, via Vlan100
Route metric is 0, traffic share count is 1
No comments:
Post a Comment