Congestion and Flow Control in TCP

5 downloads 102 Views 323KB Size Report
App reads 4 KB. 0. 0. 0. 8 KB. 6 KB. 0. 0 KB. 6 KB. App reads 4 KB. 6 KB. 2 KB. 0. 4 KB. 2 KB. 6 KB. 2 KB. 2 KB. 4 KB. 4 KB. 4 KB. 64 KB. 6 KB. 2 KB. 4 KB. 64 KB.
IPv4 & IPv6 Header Comparison IPv6 Header

IPv4 Header Ver

IPv6

IHL

Type of  Service

Identification Time to  Live

Total Length

Flags

Ver

Fragment  Offset

Traffic  Class

Payload Length

Flow Label Next  Header

Hop  Limit

Protocol Header Checksum Source Address Source Address Destination Address Options

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

1

IPv6 Address Scope

Protocols and Networks — Hadassah College — Spring 2016

Destination Address

Wireless

Dr. Martin Land

2

Dr. Martin Land

4

Types of IPv6 Addresses

Address assigned to interface Interface ID Addresses depends on scope Link Local

Unicast One address on a single interface Delivery to single interface

Local hardware connection Broadcast domain

Multicast Address of a set of interfaces Delivery to all interfaces in set

Site Local Autonomous system (AS) Network of one organization

Anycast Address of a set of interfaces Delivery to closest single interface in set

Global

Global

Protocols and Networks — Hadassah College — Spring 2016

Padding

Site-Local

Wireless

Link-Local

No broadcast addresses

Dr. Martin Land

3

Protocols and Networks — Hadassah College — Spring 2016

Wireless

IPv6 Address

IPv6 Prefix

128-bit address 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses 50,000 addresses per square meter of land on Earth

Binary 

Hex

0000 0000

Colon-separated 16-bit hex

Prefix Format (PF)

Type

Application

0::/8

Reserved address

Not assigned

0000 001

0200::/7

Reserved for ATM

Used in telephony

001

2000::/3

Aggregatable Global  Unicast Address

Aggregation of host  addresses into networks  and subnets

1111 1110 10

FE80::/10

Link Local Use Address

Address hosts on LAN  segment

legal 2031:0:130F::9C0:876A:130B

1111 1110 11

FEC0::/10

Site Local Use Address

Addresses used with an AS  (like 10.0.0.0 in IPv4)

illegal 2031::130F::9C0:876A:130B

1111 1111

FF00::/8

Multicast Address

Assigned to a group

2031:0000:130F:0000:0000:09C0:876A:130B Leading zeros optional

2031:0:130F:0:0:9C0:876A:130B Successive 0 fields written :: (once)

IPv4 compatible — used in tunneling IPv6 through IPv4 0:0:0:0:0:0:1.2.3.4 = ::0102:0304

Global Unicast Address format 3 bits

IPv4 mapped — used by IPv6 source sending to IPv4 dest 0:0:0:0:0:FFFF:1.2.3.4 = ::FFFF:0102:0304 Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

001 5

Unicast Address Formats

61 bits assigned by authority / AS Routing Prefix

Protocols and Networks — Hadassah College — Spring 2016

FP (10 bits)

Reserved (54 bits)

Interface ID (64 bits)

1111111010

MUST be 0

MAC derived

Site Local

1111111011

Wireless

Dr. Martin Land

6

Customer  1 2001:0410:0001:/48

Subnet (38 bits)

64 bits Interface ID (host)

Hierarchical Addressing & Aggregation

Link Local

FP (10 bits)

Subnet ID

Subnet (16 bits)

Locally Administered

ISP 2001:0410::/32

Customer  2

Interface ID (64 bits) MAC derived

IPv6 Internet 2000::/3

2001:0410:0002:/48

Authority Assigns 2001:0410::/32 to ISP

Global FP (3 bits)

ISP assigned (45 bits)

Subnet (16 bits)

Interface ID (64 bits)

001

Provider Administered

Locally  Administered

MAC derived or Locally  Administered or Random

ISP Assigns 2001:0410:1:/48 to customer 1 Assigns 2001:0410:2:/48 to customer 2 Customer 1 Assigns subnets 2001:0410:1:1/64 , 2001:0410:1:2/64

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

7

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

8

Extension Headers

IPv6 Option Headers

Next header field Points to header following IPv6 header Upper Layer Protocol

Tunneling Option 41 IPv6 datagram in data field of IPv6 datagram Example — used with fragmentation when router adds option field

IP Option Header

6

TCP Header

0

Hop‐by‐Hop Options Header

17

UDP Header

43

IPv6 Routing Header

41

IPv6 Header

44

IPv6 Fragment Header

45

Interdomain Routing Protocol

50

Encapsulating Security Payload

46

Resource Reservation Protocol

51

IPv6 Authentication Header

58

IPv6 ICMP Packet

59

No Next Header

60

Destination Options Header

Hop-by-hop header Options checked by every router and destination node Destination options header Options checked by destination node Routing header Source sets route through network Fragment header

Extension headers Multiple of 8 bytes Syntax depends on option Headers (except 60) appear only once Protocols and Networks — Hadassah College — Spring 2016

Wireless

Handles fragmentation Authentication header / Encapsulating Security Payload Implement IPsec Dr. Martin Land

9

Option Header Examples

TCP Header + Data

IPv6 Header Next = Routing

Routing Header Next = TCP

TCP Header + Data

IPv6 Header Next = Routing

Routing Header Next = Fragment

Fragment Header Next = TCP

Hop‐by‐Hop Header Next = Fragment

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

10

Dr. Martin Land

12

Traffic Class + Flow

IPv6 Header Next = TCP

IPv6 Header Next = Routing

Protocols and Networks — Hadassah College — Spring 2016

DSCP — 6 bits Differentiated Services Code Point Sets per-hop behavior according to service ECN — 2 bits Explicit Congestion Notification Router can set congestion indication Flow Stream of related packets from 1 source to 1 destination Require particular handling by routers Requirements cached in routers Example — real time priority

TCP Header + Data  Fragment

24 bit flow label Fragment Header Next = TCP Wireless

Chosen randomly from 1 to FFFFF 0 — not part of a flow

TCP Header + Data  Fragment Dr. Martin Land

Flow identified by label + src IP + dest IP 11

Protocols and Networks — Hadassah College — Spring 2016

Wireless

ICMPv6

Neighbor Discovery

ICMP — Internet Control Message Protocol Offset 

0 – 7

8 – 15

16 – 31

0

Type

Code (subtype)

Checksum

32

Identify hosts and routers on physical LAN segment Replaces ARP Address resolution Obtain MAC address for neighbors

ICMP Message

1

Destination Unreachable

128 Echo Request

2

Packet Too Big

129 Echo Reply

3

Time (Hop Count) Exceeded

130 Group Membership Query

4

Parameter Problem

131 Group Membership Report

Neighbor Solicitation Node sends ICMP neighbor solicitation message to host 64‐bit local link multicast prefix

64‐bit host address

FF02::

Interface ID

132 Group Membership Reduction 133 Router Solicitation 134 Router Advertisement

Neighbor advertisement Neighbor send ICMP neighbor advertisement with MAC address

135 Neighbor Solicitation 136 Neighbor Advertisement 137 Redirect Message Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

13

Router and Prefix Discovery

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

14

Dr. Martin Land

16

Auto‐Configuration

Router advertisements Routers send ICMP messages to hosts on some schedule Addressed to FF02::1

Stateful auto-configuration DHCP service (similar to IPv4) DHCP messages Solicit, advertise, request, reply, release, reconfigure

Multicast address — all systems on local link

Provides configuration parameters

DHCP server provides IP address + configuration parameters Stateless auto-configuration On startup node reads MAC address from hardware

MTU Global IP prefix IP address configuration method (ICMP / stateless)

Attach link-local prefix FE80::/10 to MAC Creates temporary link-local unicast address

Router solicitation message Host sends ICMP message to request router service Addressed to FF02::2

Node verifies unique address with neighbor solicitation No response ⎯→ node assigns link-level address to interface

Node sends router solicitation Routers respond with router advertisement No response ⎯→ node attempts DHCP Response message provides parameters — MTU, global prefix

Multicast address — all routers on local link

Routers respond with router advertisement

Node adds global prefix to form global unicast IP address Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

15

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Mobile IP (RFC 2002)

Mobile IP ⎯ Basic Idea

Internet protocol supporting host mobility Primarily for ESS-to-ESS mobility Maintains TCP connections as host changes location Supports authentication Mobile host maintains single long-term IP address Version 4 IP address and address format are unaffected Routing tunnel replaces standard IP routing 132.4.16.X

Similar to Call forwarding Mail forwarding at post office Mobile Node

Permanent IP address Usual home service router Finds mobile service routers when roaming

X=1, 2, 3, ..., 254

138.27.192.87

IP datagram

Home router and mobile service router coordinate Router

1

Router

2

3

IP datagrams

138.27.192.Y

Protocols and Networks — Hadassah College — Spring 2016

IP datagram IP datagram

Y=1, 2, 3, ..., 254

1

2

Sent to usual home router Forwarded by home router to mobile service router Forwarded to Mobile Node

3

Wireless

Dr. Martin Land

17

Mobile IP Entities

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

18

Agent Discovery

Mobile Node (MN) Host or router that can change its point of attachment

Mobility Agents broadcast availability Home Agents (HA) Foreign Agents (FA)

Home Address Permanent IP address assigned to MN

Mobile Node (MN) looks for Local router services when connected to home network Foreign Agent (FA) services when connected to foreign network

Correspondent Node (CN) Node that sends datagrams to MN home address Home Agent (HA) Maintains table of registered mobile nodes Forwards datagrams addressed to mobile node Foreign Agent (FA) Delivers datagrams between MN and HA Mobility Agent HA or FA supporting mobility

FA advertises services

Care-of-Address (COA) FA address used to identify current location of MN Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

19

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

20

Care‐of‐Address Discovery

Registration

Mobile Node (MN) Requests service from Foreign Agent (FA)

Foreign Agent Requests Mobile IP support from MN’s Home Agent Home Agent Agrees to provide Mobile IP support MN Registers COA with its HA HA forwards datagrams to FA Datagrams for MN arrive at HA

Foreign Agent Assigns Care-of-Address (COA) to MN FA can have 1 or more available COAs Usually FA assigns same COA to all MNs

MN requests service from FA

MN registers with FA and HA

FA forwards request to HA

FA informs MN of status Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

21

Establishment of Service in Mobile IP

Protocols and Networks — Hadassah College — Spring 2016

HA accepts or rejects Wireless

Dr. Martin Land

22

Mobile IP End‐to‐End Delivery

HA

From: HA IP address From: CN IP address To: FA COA Address To: MN Home Address

DATA Encapsulated IP datagram

FA Standard IP datagram

MN From: CN IP address To: MN Home Address

MN in home network

DATA Standard IP datagram From: CN IP address To: MN Home Address

CN

DATA

MN in foreign network Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

23

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

24

Roaming and Hand‐Off

Change of Foreign Agent

Roaming MN Moves to new attachment point (network) Requires change of FA

CN

Multiple bindings Multiple COAs — old + new Avoid datagram loss Avoid too frequent registrations

IP datagram

HA

Encapsulated IP datagram

FAnew

FAold

IP datagram

Encapsulated IP datagram

IP datagram

MN

MN changes location

on registrati

registration ACK

HA

update ACK

Forwards each packet to multiple COAs

Encaps

MN

ulated IP datagra m Encapsula ted IP datagram

IP datagram

Receives packet at one COA Route optimization after reconnection Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

25

Triangle Routing

Protocols and Networks — Hadassah College — Spring 2016

IP datagram

Wireless

Dr. Martin Land

26

Dr. Martin Land

28

Route Optimization

Home agent is bottleneck Increases network load

FA

HA (2a) Encapsulated IP datagram

IP da gr ta am

Dr. Martin Land

27

Protocols and Networks — Hadassah College — Spring 2016

Wireless

(1) IP datagram

) (5

Wireless

(2b) Warning (3) Binding Request (4) Binding Update

IP datagrams

Protocols and Networks — Hadassah College — Spring 2016

IP dat agram

Roaming Under Route Optimization

IPv6 Mobile IP Implements Mobile IP 1. Mobile node (MN) obtains local address using autoconfiguration Local address = care-of-address (CoA) No special Foreign Agent 2. MN registers with Home Agent by sending Binding Update 3. HA forwards traffic for registered MN Tunnels packets from CN to MN 4. MN sends packets to CN directly 5. Route optimization — HA provides CN with CoA CN 4 5

3

HA  1

MN Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

29

IPv6 Mobility Support Node write home address in destination option header Destination node can identify datagram by home address Tunneling Using IPv6 routing extension headers instead of encapsulation Reduces processing cost of delivering packets Handover Node moves from ESS to ESS Layer 2 handover — change AP and ESS ID Node detects change in on-link subnet prefix Updates CoA IPv6 Mobility header messages Home Test Init, Home Test, Care-of Test Init, and Care-of Test Binding Update / Acknowledgement MN to notifies node or HA of current binding

Protocols and Networks — Hadassah College — Spring 2016

Wireless

Dr. Martin Land

31

Protocols and Networks — Hadassah College — Spring 2016

2 Wireless

Dr. Martin Land

30