+ All Categories
Home > Documents > Networking: Network layer - web.mst.edu · PDF fileICMP IPv6 datagram IPsec Routing algoritms...

Networking: Network layer - web.mst.edu · PDF fileICMP IPv6 datagram IPsec Routing algoritms...

Date post: 29-Mar-2018
Category:
Upload: lamcong
View: 216 times
Download: 0 times
Share this document with a friend
100
Introduction Forwarding and routing Datagram networks Router internals Input processing Switching Output processing Queuing Routing control pane IP IPv4 datagram ICMP IPv6 datagram IPsec Routing algoritms Link-state Distance vector Hierarchical Internet routing Intra-AS RIP Intra-AS OSPF Inter-AS BGP Broadcast, multicast, anycast Networking: Network layer Comp Sci 3600 Security
Transcript

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Networking: Network layer

Comp Sci 3600 Security

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Network layer

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Network layer purpose:

Role of the network layer is simple, to move packets from asending host to a receiving host. Two important network-layerfunctions can be identified:

• Forwarding:• When a packet arrives at a router’s input link, the router

must move the packet to the appropriate output link.• For example, a packet arriving from Host H1 to Router R1

must be forwarded to the next router on a path to H2.

• Routing:• The network layer must determine the route or path taken

by packets as they flow from a sender to a receiver.• The algorithms that calculate these paths are referred to

as routing algorithms.• A routing algorithm would determine, for example, the

path along which packets flow from H1 to H2.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 address

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Routing algorithms build forwarding tables

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Every router has a forwarding table

• A router forwards a packet by examining the value of afield in the arriving packet’s header, and then using thisheader value to index into the router’s forwarding table.

• The value stored in the forwarding table entry for thatheader indicates the router’s outgoing link interface towhich that packet is to be forwarded.

• The routing algorithm may be centralized (e.g., with analgorithm executing on a central site and downloadingrouting information to each of the routers) ordecentralized (i.e., with a piece of the distributed routingalgorithm running in each router).

• In either case, a router receives routing protocol messages,which are used to configure its forwarding table.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Datagram networks

In a datagram network, each time an end system wants to senda packet, it stamps the packet with the address of thedestination end system and then pops the packet into thenetwork.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Datagram packet routing

• As a packet is transmitted from source to destination, itpasses through a series of routers.

• Each of these routers uses the packet’s destination addressto forward the packet.

• Specifically, each router has a forwarding table that mapsdestination addresses to link interfaces; when a packetarrives at the router, the router uses the packet’sdestination address to look up the appropriate output linkinterface in the forwarding table.

• The router then forwards the packet to that output linkinterface.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Routing tables

Suppose that our router has four links, numbered 0 through 3,and that packets are to be forwarded to the link interfaces asfollows:

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Longest prefix match

When there are multiple matches, the router uses the longestprefix matching rule; that is, it finds the longest matching entryin the table and forwards the packet to the link interfaceassociated with the longest prefix match.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Router architecture

Routing and management functions collectively referred to asthe router control plane, usually implemented in software andexecute on the routing processor (typically a traditional CPU)

Forwarding functions collectively referred to as the routerforwarding plane

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Input ports:

• Physical layer function of terminating an incoming physical link

• Link-layer functions needed to interoperate with the link layer atthe other side of the incoming link

• Lookup function is also performed at the input port; this willoccur in the rightmost box of the input port.

• It is here that the forwarding table is consulted to determine therouter output port to which an arriving packet will be forwardedvia the switching fabric.

• Control packets (for example, packets carrying routing protocolinformation) are forwarded from an input port to the routingprocessor.

• Term port here, referring to the physical input and outputrouter interfaces, is different from the software ports associatedwith network applications and sockets

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Switching fabric:

• The switching fabric connects the router’s input ports toits output ports.

• This switching fabric is completely contained within therouter, a network inside of a network router!

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Output ports:

• Stores packets received from the switching fabric andtransmits these packets on the outgoing link by performingthe necessary link-layer and physical-layer functions.

• When a link is bidirectional (that is, carries traffic in bothdirections), an output port will typically be paired with theinput port for that link

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Routing processor:

The routing processor executes the routing protocols, maintainsrouting tables and attached link state information, andcomputes the forwarding table for the router. It also performsthe network management functions

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Input processing

• The lookup performed in the input port is central to therouter’s operation.

• It is here that the router uses the forwarding table to lookup the output port to which an arriving packet will beforwarded via the switching fabric.

• The forwarding table is computed and updated by therouting processor, with a shadow copy typically stored ateach input port.

• Search through the forwarding table looking for thelongest prefix match

• Once a packet’s output port has been determined via thelookup, the packet can be sent into the switching fabric.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Switching architecture variation

Which is fastest?

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Output processing

Takes packets that have been stored in the output port’smemory and transmits them over the output link. This includesselecting and de-queueing packets for transmission, andperforming the needed link-layer and physical-layer transmissionfunctions.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Queuing

• As queues grow large, the router’s memory can eventuallybe exhausted and packet loss will occur when no memoryis available to store arriving packets.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Output port queuing

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Head of line (HOL) blocking in input queuing

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Router control pane (more to come)

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Network layer components

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 address

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header

• Version number. 4 bits specify the IP protocol versionof the datagram. Router can determine how to interpretthe remainder of the IP datagram. Different versions of IPuse different data-gram formats.

• Header length. Because an IPv4 datagram can containa variable number of options (which are included in theIPv4 datagram header), these 4 bits are needed todetermine where in the IP datagram the data actuallybegins. Most IP datagrams do not contain options, so thetypical IP datagram has a 20-byte header.

• Type of service. included in the IPv4 header to allowdifferent types of IP datagrams (for example, datagramsparticularly requiring low delay, high throughput, orreliability) to be distinguished from each other. Forexample, it might be useful to distinguish real-timedatagrams (such as those used by an IP telephonyapplication) from non-real-time traffic (for example, FTP).

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header

• Datagram length. total length of the IP datagram(header plus data), measured in bytes. Datagrams arerarely larger than 1,500 bytes.

• Identifier, flags, fragmentation offset. These threefields have to do with so-called IP fragmentation.

• Time-to-live. included to ensure that datagrams do notcirculate forever (due to, for example, a long-lived routingloop) Decremented by one each time the datagram isprocessed by a router. If the TTL field reaches 0, thedatagram must be dropped.

• Protocol. Used only when an IP datagram reaches itsfinal destination. Value of this field indicates the specifictransport-layer protocol to which the data portion of thisIP datagram should be passed. For example, a value of 6indicates that the data portion is passed to TCP, while avalue of 17 indicates that the data is passed to UDP.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header

• Header checksum. aids a router in detecting bit errorsin a received IP datagram.

• Source and destination IP addresses. When a sourcecreates a datagram, it inserts its IP address into thesource IP address field and inserts the address of theultimate destination into the destination IP address field.Often the source host determines the destination addressvia a DNS lookup.

• Options. allow an IP header to be extended. Headeroptions were meant to be used rarely.

• Data (payload). In most circumstances, the data fieldof the IP datagram contains the transport-layer segmentto be delivered to the destination.

Total of 20 bytes of header (assuming no options). If thedatagram carries a TCP segment, then each (nonfragmented)datagram carries a total of 40 bytes of header (20 bytes of IPheader plus 20 bytes of TCP header) along with message.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header details

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header details

• Version The first header field in an IP packet is thefour-bit version field.

• Internet Header Length (IHL) The Internet HeaderLength (IHL) field has 4 bits, which is the number of32-bit words. Since an IPv4 header may contain a variablenumber of options, this field specifies the size of theheader (this also coincides with the offset to the data).

• Differentiated Services Code Point (DSCP) Originallydefined as the Type of service (ToS) field. An example isVoice over IP (VoIP), which is used for interactive datavoice exchange.

• Explicit Congestion Notification (ECN) This field isdefined in RFC 3168 and allows end-to-end notification ofnetwork congestion without dropping packets. ECN is anoptional feature that is only used when both endpointssupport it and are willing to use it. It is only effectivewhen supported by the underlying network.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header details

• Total Length This 16-bit field defines the entire packetsize in bytes, including header and data. The minimumsize is 20 bytes (header without data) and the maximum is65,535 bytes. All hosts are required to be able toreassemble datagrams of size up to 576 bytes, but mostmodern hosts handle much larger packets. Sometimeslinks impose further restrictions on the packet size, inwhich case datagrams must be fragmented. Fragmentationin IPv4 is handled in either the host or in routers.

• Identification This field is an identification field and isprimarily used for uniquely identifying the group offragments of a single IP datagram.

• Flags A three-bit field follows and is used to control oridentify fragments. They are (in order, from mostsignificant to least significant):

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header details

• Fragment Offset The fragment offset field is measured inunits of eight-byte blocks. It is 13 bits long and specifiesthe offset of a particular fragment relative to thebeginning of the original unfragmented IP datagram.

• Time To Live (TTL) An eight-bit time to live field helpsprevent datagrams from persisting (e.g. going in circles)on an internet. It is specified in seconds, but time intervalsless than 1 second are rounded up to 1. In practice, thefield has become a hop countwhen the datagram arrives ata router, the router decrements the TTL field by one.When the TTL field hits zero, the router discards thepacket and typically sends an ICMP Time Exceededmessage to the sender. The program traceroute uses theseICMP Time Exceeded messages to print the routers usedby packets to go from the source to the destination.

• Protocol This field defines the protocol used in the dataportion of the IP datagram.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 Datagram header details

• Header Checksum The 16-bit checksum field is used forerror-checking of the header. When a packet arrives at arouter, the router calculates the checksum of the headerand compares it to the checksum field. If the values donot match, the router discards the packet. Errors in thedata field must be handled by the encapsulated protocol.

• Source address This field is the IPv4 address of thesender of the packet. Note that this address may bechanged in transit by a network address translation device.

• Destination address This field is the IPv4 address of thereceiver of the packet. As with the source address, thismay be changed in transit by a network addresstranslation device.

• Options The options field is not often used.• Data The data portion of the packet is not included in the

packet checksum. Its contents are interpreted based onthe value of the Protocol header field.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 fragmentation

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IP addresses in routers

• The boundary between the host and the physical link iscalled an interface.

• The boundary between the router and any one of its linksis also called an interface.

• A router thus has multiple interfaces, one for each of itslinks.

• Because every host and router is capable of sending andreceiving IP datagrams, IP requires each host and routerinterface to have its own IP address.

• Thus, an IP address is technically associated with aninterface, rather than with the host or router containingthat interface.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv4 address

about 4 billion addresses

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Interface addresses and subnets

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Subnet addressing

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Subnet addressing

• To determine the subnets, detach each interface from itshost or router, creating islands of isolated networks, withinterfaces terminating the end points of the isolatednetworks.

• Each of these isolated networks is called a subnet.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Three routers interconnecting six subnets

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Obtaining IP address blocks

• ISP provides addresses from a larger block of addressesthat had already been allocated to the ISP.

• For example, the ISP may itself have been allocated theaddress block 200.23.16.0/20.

• The ISP, in turn, could divide its address block into eightequal-sized contiguous address blocks and give one ofthese address blocks out to each of up to eightorganizations that are supported by this ISP, as shownbelow. (underlined the subnet part of these addresses foryour convenience.)

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Dynamic Host Configuration Protocol (DHCP)client-server

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

DHCP process

• DHCP discover message, which a client sends within aUDP packet to port 67, broadcast

• A DHCP server receiving a DHCP discover messageresponds to the client with a DHCP offer message that isbroadcast to all nodes on the subnet, again using the IPbroadcast address of 255.255.255.255.

• DHCP request. The newly arriving client will choose fromamong one or more server offers and respond to itsselected offer with a DHCP request message, echoing backthe configuration parameters.

• DHCP ACK. The server responds to the DHCP requestmessage with a DHCP ACK message, confirming therequested parameters.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

DHCP query response

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Network address translation (NAT)

NAT router behaves to the outside world as a single devicewith a single IP address, matching external ports to internalnetwork IP/port combinations

What are problems with NAT?

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Internet Control Message Protocol (ICMP)

• ICMP is often considered part of IP but architecturally itlies just above IP, as ICMP messages are carried inside IPdatagrams.

• That is, ICMP messages are carried as IP payload, just asTCP or UDP segments are carried as IP payload.

• Similarly, when a host receives an IP datagram with ICMPspecified as the upper-layer protocol, it demultiplexes thedatagram’s contents to ICMP, just as it would demultiplexa datagram’s content to TCP or UDP.

• The well-known ping program sends an ICMP type 8 code0 message to the specified host.

• The destination host, seeing the echo request, sends backa type 0 code 0 ICMP echo reply.

• Most TCP/IP implementations support the ping serverdirectly in the operating system; that is, the server is not aprocess

• Traceroute uses ICMP

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Internet Control Message Protocol (ICMP)

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv6 address format

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv6 Datagram header

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

The most important changes introduced in IPv6:

Expanded addressing capabilities.

• IPv6 increases the size of the IP address from 32 to 128bits.

• This ensures that the world won’t run out of IP addresses.

• Now, every grain of sand on the planet can beIP-addressable.

• In addition to unicast and multicast addresses, IPv6 hasintroduced a new type of address, called an anycastaddress, which allows a datagram to be delivered to anyone of a group of hosts.

• This feature could be used, for example, to send an HTTPGET to the nearest of a number of mirror sites thatcontain a given document.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

The most important changes introduced in IPv6:

A streamlined 40-byte header.

• A number of IPv4 fields have been dropped or madeoptional.

• The resulting 40-byte fixed-length header allows for fasterprocessing of the IP datagram.

• A new encoding of options allows for more flexible optionsprocessing.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

The most important changes introduced in IPv6:

Flow labeling and priority.

• IPv6 has an elusive definition of a flow.

• RFC 1752 and RFC 2460 state that this allows ”labelingof packets belonging to particular flows for which thesender requests special handling, such as a nondefaultquality of service or real-time service.”

• For example, audio and video transmission might likely betreated as a flow.

• On the other hand, the more traditional applications, suchas file transfer and e-mail, might not be treated as flows.

• It is possible that the traffic carried by a high-priority user(for example, someone paying for better service for theirtraffic) might also be treated as a flow.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

The following fields are defined in IPv6:

• Version. This 4-bit field identifies the IP version number.Not surprisingly, IPv6 carries a value of 6 in this field.Note that putting a 4 in this field does not create a validIPv4 datagram. If it did, life would be a lot simpler, seethe discussion below regarding the transition from IPv4 toIPv6.

• Traffic class. This 8-bit field is similar in spirit to theTOS field we saw in IPv4.

• Flow label. As discussed above, this 20-bit field is usedto identify a flow of datagrams.

• Payload length. This 16-bit value is treated as anunsigned integer giving the number of bytes in the IPv6datagram following the fixed-length, 40-byte data- gramheader.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

The following fields are defined in IPv6:

• Next header. This field identifies the protocol to whichthe contents (data field) of this datagram will be delivered(for example, to TCP or UDP). The field uses the samevalues as the protocol field in the IPv4 header.

• Hop limit. The contents of this field are decremented byone by each router that forwards the datagram. If the hoplimit count reaches zero, the datagram is discarded.

• Source and destination addresses. The various formatsof the IPv6 128-bit address are described in RFC 4291.

• Data. This is the payload portion of the IPv6 datagram.When the datagram reaches its destination, the payloadwill be removed from the IP datagram and passed on tothe protocol specified in the next header field.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv6 Datagram header details

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv6 Datagram header details

• Traffic class. 8-bit field is similar in spirit to the TOSfield we saw in IPv4.

• Flow label. 20-bit field is used to identify a flow ofdatagrams.

• Payload length. This 16-bit value is treated as anunsigned integer giving the number of bytes in the IPv6datagram following the fixed-length, 40-byte datagramheader.

• Next header. This field identifies the protocol to whichthe contents (data field) of this datagram will be delivered(for example, to TCP or UDP). The field uses the samevalues as the protocol field in the IPv4 header.

• Hop limit. The contents of this field are decremented byone by each router that forwards the datagram. If the hoplimit count reaches zero, the datagram is discarded.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPv6 Datagram header details

• Source and destination addresses. The various formatsof the IPv6 128-bit address are described in RFC 4291.

• Data. This is the payload portion of the IPv6 datagram.When the datagram reaches its destination, the payloadwill be removed from the IP datagram and passed on tothe protocol specified in the next header field.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Backwards compatibility via dual-stack

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Backwards compatibility via tunneling

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPsec

While TLS or SSH secure application layer, IPsec end-to-endencrypts the network layer.

• Cryptographic agreement. two communicating hoststo agree on cryptographic algorithms and keys.

• Encryption of IP datagram payloads. When thesending host receives a segment from the transport layer,IPsec encrypts the payload. The payload can only bedecrypted by IPsec in the receiving host.

• Data integrity. allows the receiving host to verify thatthe datagram’s header fields and encrypted payload werenot modified while the datagram was en route from sourceto destination.

• Origin authentication. When a host receives an IPsecdatagram from a trusted source (with a trusted key see),the host is assured that the source IP address in thedatagram is the actual source of the datagram.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

IPsec

• When two hosts have an IPsec session established betweenthem, all TCP and UDP segments sent between them willbe encrypted and authenticated.

• IPsec therefore provides blanket coverage, securing allcommunication between the two hosts for all networkapplications.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Abstract graph model of a computer network

• Given any two nodes x and y, there are typically manypaths between the two nodes, with each path having acost.

• One or more of these paths is a least-cost path.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Link-state routing table building algorithm

• A global routing algorithm computes the least-cost pathbetween a source and destination using complete, globalknowledge about the network. That is, the algorithm takesthe connectivity between all nodes and all link costs asinputs.

• Link-state broadcast to all nodes in the network, and thencentrally perform Dijkstra’s algorithm to find theshortest path on a graph

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Least cost path and forwarding table for nodule u

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Distance vector routing table building algorithm

• In a decentralized routing algorithm, the calculation ofthe least-cost path is carried out in an iterative,distributed manner.

• No node has complete information about the costs of allnetwork links.

• Instead, each node begins with only the knowledge of thecosts of its own directly attached links.

• Then, through an iterative process of calculation andexchange of information with its neighboring nodes (thatis, nodes that are at the other end of links to which ititself is attached), a node gradually calculates theleast-cost path to a destination or set of destinations.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Distance-vector (DV) algorithm

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Hierarchical routing: interconnected autonomoussystems (AS)

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Autonomous systems

• Autonomous systems (ASs) consist of a group of routertypically under the same administrative control (e.g., operatedby the same ISP or belonging to the same company network).

• Routers within the same AS all run the same routing algorithmand have information about each other.

• The routing algorithm running within an autonomous system iscalled an intra-autonomous system routing protocol.

• Obtaining reachability information from neighboring ASs andpropagating the reachability information to all routers internalto the AS, are handled by the inter-AS routing protocol.

• Since the inter-AS routing protocol involves communicationbetween two ASs, the two communicating ASs must run thesame inter-AS routing protocol.

• In the Internet all ASs run the same inter-AS routing protocol,called BGP4

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Distributed: Routing Information Protocol (RIP)

• Each router maintains a RIP table known as a routingtable. A router’s routing table includes both the router’sdistance vector and the router’s forwarding table.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Distributed: Routing Information Protocol (RIP)

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Central: Open Shortest Path First (OSPF)

• Used by mega-ISPs OSPF was conceived as the successorto RIP and as such has a number of advanced features.

• At its heart, however, OSPF is a link-state protocol thatuses flooding of link-state information and a Dijkstraleast-cost path algorithm.

• With OSPF, a router constructs a complete topologicalmap (that is, a graph) of the entire autonomous system.

• The router then locally runs Dijkstra’s shortest-pathalgorithm to determine a shortest-path tree to all subnets,with itself as the root node.

• Individual link costs are configured by the networkadministrator

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Border Gateway Protocol version 4 (BGP4)

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

BGP provides each A.S. a means to:

1 Obtain subnet reachability information from neighboringASs.

2 Propagate the reachability information to all routersinternal to the AS.

3 Determine ”good” routes to subnets based on thereachability information and on AS policy.

Most importantly, BGP allows each subnet to advertise itsexistence to the rest of the Internet. A subnet screams ”I existand I am here,” and BGP makes sure that all the ASs in theInternet know about the subnet and how to get there. If itweren’t for BGP, each subnet would be isolated, alone andunknown by the rest of the Internet.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Border Gateway Protocol version 4 (BGP4)

• BGP session that spans two ASs is called an external BGP(eBGP) session

• BGP session between routers in the same AS is called aninternal BGP (iBGP) session

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Outline

1 IntroductionForwarding and routingDatagram networks

2 Router internalsInput processingSwitchingOutput processingQueuingRouting control pane

3 IPIPv4 datagramICMPIPv6 datagramIPsec

4 Routing algoritmsLink-stateDistance vectorHierarchical

5 Internet routingIntra-AS RIPIntra-AS OSPFInter-AS BGPBroadcast, multicast, anycast

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Broadcast, multicast, anycast

• In broadcast routing, the network layer provides a serviceof delivering a packet sent from a source node to all othernodes in the network;

• Multicast routing enables a single source node to send acopy of a packet to a subset of the other network nodes.

• IPv6 has introduced a new type of address, called ananycast address, which allows a datagram to be deliveredto any one of a group of hosts. This feature could beused, for example, to send an HTTP GET to the nearestof a number of mirror sites that contain a given document

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

Broadcast

• When a host sends a datagram with destination address255.255.255.255, the message is delivered to all hosts onthe same subnet.

Introduction

Forwarding androuting

Datagramnetworks

Routerinternals

Input processing

Switching

Outputprocessing

Queuing

Routing controlpane

IP

IPv4 datagram

ICMP

IPv6 datagram

IPsec

Routingalgoritms

Link-state

Distance vector

Hierarchical

Internetrouting

Intra-AS RIP

Intra-AS OSPF

Inter-AS BGP

Broadcast,multicast,anycast

How to broadcast?


Recommended