Sunday, 18 March 2018

IP address


IPv4
  • Address is 32 bit
  • RIRs are exhausting their pools of assignable IP addresses
  • NAT is omnipresent

IPv4 - unicast link local address
  • Must not be routed (link only)
  • May be self-assigned (e.g. when no DHCP)
  • Range
    • 169.254.0.0 - 169.254.255.255 (169.254/16 prefix)
  • Should be dropped if anything else is available (unlike IPv6)

IPv4 - unicast local address (private address)
  • May be routed internally but not on public internet
  • Defined in RFC 1918
  • Ranges
    • 10.0.0.0 - 10.255.255.255 (10/8 prefix)
    • 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
    • 192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

IPv4 - subnetting
  • Splitting a single range into logical groups (subnets)
  • IP address has NetworkId (Street Name) and HostId (Building Number) part
  • /16 address range can have 2^16 hosts
    • 2^0 = 1 subnet of /16 = 65636 hosts
    • 2^1  = 2 subnets of /17 = 32768 hosts
    • 2^2 = 4 subnets of /18 = 16384 hosts
    • 2^3 = 8 subnets of /19 = 8192 hosts
    • 2^4 = 16 subnets of /20 = 4096 hosts
    • 2^5 = 32 subnets of /21 = 2048 hosts
    • 2^6 = 64 subnets of /22 = 1024 hosts
    • 2^7 = 128 subnets of /23 = 512 hosts
    • 2^8 = 256 subnets of /24 = 256 hosts
    • 2^9 = 512 subnets of /25 = 128 hosts
    • 2^10 = 1024 subnets of /26 = 64 hosts
    • 2^11 = 2048 subnets of /27 = 32 hosts
    • 2^12 = 4096 subnets of /28 = 16 hosts (smallest possible VPC subnet)
    • 2^13 = 8192 subnets of /29 = 8 hosts
    • 2^16 = 65536 subnets of /32 = 1 host

IPv5
  • Compatible with IPv4
  • Had Quality of Service (QoS) built-in
  • Never became standard

IPv6
  • Successor of IPv4
  • Address is 128 bit
  • End-to-end connectivity 
    • No need for NAT



IPv6 - unspecified address
  • :: (all zeroes)
  • Indicates lack of address
  • Used in Duplicate Address Detection (DAD)
    • Source: 0:0:0:0:0:0:0:0
    • Target: desired address

IPv6 loopback address
  • talk to myself

IPv6 - unicast link local address
  • required (unlike IPv4)

IPv6 - unicast local address
  • Possible but discouraged
    • Break end-to-end connectivity 

IPv6 - unicast global address
  • Recommended way of addressing
  • AWS assigns by DHCP

IPv6 - prefixes
  • Counterpart of IPv4 subnetting
  • Typically
    • First 64 bits are network
    • Last 64 bits are host

IPv6 - notation
  • 8 groups of 4 hexadecimal characters
    • 8 groups of "hextet"
  • Leading consecutive "0" may be omitted
  • 0000:0000:0000 = ::
  • Example
    • 2001:0000:0eab:DEAD:0000:00A0:ABCD:004E

References

No comments:

Post a Comment