Vous êtes sur la page 1sur 17

2020-1 INTERNETWORKING

In this section, we discuss internetworking, connecting networks together to make an internetwork or an internet. internet.

Chapter 20 Network Layer: Internet Protocol

Topics discussed in this section:


Need for Network Layer Internet as a Datagram Network Internet as a Connectionless Network
20.2

20.1

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Figure 20 1 Li k between t h t 20.1 Links b t two hosts

Figure 20 2 N t k l 20.2 Network layer i an internetwork in i t t k

20.3

20.4

Figure 20 3 N t k l 20.3 Network layer at th source, router, and d ti ti t the t d destination

Figure 20 3 N t k l 20.3 Network layer at th source, router, and d ti ti ( ti d) t the t d destination (continued)

20.5

20.6

Note

Note

Switching t th S it hi at the network layer in the t kl i th Internet uses the datagram approach to packet switching. k t it hi

Communication at the network layer in C i ti t th t kl i the Internet is connectionless.

20.7

20.8

Two Key Network-Layer Functions


forwarding: move
analogy: gy routing: process of planning trip from source to dest forwarding: process of getting through single interchange

Interplay between routing and forwarding


routing algorithm

packets from routers input to appropriate p pp p router output route taken by packets from source to dest.
routing algorithms

local forwarding table header output value 0100 3 link


0101 0111 1001 2 2 1

routing: determine

value in arriving packets header


0111

1
3 2

20.9

20.10

Router Architecture Overview


Two key router functions:
run routing algorithms/protocol (RIP, OSPF, BGP) forwarding datagrams from incoming to outgoing link

Input Port Functions

Physical layer: bit-level reception Data link l D t li k layer: e.g., Ethernet

Decentralized switching:
given datagram dest., lookup output port using forwarding table in input port y memory goal: complete input port processing at line speed queuing: if datagrams arrive faster than forwarding rate into switch fabric

20.11

20.12

Three types of switching fabrics

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 p Port Memory p Output Port

System Bus

20.13

20.14

Switching Vi S it hi Via a Bus B

Switching Via An Interconnection Network g

datagram from input port memory to output port memory via a shared bus bus b contention: switching speed t ti it hi d limited by bus bandwidth 32 Gbps bus, Cisco 5600: sufficient speed for access and enterprise routers

overcome bus bandwidth limitations Banyan networks, other interconnection nets initially y , y developed to connect processors in multiprocessor advanced design: fragmenting datagram into fixed length cells switch cells through the fabric cells, fabric. Cisco 12000: switches 60 Gbps through the interconnection network

20.15

20.16

Output Ports p

Output port queueing

Buffering required when datagrams arrive from fabric


faster than the transmission rate Scheduling discipline chooses among queued datagrams for transmission g
20.17

buffering when arrival rate via switch exceeds output line speed

queueing (delay) and loss due to output port buffer overflow!


20.18

How much buffering? g


RFC 3439 rule of thumb: average buffering equal to typical RTT (say 250 msec) times link capacity C
e.g., C = 10 Gps link: 2.5 Gbit buffer

Input Port Queuing


Fabric slower than input ports combined -> queueing may occur at input queues Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward

queueing delay and loss due to input buffer overflow!

Recent recommendation: with N flows flows, buffering equal to RTT . C


N

20.19

20.20

20- IPv4 20-2 IPv4


The Internet Protocol version 4 (IPv4) is the delivery IPv4 mechanism used by the TCP/IP protocols. protocols.

The Internet Network layer


Host, router network layer functions:

Transport layer: TCP, UDP


Routing protocols gp path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions

Network layer

Topics discussed in this section:


Datagram Fragmentation Checksum Options
20.21 20.22

forwarding f di table

ICMP protocol error reporting router signaling

Link layer physical layer

Figure 20 4 P iti of IPv4 i TCP/IP protocol suite 20.4 Position f IP 4 in t l it

Figure 20 5 IP 4 d t 20.5 IPv4 datagram f format t

20.23

20.24

IP datagram format

IP protocol version t l i number header length (bytes) type of data max number remaining hops g p (decremented at each router) upper layer protocol to deliver payload to how much overhead with TCP? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead

32 bits ver head. type of len service flgs length fragment offset header checksum

total datagram length (bytes) for fragmentation/ reassembly

Figure 20 6 S i type or differentiated services 20.6 Service t diff ti t d i

16-bit identifier time to live upper y layer

32 bit source IP address 32 bit destination IP address Options (if any)


data (variable length, typically a TCP or UDP segment)

E.g. timestamp, record route taken, specify list of routers to visit.

20.25

20.26

Table 20.1 Types of service

Note

The Th precedence subfield was part of d bfi ld t f version 4, but never used.

20.27

20.28

Table 20.2 Default types of service

Note

The total length field defines the total Th t t l l th fi ld d fi th t t l length of the datagram including the header. h d

20.29

20.30

Figure 20 7 E 20.7 Encapsulation of a small datagram in an Ethernet frame l ti f ll d t i Eth tf

Figure 20 8 P t l field and encapsulated data 20.8 Protocol fi ld d l t dd t

20.31

20.32

Example 20.1
Table 20.4 Protocol values

An IPv4 packet has arrived with the first 8 bits as shown: 01000010 The receiver discards the packet. Why? Solution There is an error in this packet. The 4 leftmost bits (0100) show the version, which is correct. The next 4 bits (0010) show an invalid header length (2 4 = 8). The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission.

20.33

20.34

Example 20.3
Figure 20 9 M i 20.9 Maximum transfer unit (MTU) t f it

In an IPv4 packet, the value of HLEN is 5, and the value of the total length field is 0x0028. How many bytes of data are being carried by this packet? Solution The HLEN value is 5, which means the total number of bytes in the header is 5 4, or 20 bytes (no options). The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 20).

20.35

20.36

Table 20 5 MTU f some networks 20.5 MTUs for t k

IP Fragmentation & Reassembly


network links have MTU (max.transfer size) - largest possible link-level frame. bl l k l lf 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 out: 3 smaller datagrams

reassembly

20.37

20.38

IP Fragmentation and Reassembly

Figure 20 10 Fl used in fragmentation 20.10 Flags d i f t ti


Example 4000 byte datagram MTU = 1500 bytes
length ID =4000 =x 4000 x fragflag =0 offset =0

One large datagram becomes several smaller datagrams length ID =1500 =x fragflag =1 fragflag =1 fragflag =0 offset =0 offset =185 offset =370

1480 bytes in data field offset = 1480/8

length ID =1500 =x length ID =1040 =x

20.39

20.40

Figure 20.12 Detailed fragmentation example Figure 20 11 F 20.11 Fragmentation example t ti l

20.41

20.42

Reassembly
Figure 20 14 T 20.14 Taxonomy of options in IPv4 f ti i IP 4

When the fragments arrive what strategy should be used to reassemble them? (they may be out of order)
Solution 1. The fist fragment has an offset field value of zero. g 2. Divide the length of the first fragment by 8. The second fragment has an offset value equal to that result. 3. 3 Divide the total length of the first and second fragment by 8 8. The third fragment has an offset value equal to that result. 4. Continue the process. The last fragment has a more bit value of 0.

20.43

20.44

20- IPv6 20-3 IPv6


The network layer protocol in the TCP/IP protocol suite is currently IPv4. Although IPv4 is well IPv4 IPv4 designed, data communication has evolved since the inception of IPv4 in the 1970s. IPv4 has some IPv4 1970s IPv4 deficiencies that make it unsuitable for the fastfastg growing Internet. g Internet. Topics discussed in this section: p
Advantages Packet Format Extension Headers
20.45 20.46

IPv6
Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:
header format helps speed p processing/forwarding g/ g header changes to facilitate QoS IPv6 datagram format: fixed-length 40 byte header no fragmentation allowed

IPv6 Header (Cont) ( )


Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same flow flow.
(concept offlow not well defined).

Advantages of IPv6

1. Better address space 2. Better header format 3. New options 4. Allowance of extension 5. Support for resource allocation 6. Support for more security

Next header: identify upper layer protocol for data

20.47

20.48

Figure 20.16 Format of an IPv6 datagram Figure 20 15 IP 6 d t 20.15 IPv6 datagram h d and payload header d l d

20.49

20.50

Other Changes from IPv4 g


Checksum: removed entirely to reduce
processing time at each hop Options: allowed but outside of header, allowed, header indicated by Next Header field ICMPv6: ICMP 6 new version of ICMP i f
additional message types, e.g. Packet Too Big Bi multicast group management functions
20.51 20.52

Table 20.6 Next header codes for IPv6

Table 20.7 Priorities for congestion-controlled traffic

Table 20 8 P i iti for noncongestion-controlled traffic 20.8 Priorities f ti t ll d t ffi

20.53

20.54

Table 20.9 Comparison between IPv4 and IPv6 packet headers

Figure 20 17 E t i header t 20.17 Extension h d types

20.55

20.56

Table 20.10 Comparison between IPv4 options and IPv6 extension headers

2020-4 TRANSITION FROM IPv4 TO IPv6 IPv4 IPv6


Because of the huge number of systems on the Internet, th t I t t the transition f iti from IP 4 t IP 6 cannot IPv4 IPv to IPv IPv6 t happen suddenly. It takes a considerable amount of suddenly. time before every system in the Internet can move from IPv4 to IPv6. The transition must be smooth to IPv4 IPv6 prevent any problems between IPv4 and IPv6 IPv4 IPv6 systems. systems. Topics discussed in this section:
Dual Stack g Tunneling Header Translation

20.57

20.58

Transition From IPv4 To IPv6


Not all routers can be upgraded simultaneous
no flag days flag days How will the network operate with mixed IPv4 and IPv6 routers?

Figure 20 18 Th t 20.18 Three transition strategies iti t t i

Tunneling: IPv6 carried as payload in IPv4


datagram among IPv4 routers

20.59

20.60

Figure 20 19 D l stack 20.19 Dual t k

Figure 20 20 T 20.20 Tunneling strategy li t t

20.61

20.62

Tunneling
Figure 20 21 H d translation strategy 20.21 Header t l ti t t
Logical view: A
IPv6

B
IPv6

tunnel

E
IPv6

F
IPv6

A Physical view:
IPv6
Flow: X Src: A Dest: F

B
IPv6

C
IPv4

D
IPv4

E
IPv6 IP 6

F
IPv6 IP 6
Flow: X Src: A Dest: F

Src:B Dest: E
Flow: X Src: A Dest: F

Src:B Dest: E
Flow: X Src: A Dest: F

data

data

data

data

A-to-B: IPv6 IP 6

B-to-C: B to C: IPv6 inside IPv4

B-to-C: B to C: IPv6 inside IPv4

E-to-F: IPv6 IP 6

20.63

20.64

Table 20.11 Header translation

20.65

Vous aimerez peut-être aussi