CPSC 3600 - DAY 18 APRIL 17, 2017 ================================================================================ INTERNET ADDRESSING ------------------- The move to IPv6 IPv4 has been extremely successful Accommodated heterogeneous networks, dramatic changes in hardware, and extreme increases in scale Why change to IPv6? Larger addresses were needed to accommodate continued growth of the internet IPv4 only uses a small number 32 bits vs 128 bits IPv6 IP Addressing Scheme When sending a packet across the internet, the sender must specify its own IP address (the source address) as well as the address of the intended recipient The IP address is a unique binary number assigned to a host and used for all communication with the host Each IP address is divided into a prefix and suffix Prefix identifies physical network computer is attached Suffix identifies a specific computer within that network BITS 0 1 2 3 4 8 16 24 31 +-+--------+----------------------------------------------------+ CLASS A |0| PREFIX | SUFFIX | +-+--------+----------------------------------------------------+ +-+-+--------------------+--------------------------------------+ CLASS B |1|0| PREFIX | SUFFIX | +-+-+--------------------+--------------------------------------+ +-+-+-+---------------------------------+-----------------------+ CLASS C |1|1|0| PREFIX | SUFFIX | +-+-+-+---------------------------------+-----------------------+ +-+-+-+-+-------------------------------------------------------+ CLASS D |1|1|1|0| MULTICAST ADDRESS | +-+-+-+-+-------------------------------------------------------+ +-+-+-+-+-------------------------------------------------------+ CLASS E |1|1|1|1| RESERVED (NOT ASSIGNED) | +-+-+-+-+-------------------------------------------------------+ IPV4 DOTTED DECIMAL NOTATION IPv4 addresses are 32 bit numbers, but users do not enter or read the values in binary. When user interaction occurs, for user convenience, software uses whats called dotted decimal notation Dotted decimal notation expresses each 8-bit section of a 32 bit number as a decimal value and uses period to seperate sections Each octet (8-bit) value is treated as an unsigned binary integer, which ranges from 0 to 255 Classless addressing uses a variable number of bits for the network and host portions of the address. ADDRESS MASKS Classless and subnet addressing schemes require hosts and routers that process addresses to store a value that specifies the exact boundry between the network prefix and the host suffix To mark the boundry, IPv4 uses a 32 bit value known as an addres mask An address mask has one bit to mark the network prefix and zero bits to mark the host portion Routers use the conditon N == (D&M), where N is the network prefix, D is the destination address and M is the address mask This condition tests whether the destination lies on the specified network DEST: 10000000 00001010 00000010 00000001 MASK: 11111111 11111111 00000000 00000000 ----------------------------------- AND: 10000000 00001010 00000000 00000000 Destination address (128.10.2.1) and address mask (255.255.0.0) CIDR NOTATION AND IPV4 Classless addressing is formally known as CIDR (Classless Inter-Domain Routing) CIDR only specifies addressing and forwarding CIDR Notation: An address and mask can be specified using dotted decimal and using a slash and msk Assume an ISP has the following address block available: 128.211.0.0/16 Suppose the ISP has two customers. One needs 12 IP addresses and the other needs 9. The ISP can assign one customer the prefix: 128.211.0.16/28 Also can assign the other customer prefix: 128.211.0.32/28 Both customers have the same mask size and can allocate 14 addresses (network avoids using highest and lowest host addresses), but they retain unique prefixes The ISP still retains most of the IP addresses and can allocate them to other customers SPECIAL IPV4 ADDRESSES +-------------+-----------+--------------------------+------------------------+ | Prefix | Suffix | Type of Address | Purpose | +-------------+-----------+--------------------------+------------------------+ | all 0s | all 0s | this computer | used during bootstrap | +-------------+-----------+--------------------------+------------------------+ | network | all 0s | network | identifies a network | +-------------+-----------+--------------------------+------------------------+ | network | all 1s | directed broadcast | broadcast on spec. net | +-------------+-----------+--------------------------+------------------------+ | all 1s | all 1s | limited broadcast | broadcast on local net | +-------------+-----------+--------------------------+------------------------+ | 127/8 | any | loopback | testing | +-------------+-----------+--------------------------+------------------------+ NETWORK ADDRESS TRANSLATION (NAT) Allows for multiple computers to share a single IP address Appears to be a normal connection from the outside world (ie Normal TCP/IP software) SRC = 128.210.24.6 SRC = 192.168.0.1 DST = 198.133.219.25 DST = 198.133.219.25 <---------- <----------- NAT +---------+ INTERNET <--------------------| |-------------------------> HOST +---------+ 128.210.24.6 -----------> -----------> SRC = 192.133.219.25 SRC = 198.133.219.25 DST = 128.210.24.6 DST = 192.168.0.1 Network Address and Port Translation (NAPT) allows an arbitrary number of applications on an arbitrary number of hosts communicating with arbitrary destinations. IPV6 Similarities with IPV4 Assigns a unique address for a connection between a computer and a physical network Seperates addresses into prefixes and suffixes Differences from IPV4 IPv6 addresses have a 3 level hierarchy First: k bit global prefix (organization) Second: 64-k bit subnet (network) Third: 64 bit interface (computer) Uses colon hexadecimal notation