| Previous Post | Top | Next Post |
TOC
Here is a memo of me trying to understand typical IP address usages on typical desktop systems.
IPv4 and IPv6 basics
-
IPv4
- 8 bit * 4 = 32 bit address space (2^32 addresses)
- Loopback: IP block=
127.0.0.0/8(2^24 addresses) for localhost. - Multicast IPv4 address block =
224.0.0.0/4- mDNS: IP=
224.0.0.251, UDP, port=5353
- mDNS: IP=
- Link-local address: IP block=
169.254.0.0/16(2^16 addresses) - Private IPv4 network
10.0.0.0/8–1x Class A network with2^24=16777216addresses172.16.0.0/12–2**4=16x Class B networks, each with2^16=65536addresses192.168.0.0/16–2**8=256x Class C networks, each with2^8=256addresses
-
IPv6
- 16 bit * 8 = 128 bit address space (2^128 addresses)
- Loopback: IP=
::1for localhost. - Multicast IPv6 address block =
ff00::/8- mDNS: IP=
ff02::fb, UDP, port=5353
- mDNS: IP=
- Link-local address: IP block=
fe80::/10(high 10 bits are IANA global ID, mid 54 bits are 0, low 64 bits are interface ID) - Private IPv6 network
fc00::/7–2^16bits for subnet ID x subnet with2^64addresses
For more, read zero-configuration networking.
My /etc/hosts on hostname goofy has:
127.0.0.1 localhost
127.0.1.1 goofy
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Corresponding binary, hexadecimal, and decimal numbers
- Notable even numbers
0b00000000 = 0x00 = 00b00010000 = 0x10 = 160b00100000 = 0x20 = 320b01000000 = 0x40 = 640b10000000 = 0x80 = 1280b10101000 = 0xa8 = 1680b11000000 = 0xc0 = 1920b100000000 = 0x100 = 256
- Notable odd numbers (above even number -1)
0b00001111 = 0x0f = 150b00011111 = 0x1f = 310b00111111 = 0x3f = 630b01111111 = 0x7f = 1270b10100111 = 0xa7 = 1670b10111111 = 0xbf = 1910b11111111 = 0xff = 255
- Notable negative numbers
0b11111100 = 0xfc = 252=-40b11111101 = 0xfd = 253=-30b11111110 = 0xfe = 254=-20b11111111 = 0xff = 255=-1
| Previous Post | Top | Next Post |