Internet Infrastructure IPv4 & IPv6 Eric Malmström eric.malmstrom@globalone.net Slide 1 Background mid 1970 DARPA finances research on packet switching networks p-p networks, packet radio and satellite comm. implementation of TCP/IP in Arpanet 1980-1983 Internet = Arpanet + Milnet DARPA finances TCP/IP --> Berkeley Unix large popularity in the university environment Slide 2 Page 1
Internet organisation IAB - Internet Architecture Board IETF - Internet Engineering Task Force ISOC - Internet Society IANA - Internet Assigned Numbers Authority Standardisation through RFC - Request For Comment All standards are RFCs Not all RFCs are standards Coordination with ISO Slide 3 TCP/IP (Internet) services Network layer services connectionless packet forwarding independent of network technology universal connectivity Transport layer services connection oriented "reliable transport service" end-to-end handshaking Application services electronic mail file transfer terminal access informations services Weight more and more on applications new tools for finding and using Internet resources Slide 4 Page 2
Overview TCP/IP protocols Simplified overview Application Telnet FTP SMTP WWW TFTP NFS SNMP Presentation Session Transport TCP UDP Network IP and ICMP X.25 Data Link Physical Ethernet Token Ring FDDI V.24 HDLC V.35 Slide 5 IPv4 - Internet Protocol Logical addressing for routing at network layer Network routing through 32-bit logical address (IP-address) containing network address and host address Only error control is checksum IP hides differences between different media from higher layer protocols Fragmentation of datagrams ( when two interconnected networks cannot handle datagrams of the same size, e.g. Ethernet and X.25 ) Slide 6 Page 3
IPv4 datagram 0 4 8 16 19 24 31 Vers IHL Service Type Total length Identification Flags Fragment Offset Time To Live Protocol Header Checksum IP options (if any) Source IP Address Destination IP Address DATA... Padding VERS: IP protocol version (=4) IHL: Header Length IDENT: Identifies fragments of the same datagram FLAGS: DF MF DF: Don t Fragment MF: More Fragments Slide 7 IP-address IP-address is 32 bits, i.e. 4 bytes Global hierarchical address coordination IANA -> RIPE -> Local-IR for addresses in Sweden IP-address 32 bits can de divided in several ways between network and host address Class A 0 Network Host 1.0.0.0-127.255.255.255 Class B 1 0 Class C 1 1 0 Network Network Host Host 128.0.0.0-191.255.255.255 192.0.0.0-223.255.255.255 Slide 8 Page 4
Multicast applications - one-to-many, many-to-many video conference resource discovery stock exchange information... uses Class D addresses 1 1 1 0 Multicast address 224.0.0.0-239.255.255.255 Slide 9 Subnetting AA BB CC DD Subnetting: a method for an organisation to divide its IP-network into several administratively separated subnetworks Host part of address partitioned in subnet address and host address E.g. Class B address divided in 256 subnets with 254 host addresses each Network Subnet Host Slide 10 Page 5
Subnet mask Border between subnet and host defined by subnet mask. Border can be chosen freely. Subnet mask 255.255.255.0 or /24 Network Subnet Host 1 1 1 1 1 1 1 1.1 1 1 1 1 1 1 1.1 1 1 1 1 1 1 1.0 0 0 0 0 0 0 0 Subnet mask 255.255.255.192 or /26 Network Subnet Host 1 1 1 1 1 1 1 1.1 1 1 1 1 1 1 1.1 1 1 1 1 1 1 1.1 1 0 0 0 0 0 0 Slide 11 Subnet mask example Network 185.150.0.0 Subnet 185.150.1.0 Subnet mask 255.255.255.0 Outside world Subnet 185.150.2.0 185.150.1.35 185.150.2.8 Router Subnet 185.150.25.0 Router 185.150.1.1 185.150.1.10 185.150.25.1 185.150.25.2 185.150.2.1 185.150.2.5 Slide 12 Page 6
Variable Length Subnet Mask Routing protocol must transfer mask information (not only network number) and aggregate subnets Outside world Subnet 185.150.0.0 Mask 255.255.240.0 Subnet 185.150.1.0 Mask 255.255.255.0 Subnet 185.150.2.0 Mask 255.255.255.0 Router Subnet 185.150.15.16 Mask 255.255.255.252 Router address 185.150.15.17 Mask 255.255.255.252 address 185.150.15.18 Mask 255.255.255.252 Slide 13 Problems with IP-addresses Three main problems: would have run out of B-addresses by start of 1995 if nothing done if C-addresses allocated instead, routing tables in Internet backbone routers will overflow in the long term we will run out of IP-addresses Solutions CIDR, Classless Inter-Domain Routing Geographical allocation of network addresses Stricter rules to get a network address New IP-addresses (IPng / IPv6) Slide 14 Page 7
CIDR - Classless Interdomain Routing Internet 194.65.128.0/17 Swedish Internet operator 194.65.128.0/22 194.65.132.0/24 194.65.128.0-194.65.131.0 194.65.132.0 194.65.192.0/18 194.65.192.0-194.65.255.0 Company A Organisation B Company X Slide 15 Firewalls packet filters application gateway network address translator (NAT) adds security preserves address space Slide 16 Page 8
Private address space Addresses reserved for company internal networks (Private internets) These networks will not be routed in the Internet 10.0.0.0-10.255.255.255 172.16.0.0-172.31.255.255 192.168.0.0-192.168.255.255 Slide 17 IPv6 Design goals support billions of hosts reduce size of routing tables simplify header: routers process packets faster better security allow future protocol evolution Type Of Service (support for real-time data) aid multicasting permit old and new protocol coexistence allow host to roam without changing address Goal met 16 byte address address space handling 7 fields in header and extension headers authentication and privacy extension headers flows, priority scope, group type only minor changes needed to ICMP, ARP, RARP, DNS,... not in protocol Slide 18 Page 9
IPv6 Header 0 4 8 16 24 31 Version Priority Flow label Payload length Next header Hop limit Source Address (16 bytes) Destination Address (16 bytes) Version=6 Prio: 0-7 flow controllable, 8-15 constant send rate Flow label: traffic flow as vitual circuit Next header: IP extension header or layer 4 protocol Slide 19 Comparison IPv4 <-> IPv6 0 31 Vers IHL Service Type Total length Identification Flags Fragment Offset Time To Live Protocol Header Checksum Source IP Address (4 bytes) Destination IP Address (4 bytes) IP options (if any) Padding 0 31 Version Priority Flow label Payload length Next header Hop limit Source Address (16 bytes) Destination Address (16 bytes) Slide 20 Page 10
Packet sizes and fragmentation Minimum link MTU = 576 bytes Expectation: end systems perform MTU discovery Fragmentation generally discouraged Routers do not fragment en-route packets Maximum packet payload 65536 bytes (16 bit field) Provision for jumbograms (hop-by-hop option) Slide 21 IPv6 addresses Prefix (byte 1) Usage 0000 0000 Reserved incl IPv4 0000 0001 unassigned 0000 001 OSI NSAP addr. 0000 010 Novell IPX addr. 0000 011 unassigned 0000 1 unassigned 0001 unassigned 001 unassigned 010 Provider-based addresses 011 unassigned Prefix Usage 100 Geographicbased addresses 101 unassigned 110 unassigned 1110 unassigned 1111 0 unassigned 1111 10 unassigned 1111 110 unassigned 1111 1110 0 unassigned 1111 1110 10 Link local use addr. 1111 1110 11 Site local use addr. 1111 1111 Multicast E.g. 8000:0000:0000:0000:0123:4576:89AB:CDEF or 8000::123:4576:89AB:CDEF IPv4 address ::192.31.20.46 Slide 22 Page 11
IPv6 - router packet handling Routers process packets faster fewer fields in header reduction of routing table size no IP checksum calculation introduction of Flow concept (similar to VC) better support for options, easier for routers to skip non-relevant options Slide 23 IPv6 - Extensions Optional linked list of Extension headers Hop-by-hop options (info for routers) e.g. jumbogram Routing (route to follow) strict or loose Fragmentation (hosts only) Authentication (for receiver) Encryption (between sender - receiver) Destination options (future developments) Slide 24 Page 12
IPv6 - Multicast Address prefix 1111 1111 followed by 4-bit Flag field permanent or transient multicast group 4-bit Scope field link, site, organisation, planet,... 112-bit (14 byte) group identifier Slide 25 ICMP - Internet Control Message Protocol protocol for error reporting IP-to-IP reports errors back to source/sender Test reachability Non-deliverable datagram Flow control Change routing Ask for subnet mask Routing loops Echo Request, Echo Reply Destination Unreachable Source Quench Redirect Address Mask Request & Reply Time exceeded Slide 26 Page 13
Ex: Traceroute www.ntt.co.jp traceroute to www.ntt.co.jp (210.173.163.201), 30 hops max, 40 byte packets 1 v1-car-sto-e3.global-ip.net (194.52.237.241) 4 ms 2 ms 3 ms 2 v100-bar-sto-fe0-1-0.global-ip.net (194.52.1.55) 3 ms 2 ms 3 ms 3 gip-stkh-bar-2-fe1-0-0.gip.net (195.17.9.244) 3 ms 2 ms 3 ms 4 gip-arch-3-atm5-0-0-744-aal5.gip.net (204.59.5.101) 60 ms 58 ms 60 ms 5 gip-penn-6-pos1-0.gip.net (204.59.138.21) 128 ms 127 ms 128 ms 6 gip-penn-2-pos8-0-0.gip.net (204.59.138.14) 128 ms 128 ms 128 ms 7 sprint-nap.iij.net (192.157.69.65) 148 ms 149 ms 145 ms 8 216.98.96.249 (216.98.96.249) 150 ms 150 ms 153 ms 9 Osaka-ibb0.IIJ.Net (202.232.0.225) 327 ms 325 ms 309 ms 10 202.232.0.145 (202.232.0.145) 338 ms 322 ms 315 ms 11 202.232.3.186 (202.232.3.186) 335 ms 319 ms * 12 mfeedgw.iij.net (202.232.9.34) 337 ms 337 ms 382 ms 13 IIJ-a-gate.mfeed.net (210.173.161.73) 318 ms 337 ms 338 ms 14 * * * 15 * * * > Slide 27 ARP - Address Resolution Protocol ARP maps logical IP-address (network address) to physical Ethernet address. ARP sends BROADCAST containing IPaddress. (Who has IP-address xyz?) Host with IP-address xyz answers with its physical Ethernet address. Hosts build table of IP - Ethernet address mapping (ARP table) Slide 28 Page 14
RARP - Reverse ARP RARP uses physical Ethernet address to find logical IP-address Used for example for nework loading of diskless workstations work station and RARP-server must be on the same network ARP and RARP are link layer frame types Slide 29 DNS - Domain Name Service hierarchical domain-based naming structure distributed database system maps names to information IP-address mail host... enables name-based addressing (ASCII strings instead of binary addresses) Function: (name) (name) application resolver name server(s) (info) (info) Slide 30 Page 15
DNS Name Space countries (unnamed root) generic us nu... se edu com gov mil net globalone volvo ericsson uu hosts adb docs udac hosts Slide 31 Name server & resolver name space divided into Zones each zone has Name servers, one primary and one or several secondaries Recursive query (name) (name) (name) Resolver Name Server Name Server Name Server (info) (info) (info) Non-recursive query (name) Resolver Name Server (next NS) (name) Resolver (next NS) Resolver (name) (info) Name Server Name Server Slide 32 Page 16
DNS - example DNS Name server Outside world (2)" What is IP-address of www.ftg.se? Router (4) http 185.150.23.4 (3) "www.ftg.se has address 185.150.23.4" (1) http://www.ftg.se Slide 33 DNS resource records Main DNS resource record types Type Meaning Value SOA Start Of Authority Parameters for zone A IP Address of host IP-address MX Mail exchange Prio, mail accepting host NS Name Server Name server for domain CNAME Canonical Name Alias name PTR Pointer Alias for IP-address HINFO Host info CPU and OS in ASCII TXT Text ASCII text Slide 34 Page 17
DNS and e-mail DNS Name server Outside world (2)" What is MX-data for xyz.se?" Router (4) smtp 185.150.23.34 (3) "xyz.se has MXaddress mail.xyz.se and is reached with SMTP" (1) mail kalle.svensson@xyz.se Slide 35 PPP - Point to Point Protocol PPP standard for communication over serial lines (point-to-point) used e.g. between routers from different vendors transmits layer 3 protocol data and transparent bridging over WAN-link PPP has 16-bit protocol identifier Predecessor: SLIP - Serial LIne IP Slide 36 Page 18
Host configuration Alternatively DHCP Dynamic Host Configuration Prot. Config file: Name server(s) Mail server News server Modem Received through PPP: IP-address Subnet mask Router IP-addr. DNS server Config file: IP-address Subnet mask Router IP-addr. Name server(s) Mail server News server Phone net PSTN/ISDN Modem pool Access server 192.52.254.0/24 Router Name / Mail / News Server(s) Authentication Internet Slide 37 Page 19