Network Layer: The Data Plane Network Layer Overview Router - - PowerPoint PPT Presentation

network layer the data plane
SMART_READER_LITE
LIVE PREVIEW

Network Layer: The Data Plane Network Layer Overview Router - - PowerPoint PPT Presentation

Network Layer: The Data Plane Network Layer Overview Router Architecture Network Layer Functions and Service Models Network Layer Functions IP Addressing Network Service Models: Virtual Circuit vs. Datagram


slide-1
SLIDE 1

Network Layer: The Data Plane

  • Network Layer Overview
  • Router Architecture
  • Network Layer Functions and Service Models

– Network Layer Functions – IP Addressing – Network Service Models: Virtual Circuit vs. Datagram

  • IP Forwarding and IP Protocol

– IP Datagram Forwarding Model – IP and ICMP: Datagram Format, IP Fragmentation – DHCP

  • NAT, IPv6 and IPv6 transition (over IPv4)

Readings: Textbook: Chapter 4, Sections 4.1-4.3, review section 1.3 (packet vs. circuit switching)

CSci4211: Network Layer: The Data Plane 1

slide-2
SLIDE 2

What Does Network Layer Do?

  • End-to-end deliver

packet from sending to receiving hosts, hop-by- hop thru network

– A network-wide concern! – Involves every router, host in the network

  • Compare:

– Transport layer

  • between two end hosts

– Data link layer

  • over a physical link

directly connecting two (or more) physically hosts

network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical application transport network data link physical

CSci4211: Network Layer: The Data Plane 2

slide-3
SLIDE 3
  • transport segment from

sending to receiving host

  • on sending side

encapsulates segments into datagrams

  • on rcving side, delivers

segments to transport layer

  • network layer protocols

in every host, router

  • Router examines header

fields in all IP datagrams passing through it

network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical application transport network data link physical

CSci4211: Network Layer: The Data Plane 3

What Does Network Layer Do?

slide-4
SLIDE 4

Network Layer Functions

  • Addressing

– Globally unique address for each routable device

  • Logical address, unlike MAC address (as youll see later)

– Assigned by network operator

  • Need to map to MAC address (as youll see later)
  • Routing: building a map of network

– Which path to use to forward packets from src to dest

  • Forwarding: delivery of packets hop by hop

– From input port to appropriate output port in a router

CSci4211: Network Layer: The Data Plane 4

slide-5
SLIDE 5

Two Key Network-Layer Functions

  • forwarding: move

packets from routers input to appropriate router

  • utput
  • routing: determine

route taken by packets from source to dest.

– routing algorithms

analogy:

  • routing: process of

planning trip from source to dest

  • forwarding: process
  • f getting through

single interchange

CSci4211: Network Layer: The Data Plane 5

slide-6
SLIDE 6

Data plane

  • local, per-router function
  • determines how datagram

arriving on router input port is forwarded to router output port

  • forwarding function

Control plane

  • network-wide logic
  • determines how datagram is

routed among routers along end-end path from source host to destination host

  • two control-plane approaches:
  • traditional routing algorithms:

implemented in routers

  • software-defined networking

(SDN): implemented in (remote) servers

1 2 3 0111

values in arriving packet header

Network Layer: Data Plane, Control Plane

CSci4211: Network Layer: The Data Plane 6

slide-7
SLIDE 7

Per-router Control Plane

Routing Algorithm

Individual routing algorithm components in each and every router interact in the control plane

data plane control plane

Local forwarding table header 0100 0110 0111 1001 3 2 2 1
  • utput

1 2 0111

values in arriving packet header

3 7

slide-8
SLIDE 8

data plane control plane

Logically Centralized Control Plane

A distinct (typically remote) controller interacts with local control agents (CAs)

Remote Controller CA

CA CA CA CA

1 2 0111 3

values in arriving packet header

8

slide-9
SLIDE 9

Routing & Forwarding:

Logical View of a Router

A E D C B F

2

2 1 3 1 1 2 5 3 5

CSci4211: Network Layer: The Data Plane 9

slide-10
SLIDE 10

Router Architecture Overview

Two key router functions:

  • run routing algorithms/protocol (RIP, OSPF, BGP)
  • forwarding datagrams from incoming to outgoing link

CSci4211: Network Layer: The Data Plane 10

slide-11
SLIDE 11

Input Port Functions

Decentralized switching:

  • using header field values, lookup output

port using forwarding table in input port memory

  • goal: complete input port processing at

line speed

  • queuing: if datagrams arrive faster than

forwarding rate into switch fabric Physical layer: bit-level reception Data link layer: e.g., Ethernet see chapter 6

CSci4211: Network Layer: The Data Plane 11

slide-12
SLIDE 12

memory

memory

bus crossbar

Switching Fabrics

  • transfer packet from input buffer to appropriate
  • utput buffer
  • switching rate: rate at which packets can be

transfer from inputs to outputs

  • often measured as multiple of input/output line rate
  • N inputs: switching rate N times line rate desirable
  • three types of switching fabrics

CSci4211: Network Layer: The Data Plane 12

slide-13
SLIDE 13

Switching Via Memory

First generation routers:

  • traditional computers with switching under direct

control of CPU

  • packet copied to systems memory
  • speed limited by memory bandwidth (2 bus crossings

per datagram)

input port (e.g., Ethernet) memory

  • utput

port (e.g., Ethernet) system bus

CSci4211: Network Layer: The Data Plane 13

slide-14
SLIDE 14

Switching Via a Bus

  • datagram from input port memory

to output port memory via a shared bus

  • bus contention: switching speed

limited by bus bandwidth

  • 32 Gbps bus, Cisco 5600: sufficient

speed for access and enterprise routers

CSci4211: Network Layer: The Data Plane 14

slide-15
SLIDE 15

Switching Via An Interconnection Network

  • overcome bus bandwidth limitations
  • banyan networks, crossbar, other interconnection

nets initially developed to connect processors in multiprocessor

  • advanced design: fragmenting datagram into fixed

length cells, switch cells through the fabric.

  • Cisco 12000: switches 60 Gbps through the

interconnection network

CSci4211: Network Layer: The Data Plane 15

slide-16
SLIDE 16

Input Port Queuing

  • Fabric slower than input ports combined -> queueing

may occur at input queues

– queueing delay and loss due to input buffer overflow!

  • Head-of-the-Line (HOL) blocking: queued datagram

at front of queue prevents others in queue from moving forward

  • utput port contention:
  • nly one red datagram can be

transferred. lower red packet is blocked

switch fabric

  • ne packet time later:

green packet experiences HOL blocking

switch fabric

CSci4211: Network Layer: The Data Plane 16

slide-17
SLIDE 17

Output Ports

  • Buffering required when

datagrams arrive from fabric faster than the transmission rate

  • Scheduling discipline chooses

among queued datagrams for transmission

Datagram (packets) can be lost due to congestion, lack of buffers Priority scheduling – who gets best performance, network neutrality

CSci4211: Network Layer: The Data Plane 17

slide-18
SLIDE 18

Output Port Queueing

  • buffering when arrival rate via switch exceeds
  • utput line speed
  • queueing (delay) and loss due to output port

buffer overflow!

at t, packets more from input to output

  • ne packet time later

switch fabric switch fabric

CSci4211: Network Layer: The Data Plane 18

slide-19
SLIDE 19

IPv4 Addressing: Basics

  • Globally unique (for public IP addresses)
  • IPv4 address: 32-bit identifier for host, router

interface

  • Interface: connection between host/router and

physical link

– routers typically have multiple interfaces – host may have multiple interfaces – IP addresses associated with each interface

  • Dot notation (for ease of human reading)

223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1

CSci4211: Network Layer: The Data Plane 19

slide-20
SLIDE 20

IP Addressing: Network vs. Host

  • Two-level hierarchy

– network part (high order bits) – host part (low order bits)

  • Whats a network ?

(from IP address perspective)

– device interfaces with same network part of IP address – can physically reach each

  • ther without intervening

router

223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.2 223.1.7.0 223.1.7.1 223.1.8.0 223.1.8.1 223.1.9.1 223.1.9.2

CSci4211: Network Layer: The Data Plane 20

slide-21
SLIDE 21

Classful IP Addressing

32 bits

0network host 10 network host 110 network host 1110 multicast address

A B C D class

1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255

7 15 23 31

  • Disadvantage: inefficient use of address space, address

space exhaustion

  • e.g., class B net allocated enough addresses for 65K

hosts, even if only 2K hosts in that network

CSci4211: Network Layer: The Data Plane 21

slide-22
SLIDE 22

Classless Addressing: CIDR

CIDR: Classless InterDomain Routing

  • Network portion of address is of arbitrary length
  • Addresses allocated in contiguous blocks

– Number of addresses assigned always power of 2

  • Address format: a.b.c.d/x

– x is number of bits in network portion of address

11001000 00010111 00010000 00000000

network part host part

200.23.16.0/23

CSci4211: Network Layer: The Data Plane 22

slide-23
SLIDE 23

Special IP Addresses

  • Network address: host id = all 0s
  • Directed broadcast address: host id = all

1s

  • Local broadcast address: all 1s
  • Local host address (this computer): all 0s
  • Loopback address

– network id = 127, any host id (e.g. 127.0.0.1)

CSci4211: Network Layer: The Data Plane 23

slide-24
SLIDE 24

IP Addresses: How to Get One?

Q: How does host get IP address?

  • static assigned: i.e., hard-coded in a file

– Wintel: control-panel->network->configuration->tcp/ip- >properties – UNIX: /etc/rc.config

  • Dynamically assigned: using DHCP (Dynamic Host

Configuration Protocol)

dynamically get address from as server – plug-and-play

CSci4211: Network Layer: The Data Plane 24

slide-25
SLIDE 25

DHCP: Dynamic Host Configuration Protocol

Goal: allow host to dynamically obtain its IP address from network server when it joins network

Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an

  • n

Support for mobile users who want to join network (more shortly)

DHCP overview:

– host broadcasts DHCP discover msg – DHCP server responds with DHCP offer msg – host requests IP address: DHCP request msg – DHCP server sends address: DHCP ack msg

CSci4211: Network Layer: The Data Plane 25

slide-26
SLIDE 26

DHCP Client-Server Scenario

223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27

A B E

DHCP server arriving DHCP client needs address in this network

CSci4211: Network Layer: The Data Plane 26

slide-27
SLIDE 27

DHCP Client-Server Scenario

DHCP server: 223.1.2.5 arriving client

time

DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs CSci4211: Network Layer: The Data Plane 27

slide-28
SLIDE 28

DHCP: More Than IP Addresses

DHCP can return more than just allocated IP address on subnet:

  • address of first-hop router for client
  • name and IP address of DNS sever
  • network mask (indicating network versus host portion of

address)

CSci4211: Network Layer: The Data Plane 28

slide-29
SLIDE 29

IP Addresses: How to Get One? …

Q: How does network get network part of IP addr? A: gets allocated portion of its provider ISPs address space

ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23 ... ….. …. …. Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23

CSci4211: Network Layer: The Data Plane 29

slide-30
SLIDE 30

IP Addressing: the Last Word...

Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers

– allocates addresses – manages DNS – assigns domain names, resolves disputes

CSci4211: Network Layer: The Data Plane 30

slide-31
SLIDE 31

Network Service Model

Q: What service model for channel transporting packets from sender to receiver?

  • guaranteed bandwidth?
  • preservation of inter-packet

timing (no jitter)?

  • loss-free delivery?
  • in-order delivery?
  • congestion feedback to

sender?

? ? ?

virtual circuit

  • r

datagram?

The most important abstraction provided by network layer:

service abstraction

CSci4211: Network Layer: The Data Plane 31

slide-32
SLIDE 32

Network Service Model (contd)

Some Possible Examples: Example services for individual datagrams:

  • guaranteed delivery
  • guaranteed delivery

with less than 40 msec delay Example services for a flow of datagrams:

  • in-order datagram

delivery

  • guaranteed minimum

bandwidth to flow

  • restrictions on

changes in inter- packet spacing

CSci4211: Network Layer: The Data Plane 32

slide-33
SLIDE 33

Network Layer Connection vs. Connectionless Service

  • datagram network provides network-layer

connectionless service

  • VC network provides network-layer connection

service

  • analogous to the transport-layer services, but:

– service: host-to-host – no choice: network provides one or the other – implementation: in network core

  • network vs transport layer connection service:

– network: between two hosts, in case of VCs, also involve intervening routers – transport: between two processes

CSci4211: Network Layer: The Data Plane 33

slide-34
SLIDE 34

Virtual Circuit vs. Datagram

  • Objective of both: move packets through routers from source

to destination

  • Datagram Model:

– Routing: determine next hop to each destination a priori – Forwarding: destination address in packet header, used at each hop to look up for next hop

  • routes may change during session

– analogy: driving, asking directions at every gas station, or based on the road signs at every turn

  • Virtual Circuit Model:

– Routing: determine a path from source to each destination – Call Set-up: fixed path (virtual circuit) set up at call setup time, remains fixed thru call – Data Forwarding: each packet carries tag or label (virtual circuit id, VCI), which determines next hop – routers maintain per-call state

CSci4211: Network Layer: The Data Plane 34

slide-35
SLIDE 35

Datagram Networks: the Internet model

  • no call setup at network layer
  • routers: no state about end-to-end connections

– no network-level concept of connection

  • packets forwarded using destination host address

– packets between same source-dest pair may take different paths, when intermediate routes change! application transport network data link physical application transport network data link physical

  • 1. Send data
  • 2. Receive data

CSci4211: Network Layer: The Data Plane 35

slide-36
SLIDE 36

1

2 3

0111

value in arriving packets header

routing algorithm local forwarding table header value output link

0100 0101 0111 1001 3 2 2 1

Interplay Between Routing and Forwarding

CSci4211: Network Layer: The Data Plane 36

slide-37
SLIDE 37

Forwarding Table

Destination Address Range Link Interface 11001000 00010111 00010000 00000000 through 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111

  • therwise

3 4 billion possible entries

CSci4211: Network Layer: The Data Plane 37

slide-38
SLIDE 38

IP Forwarding Table

4 billion possible entries! (in reality, far less, but can still have millions of routes)

forwarding table entry format

destination network next-hop (IP address) link interface (1st IP address , network mask ) 11001000 00010111 00010000 00000000, 200.23.16.1 0 11111111 11111111 11111000 00000000 11001000 00010111 00011000 00000000,

  • (direct)

1 11111111 11111111 11111111 00000000 11001000 00010111 00011001 00000000, 200.23.25.6 2 11111111 11111111 11111000 00000000

  • therwise

128.30.0.1 3

CSci4211: Network Layer: The Data Plane 38

slide-39
SLIDE 39

Route aggregation: Shrinking the forwarding table

Send me anything with addresses beginning 200.23.0.0/20

200.23.2.0/23 200.23.4.0/23 200.23.14.0/23

UMN

Organization 0

CSE Department

Internet Organization 1

200.23.6.0/23

Organization 2

. . . . . .

Port 1 Port 0 Port 7

CSci4211: Network Layer: The Data Plane 39

slide-40
SLIDE 40

Route aggregation with more specific routes

UMN-FAST has a more specific route to CSE department

Send me anything with addresses beginning 200.23.0.0/20

200.23.2.0/23 200.23.14.0/23

UMN

Organization 0

CSE Department

Internet

UMN-FAST Send me anything with addresses beginning 200.23.14.0/23

200.23.4.0/23

Organization 2

. . . . . .

CSci4211: Network Layer: The Data Plane 40

slide-41
SLIDE 41

DA: 11001000 00010111 00011000 10101010 Examples DA: 11001000 00010111 00010110 10100001 interface 0 interface 1 But not interface 2, the 3rd entry is also a match, but shorter! Prefix Match 11001000 00010111 00010*** ********* 11001000 00010111 00011000 ********* 11001000 00010111 00011*** *********

  • therwise

Link interface 1 2 3

41

when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. longest prefix matching

Longest Prefix Matching

slide-42
SLIDE 42

IP Datagram Forwarding Model

IP datagram:

misc fields source IP addr dest IP addr data

  • datagram remains

unchanged, as it travels source to destination

  • addr fields of interest

here

223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27

A B E

  • Dest. Net. next router Nhops

223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2

forwarding table in A

CSci4211: Network Layer: The Data Plane 42

slide-43
SLIDE 43

IP Forwarding: Destination in Same Net

Starting at A, send IP datagram addressed to B:

  • look up net. address of B in

forwarding table

  • find B is on same net. as A
  • link layer will send datagram

directly to B inside link-layer frame

– B and A are directly connected misc fields 223.1.1.1 223.1.1.3 data

  • Dest. Net. next router Nhops

223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2

223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27

A B E

forwarding table in A

CSci4211: Network Layer: The Data Plane 43

slide-44
SLIDE 44

IP Forwarding: Destination in Diff. Net

Starting at A, dest. E:

  • look up network address of E

in forwarding table

  • E on different network

– A, E not directly attached

  • routing table: next hop

router to E is 223.1.1.4

  • link layer sends datagram to

router 223.1.1.4 inside link- layer frame

  • datagram arrives at 223.1.1.4
  • continued…..

misc fields 223.1.1.1 223.1.2.3 data

  • Dest. Net. next router Nhops

223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2

223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27

A B E

forwarding table in A

CSci4211: Network Layer: The Data Plane 44

slide-45
SLIDE 45

IP Forwarding: Destination in Diff. Net …

Arriving at 223.1.4, destined for 223.1.2.2

  • look up network address of E

in routers forwarding table

  • E on same network as

routers interface 223.1.2.9

– router, E directly attached

  • link layer sends datagram to

223.1.2.2 inside link-layer frame via interface 223.1.2.9

  • datagram arrives at

223.1.2.2!!! (hooray!)

misc fields 223.1.1.1 223.1.2.3 data

  • Dest. Net router Nhops interface

223.1.1 - 1 223.1.1.4 223.1.2 - 1 223.1.2.9 223.1.3 - 1 223.1.3.27

223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27

A B E

forwarding table in router

CSci4211: Network Layer: The Data Plane 45

slide-46
SLIDE 46

IP Forwarding & IP/ICMP Protocol

Network layer

forwarding table

Routing protocols

  • path selection
  • RIP, OSPF, BGP

IP protocol

  • addressing conventions
  • Datagram format
  • packet handling conventions

ICMP protocol

  • error reporting
  • router signaling

Transport layer: TCP, UDP Data Link layer (Ethernet, WiFi, PPP, …) Physical Layer (SONET, …)

CSci4211: Network Layer: The Data Plane 46

slide-47
SLIDE 47

IP Datagram Format

ver length 32 bits

data (variable length, typically a TCP

  • r UDP segment)

16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service type of data flgs fragment

  • ffset

upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit.

how much overhead with TCP?

  • 20 bytes of TCP
  • 20 bytes of IP
  • = 40 bytes + app

layer overhead

CSci4211: Network Layer: The Data Plane 47

slide-48
SLIDE 48

Fields in IP Datagram

  • IP protocol version: current version is 4, IPv4, new: IPv6
  • Header length: number of 32-bit words in the header
  • Type of Service:

– 3-bit priority,e.g, delay, throughput, reliability bits, …

  • Total length: including header (maximum 65535 bytes)
  • Identification: all fragments of a packet have same

identification

  • Flags: dont fragment, more fragments
  • Fragment offset: where in the original packet (count in 8

byte units)

  • Time to live: maximum life time of a packet
  • Protocol Type: e.g., ICMP, TCP, UDP etc
  • IP Option: non-default processing, e.g., IP source routing
  • ption, etc.

CSci4211: Network Layer: The Data Plane 48

slide-49
SLIDE 49

IP Fragmentation & Reassembly: Why

  • network links have MTU

(max.transfer size) - largest possible link-level frame. – different link types, different MTUs

  • large IP datagram divided

(fragmented) within net – one datagram becomes several datagrams – reassembled only at final destination – IP header bits used to identify, order related fragments

fragmentation: in: one large datagram

  • ut: 3 smaller datagrams

reassembly

CSci4211: Network Layer: The Data Plane 49

slide-50
SLIDE 50

IP Fragmentation & Reassembly: How

  • An IP datagram is chopped by a router into smaller pieces if

– datagram size is greater than network MTU – Dont fragment option is not set

  • Each datagram has unique datagram identification

– Generated by source hosts

– All fragments of a packet carry original datagram id

  • All fragments except the last have more flag set

– Fragment offset and Length fields are modified appropriately

  • Fragments of IP packet can be further fragmented by other

routers along the way to destination !

  • Reassembly only done at destination host (why?)

– Use IP datagram id, fragment offset, fragment flags. Length – A timer is set when first fragment is received (why?)

CSci4211: Network Layer: The Data Plane 50

slide-51
SLIDE 51

IP Fragmentation and Reassembly: Exp

ID =x

  • ffset

=0 fragflag =0 length =4000 ID =x

  • ffset

=0 fragflag =1 length =1500 ID =x

  • ffset

=185 fragflag =1 length =1500 ID =x

  • ffset

=370 fragflag =0 length =1040 One large datagram becomes several smaller datagrams

Example

  • 4000 byte datagram
  • MTU = 1500 bytes
  • ffset in the second

fragment: 185x8=1480

(why not 1500 bytes =length?)

  • ffset in the third

fragment: 370x8=2960

Except for last fragment, IP fragment payload size (i.e., excluding IP header) must be multiple of 8!

CSci4211: Network Layer: The Data Plane 51

slide-52
SLIDE 52

Quiz: Calculating length & Offset

ID =x

  • ffset

=0 fragflag =0 length =4000

Example

  • 4000 byte datagram
  • MTU = 1500 bytes

A B

MTU = 1500 bytes MTU = 900 bytes

CSci4211: Network Layer: The Data Plane 52

slide-53
SLIDE 53

Answer

ID =x Offset = 0 fragflag =1 length = 900 ID =x

  • ffset

=110 fragflag =1 length =620 ID =x

  • ffset

= 185 fragflag =1 length = 900 ID =x

  • ffset

= 295 fragflag =1 length = 620 ID =x

  • ffset

=370 fragflag =1 length = 900 ID =x

  • ffset

= 480 fragflag =0 length = 160

CSci4211: Network Layer: The Data Plane 53

slide-54
SLIDE 54

ICMP: Internet Control Message Protocol

  • used by hosts, routers,

gateways to communication network-level information – error reporting: unreachable host, network, port, protocol – echo request/reply (used by ping)

  • network-layer above IP:

– ICMP msgs carried in IP datagrams

  • ICMP message: type, code

plus first 8 bytes of IP datagram causing error

Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 5 0,1 redirect for network/host 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header

CSci4211: Network Layer: The Data Plane 54

slide-55
SLIDE 55

ICMP Message Transport & Usage

  • ICMP messages carried in IP datagrams
  • Treated like any other datagrams

– But no error message sent if ICMP message causes error

  • Message sent to the source

– 8 bytes of the original header included

  • ICMP Usage (non-error, informational): Examples

– Testing reachability: ICMP echo request/reply

  • ping

– Tracing route to a destination: Time-to-live field

  • traceroute

– Path MTU discovery

  • Dont fragment bit

– IP redirect (for hosts only): inform hosts of better routes

CSci4211: Network Layer: The Data Plane 55

slide-56
SLIDE 56

10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 138.76.29.7

local network (e.g., home network) 10.0.0.0/24 rest of Internet

datagrams with source or destination in this network have 10.0.0.0/24 address for source, destination (as usual) all datagrams leaving local network have same single source NAT IP address: 138.76.29.7,different source port numbers

NAT (Network Address Translation) A fix to limited IP address space:

CSci4211: Network Layer: The Data Plane 56

slide-57
SLIDE 57

motivation: local network uses just one IP address as far as outside world is concerned:

§ range of addresses not needed from ISP: just

  • ne IP address for all devices

§ can change addresses of devices in local network without notifying outside world § can change ISP without changing addresses of devices in local network § devices inside local net not explicitly addressable, visible by outside world (a security plus)

NAT (Network Address Translation)

CSci4211: Network Layer: The Data Plane 57

slide-58
SLIDE 58

10.0.0.1 10.0.0.2 10.0.0.3

S: 10.0.0.1, 3345 D: 128.119.40.186, 80

1

10.0.0.4 138.76.29.7

1: host 10.0.0.1 sends datagram to 128.119.40.186, 80 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 …… ……

S: 128.119.40.186, 80 D: 10.0.0.1, 3345

4

S: 138.76.29.7, 5001 D: 128.119.40.186, 80

2 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table

S: 128.119.40.186, 80 D: 138.76.29.7, 5001

3 3: reply arrives

  • dest. address:

138.76.29.7, 5001 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345

NAT (Network Address Translation)

CSci4211: Network Layer: The Data Plane 58

slide-59
SLIDE 59

IPv6: Motivation

  • initial motivation: 32-bit address space soon

to be completely allocated.

  • additional motivation:

– header format helps speed processing/forwarding – header changes to facilitate QoS

IPv6 datagram format:

– fixed-length 40 byte header – no fragmentation allowed

CSci4211: Network Layer: The Data Plane 59

slide-60
SLIDE 60

No checksum operation No fragmentation Longer addressing space Fix size IP Header

Simplified Design of IPv6

2001:0db8:85a3:0000:0000:8a2e:0370:7334 Can have one or more extension header fields

End hosts must perform path MTU discovery (using ICMP) per destination before sending any data!

data destination address (128 bits) source address (128 bits) payload len next hdr hop limit flow label pri ver 32 bits

CSci4211: Network Layer: The Data Plane 60

slide-61
SLIDE 61

IPv6 Transition

  • Dual stack hosts

– Two TCP/IP stacks co-exists on one host – Supporting IPv4 and IPv6 – Client uses whichever protocol it wishes

IPv4 IPv6 www.apnic.net

? ?

IPv4 TCP/UDP Application IPv6 Link

CSci4211: Network Layer: The Data Plane 61

slide-62
SLIDE 62
  • IPv6 tunnel over IPv4

IPv6 Transition (cont’d)

IPv4 Network IPv6 IPv6 IPv6 Header Data IPv4 Header IPv6 Header Data IPv6 Header Data tunnel

CSci4211: Network Layer: The Data Plane 62

slide-63
SLIDE 63

Network Layer (The Data Plane): Summary

  • Network Layer Overview
  • Router Architecture
  • Network Layer Functions and Service Models

– Network Layer Functions – IP Addressing – DHCP – Network Service Models: Virtual Circuit vs. Datagram

  • IP Forwarding and IP Protocol

– IP Datagram Forwarding Model – IP and ICMP: Datagram Format, IP Fragmentation

  • NAT, IPv6 and IPv6 transition (over IPv4)

CSci4211: Network Layer: The Data Plane 63