D C I P Slide 1
Datacommunication
Internet Infrastructure
IPv4 & IPv6
Eric Malmström
D C I P
Background
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
D C I P Slide 3
Internet organisation
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
TCP/IP (Internet) services
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
D C I P Slide 5
Overview TCP/IP protocols
Overview TCP/IP protocols
Simplified overview
V.24 Ethernet Token Ring
Physical Data Link Network Transport Session Presentation Application IP and ICMP Telnet FTP SMTP TCP UDP TFTP NFS SNMP V.35 FDDI X.25 HDLC WWW D C I P
IPv4 - I
nternetP
rotocolIPv4 - I
nternetP
rotocol• 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
D C I P Slide 7
IPv4 datagram
IPv4 datagram
Vers IHL Service Type Total length
Identification Flags Fragment Offset
Time To Live Protocol Header Checksum
Source IP Address Destination IP Address IP options (if any)
DATA . . .
Padding 0 4 8 16 19 24 31
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
IP-address
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
D C I P Slide 9
Multicast
Multicast
• applications -
one- to-many, many-to-many
– video conference – ”resource discovery” – stock exchange information – ....
• uses Class D addresses
224.0.0.0 - 239.255.255.255 1 1 10 Multicast address D C I P
Subnetting
Subnetting
• 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
AA BB CC DD
Host
Network Subnet
D C I P Slide 11
Subnet mask
Subnet mask
• Border between subnet and host defined by
subnet mask. Border can be chosen freely.
Host Network Subnet 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.0 or /24 Host Network Subnet 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 Subnet mask 255.255.255.192 or /26
Subnet mask example
Subnet mask example
D C I P Slide 13
Variable Length Subnet Mask
Variable Length Subnet Mask
Router Router Subnet 185.150.1.0 Mask 255.255.255.0 Subnet 185.150.15.16 Mask 255.255.255.252 Outside world Subnet 185.150.2.0 Mask 255.255.255.0 address 185.150.15.17
Mask 255.255.255.252 address 185.150.15.18Mask 255.255.255.252
Subnet 185.150.0.0 Mask 255.255.240.0
Routing protocol must transfer mask information (not only network number) and aggregate subnets
D C I P
Problems with IP-addresses
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
D C I P Slide 15
CIDR - Classless Interdomain Routing
CIDR - Classless Interdomain Routing
Internet
Swedish Internet operator
Company A Organisation B Company X
194.65.128.0 194.65.131.0 194.65.132.0 194.65.192.0 194.65.255.0 194.65.128.0/17 194.65.128.0/22 194.65.132.0/24 194.65.192.0/18
Firewalls
Firewalls
• packet filters • application gateway• network address translator (NAT)
• adds security
D C I P Slide 17
”Private address space”
”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 D C I P
IPv6
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 co-existence
• 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
D C I P Slide 19
IPv6 Header
IPv6 Header
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
Version Priority Flow label
Payload length Next header Hop limit
Source Address (16 bytes)
Destination Address (16 bytes)
0 4 8 16 24 31
Comparison IPv4 <-> IPv6
Comparison IPv4 <-> IPv6
Version Priority Flow label
Payload length Next header Hop limit
Source Address (16 bytes)
Destination Address (16 bytes)
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
D C I P Slide 21
Packet sizes and fragmentation
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)
D C I P
IPv6 addresses
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 Geographic-based 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
D C I P Slide 23
IPv6 - router packet handling
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
IPv6 - Extensions
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)
D C I P Slide 25
IPv6 - Multicast
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
D C I P
ICMP - I
nternetC
ontrolM
essageP
rotocolICMP - I
nternetC
ontrolM
essageP
rotocol• protocol for error reporting IP-to-IP • reports errors back to source/sender
• Test reachability Echo Request, Echo Reply
• Non-deliverable datagram Destination Unreachable
• Flow control Source Quench
• Change routing Redirect
• Ask for subnet mask Address Mask Request & Reply
D C I P Slide 27
Ex: Traceroute www.ntt.co.jp
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 * * * >
ARP - A
ddressR
esolutionP
rotocolARP - A
ddressR
esolutionP
rotocol• ARP maps logical IP-address (network
address) to physical Ethernet address.
• ARP sends BROADCAST containing
IP-address.
(Who has IP-address xyz?)
• Host with IP-address xyz answers with its
physical Ethernet address.
• Hosts build table of IP - Ethernet address
D C I P Slide 29
RARP - R
everseARP
RARP - R
everseARP
• 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
D C I P
DNS - Domain Name Service
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:
application resolver name server(s)
(name) (info)
D C I P Slide 31
DNS Name Space
DNS Name Space
us nu ... se edu com gov mil net
globalone volvo ericsson uu
adb docs udac
hosts hosts hosts hosts (unnamed root) countries generic
• name space divided into Zones
• each zone has Name servers, one primary and
one or several secondaries
Name server & resolver
Name server & resolver
Resolver Name Server Name Server Name Server
(name) (info) (name) (info) (name) (info)
Resolver Name Server
Resolver Name Server
D C I P Slide 33
DNS - example
DNS - example
Router DNSName server Outside world
(1) http://www.ftg.se (2)" What is www.ftg.se ? IP-address of (3) "www.ftg.se has address 185.150.23.4" (4) http 185.150.23.4 D C I P
DNS resource records
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
D C I P Slide 35
DNS and e-mail
DNS and e-mail
Router DNSName server Outside world
(1) mail [email protected] (2)" What is MX-data
for xyz.se?" (3) "xyz.se has MX- address mail.xyz.se and is reached with SMTP"
(4) smtp 185.150.23.34
PPP - P
oint toP
ointP
rotocolPPP - P
oint toP
ointP
rotocol• 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
D C I P Slide 37
Host configuration
Host configuration
Router