3. Internet Protocol: Connectionless Datagram Delivery Introduction

advertisement
Introduction
ƒ Internet architecture and philosophy
3. Internet Protocol:
Connectionless Datagram Delivery
Application Services
Reliable Transport Service
Connectionless Packet Delivery
Service
IP packet delivery service
•
•
•
•
•
최양희
서울대학교 컴퓨터공학부
1
Unreliable: lost, duplicated, delayed, or delivered out of order
Best-effort
Connectionless
Variable size datagrams
Data forwarding only (routing, error, and control by other
protocols)
2002 Yanghee Choi
IP Features
Router Features
ƒ Interconnecting end systems across multiple
networks
ƒ Implemented everywhere (end system, router)
ƒ High level protocol data encapsulated in IP Protocol
Data Unit (PDU)
ƒ IP version 4 now in service (rfc 791)
ƒ IP version 6 (IPv6) is coming (rfc 1883)
2002 Yanghee Choi
2
ƒ Coping with the differences among networks
• Addressing schemes
• Maximum packet size
• Hardware and software interfaces
• No assumption on network reliability
3
2002 Yanghee Choi
4
1
IP datagram
IP encapsulation
IP Header
HEADER
IP Data
DATA
Frame Header
2002 Yanghee Choi
5
Frame Data
2002 Yanghee Choi
Transmission across
Internet
6
IP Datagram Forwarding
ƒ Delivers datagrams to destination subnetwork
ƒ Routers maintain a routing table of next hops
ƒ Next hop field does not appear in the datagram
Net 1
Table at R2
2002 Yanghee Choi
7
2002 Yanghee Choi
R1
Net 2
Destination
Net 1
Net 2
Net 3
Net 4
R2
Net 3
R3
Net 4
Next Hop
Forward to R1
Deliver Direct
Deliver Direct
Forward to R3
8
2
Routing Table
IPv4 Datagram Format
ƒ IF ((Mask[I] & Destination_Address) = Destination [I])
Forward to NextHop [I]
30.0.0.7
40.0.0.8
0
4
8
VERS HLEN
128.1.0.9
16
30.0.0.0
R1
Net 2
40.0.0.0
40.0.0.7
R2
Net 3
128.1.0.0
128.1.0.8
R3
Net 4
FLAGS
TIME TO LIVE PROTOCOL
192.4.0.0
192.4.10.9
24
31
TOTAL LENGTH
IDENTIFICATION
Net 1
19
SERVICE
TYPE
FRAGMENT OFFSET
HEADER CHECKSUM
SOURCE IP ADDRESS
DESTINATION IP ADDRESS
Destination
30.0.0.0
40.0.0.0
128.1.0.0
192.4.10.0
Mask
255.0.0.0
255.0.0.0
255.255.0.0
255.255.255.0
Next Hop
40.0.0.7
Deliver Direct
Deliver Direct
128.1.0.9
2002 Yanghee Choi
IP OPTIONS (IF ANY)
...
9
2002 Yanghee Choi
IP Format
10
IP Format (cont’d)
ƒ Version (4 bits)
ƒ Internet Header Length (4 bits) : in 32-bit words
Min header is 5 words
ƒ Type of Service (8 bits)
Precedence, delay, reliability, throughput
ƒ Total Length (16 bits)
header + data in bytes, less than 64KB
ƒ Identifier (16 bits)
uniquely identifies the datagram during its life
ƒ Flags (3 bits)
More flag, No fragmentation
ƒ Fragment offset (13 bits) in units of 8 bytes
ƒ Time to live (8 bits) in router hops
2002 Yanghee Choi
PADDING
DATA
ƒ Protocol (8 bits)
Next level protocol to receive the data
ƒ Header Checksum (16 bits)
One’s complement sum of all 16-bit words in the header
ƒ Source Address (32 bits)
Original source. Does not change along the path
ƒ Destination Address (32 bits)
Final destination. Does not change among the path
ƒ Options (variable)
ƒ Padding (variable)
Makes header length a multiple of 4 bytes, zero is inserted
ƒ Data (variable)
Data + header < 65,535 bytes
11
2002 Yanghee Choi
12
3
Service Type
0
1
2
PRECEDENCE
3
4
5
D
T
R
6
DiffServ
7
0
UNUSED
7
Unused
CODEPOINT
D
low delay
T
high throughput
R
high reliability
Precedence=importance of datagram
===> hint to routing algorithm
2002 Yanghee Choi
6
5
64 different services
xxx000 for original definition
precedence 6 or 7 for routing traffic
13
2002 Yanghee Choi
14
Fragmentation
Fragmentation
ƒ Datagram Size, Network MTU, and Fragmentation
• MTU (maximum Transfer Unit): fixed upper bound on the amount
data that can be transferred in one physical frame
e.g.) Ethernet: 1500 octets, FDDI: 4470 octets
• Fragmentation: dividing large datagrams into smaller pieces when
the datagram needs to traverse a network that has a small MTU
• Fragments must be reassembled at the destination
• If any fragments are lost, the datagram cannot be reassembled.
• Reassembly timer : if expired, discard the received packets
ƒ Fragmentation control
HOST
A
HOST
B
Net 1
MTU=1500
R1
• IDENTIFICATION : identical to the fragments
• FLAGS: Don’t Fragment bit, More Fragments bit,
• FRAGMENT OFFSET : by 8 octets
Net 2
MTU=620
R2
Net 3
MTU=1500
ƒ No sequence number
2002 Yanghee Choi
15
2002 Yanghee Choi
16
4
Fragments
Datagram
Header
Data1
600 octets
Internet Datagram Options
ƒ Included primarily for network testing or debugging
ƒ Type(code)- Length-Value
ƒ Option code (1 octet)
Data2
Data3
600 octets 200 octets
0
1
2
3
COPY OPTION CLASS
Fragment 1
Data1
Header
600 octets
Fragment 1 (offset 0)
Fragment 2
Data2
Header
600 octets
Fragment 2 (offset 600)
Fragment 3
Data3
Header
200 octets
Fragment 3 (offset 1200)
2002 Yanghee Choi
17
4
5
6
7
OPTION NUMBER
ƒ Copy = 1
option copied to all fragments
=0
copied to the first fragment only
ƒ Class = 0
Datagram or network control
=1
Resv’d
=2
Debugging and measurement
=3
Resv’d
ƒ Option length (1 octet)
ƒ Value : variable length
2002 Yanghee Choi
IP Options
18
Record Route Option
ƒ Loose Source Routing
ƒ Record Route
ƒ Strict Source Routing
0
8
16
24
31
CODE LENGTH POINTER
FIRST IP ADDRESS
ƒ Internet Timestamp etc.
SECOND IP ADDRESS
……...
2002 Yanghee Choi
19
2002 Yanghee Choi
20
5
Strict Source Route Option
0
8
16
24
Timestamp Option
31
0
24
IP ADDRESS OF FIRST HOP
FIRST IP ADDRESS
IP ADDRESS OF SECOND HOP
FIRST TIMESTAMP
……...
2002 Yanghee Choi
31
……...
In msec since midnight
OFLOW : count of routers that couldn’t supply timestamps
because the option was too small
FLAGS : record timestamps only (0), etc.
Addresses overwritten by visited routers
(= record route)
21
2002 Yanghee Choi
IPv6
22
IPv6 Addresses
Expanded Addressing Capabilities
Flexible header format
Improved Support for Extensions and Options
Support for resource allocation
Provision for protocol extension
Flow Labeling Capability
Authentication and Privacy Capabilities
2002 Yanghee Choi
16
CODE LENGTH POINTER OFLOW FLAGS
CODE LENGTH POINTER
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
8
23
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
128-bit long. Fixed size
3.4 X 10~38 addresses
Assigned to individual interfaces
Allows multiple interfaces per host
Allows multiple addresses per interface
Allows unicast, multicast, anycast
Allows provider based, site-local, link-local
85% of the space is unassigned
2002 Yanghee Choi
24
6
Colon-Hex Notation
IPv6 Prefix Allocation
ƒ Dot-Decimal 147.47.114.115
ƒ Colon-Hex
FEDC:0000:0000:0000:3232:0000:0000:ACFE
2002 Yanghee Choi
25
Allocation
Prefix
Allocation
Prefix
Reserved
Unassigned
NSAP
IPX
Unassigned
Unassigned
Unassigned
Global Unicast
Unassigned
Unassigned
Unassigned
0000 0000
0000 0001
0000 001
0000 010
0000 011
0000 1
0001
001
010
011
100
Unassigned
Unassigned
Unassigned
Unassigned
Unassigned
Unassigned
Unassigned
Unassigned
Link-Local
Site-Local
Multicast
101
110
1110
1111 0
1111 10
1111 110
1111 1110
1111 1110 0
1111 1110 10
1111 1110 11
1111 1111
2002 Yanghee Choi
IPv6 Address Formats
26
Local Address
Top-Level Aggregation (ISP or exchange)
Next-Level Aggregation (subscriber site)
Site-Level Aggregation (subnet)
1111111010
Interface ID
Link Local address : Not forwarded outside the link
001 TLA id RES
3
13
8
NLA id
24
SLA id INTERFACE id
16
1111111011
Interface ID
Site Local address : Not forwarded outside the subnetwork
64
Aggregatable global unicast address
2002 Yanghee Choi
27
2002 Yanghee Choi
28
7
IPv4 Addresses
Anycast Address
32
0000…………………………………………...…………………..0000 IPv4 address
Routed to the nearest interface in the group
Allocated in the unicast address space
0000…………………………………………...…………………..FFFF IPv4 address
Subnet-router anycast address :
delivered to one router in the subnetwork
IPv4-compatible IPv6 address
2002 Yanghee Choi
29
2002 Yanghee Choi
Multicast Addresses
IPv6 PDU General Form
ƒ Flag bit :
T=0 Permanent (well-known) multicast address
T=1 Transient
ƒ Scope
1
Node-local
2
Link-local
5
Site-local
8
Organization-local
E
Global
ƒ Group ID
Predefined 1
All nodes
2
Routers
1:0
DHCP servers
11111111 Flag Scope
2002 Yanghee Choi
30
40 octets
IPv6
header
0 or more
Extension
header
…..
Extension Transport-level
header
PDU
Group ID
31
2002 Yanghee Choi
32
8
IPv6 Header
4
8
Version traffic class
Payload length
16
24
Flow label
31
ƒ
ƒ
ƒ
ƒ
ƒ
Next header Hop limit
Source
Address
40 octets
0
IPv6 Header
Destination
Address
2002 Yanghee Choi
ƒ
ƒ
ƒ
ƒ
33
Version = 6
Traffic Class (4 bits)
Flow Label (24 bits)
Payload length (16 bits) : in octets except the IPv6 header
Next Header (8 bits) : identifies the type of header following the
IPv6 header
Hop Limit (8 bits) : remaining number of allowable hops for this
packet
Source Address (128 bits)
Destination Address (128 bits) : may not be the ultimate
destination, if routing header is present
40 octets in length
2002 Yanghee Choi
Traffic Class
34
Traffic Class
ƒ Congestion-Controlled Traffic Class : variable
delay, out-of-order packet reception is
acceptable.
ƒ Non-Congestion-Controlled Traffic : constant data
rate, and delay like realtime video and audio
ƒ 8 levels of priorities : 8 (lowest) - 15 (highest)
• Internet Control Traffic (most important traffic) :
routing info
• Interactive Traffic : on-line user-to-host
• Attended Bulk Transfer : FTP, HTTP
• Unattended Data Transfer : E-mail
• Filler Traffic : handled in the background,
USENET
• Uncharacterized Traffic
2002 Yanghee Choi
35
2002 Yanghee Choi
36
9
Flow Label
Header Order
ƒ A Flow is uniquely identified by source address and
24-bit flow label.
ƒ A flow may comprise single or multiple TCP
connections.
ƒ A single application may generate a single or multiple
flows (multimedia conferencing).
ƒ At router, the same flow has the same path, resource
allocation, discard requirements, accounting, and
security attributes.
2002 Yanghee Choi
37
ƒ IPv6 header : mandatory
ƒ Hop-by-Hop Options header
ƒ Destination Options header
to be processed by destinations in the IPv6 header and Routing
header
ƒ Routing header : extended routing (source routing)
ƒ Fragment header
ƒ Authentication header
ƒ Encapsulating Security Payload header
ƒ Destination Options header
to be processed by destination in the IPv6 header
ƒ upper-layer header (TCP, application etc.)
2002 Yanghee Choi
IPv6 Fragmentation
38
IPv6 Transition (ngtrans)
ƒ End-to-end
ƒ Does not accommodate route changes
ƒ Use Path MTU Discovery to determine minimum
MTU in the path
ƒ Minimum MTU is 1280 octets
IPv4/IPv6
DualStack
IPv4
IPv6
IPv6
IPv4
IPv6-in-IPv4 tunneling
IPv4
IPv4/IPv6
Translation
2002 Yanghee Choi
39
2002 Yanghee Choi
IPv6
40
10
Download