IP Forwarding - Internet - Lecture Slides, Slides of Internet and Information Access

These lecture slides are very easy to understand the internet.The major points in these lecture slides are:Ip Forwarding, Principles, End-To-End Datagram Delivery, Networks, Data Link Layer Layer, Datagram, Connected By Routers, Internetwork, Networks, Delivery Service

Typology: Slides

2012/2013

Uploaded on 04/25/2013

bageshri
bageshri 🇮🇳

4.3

(24)

175 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
IP Forwarding
1
Relates to Lab 3.
Covers the principles of end-to-end datagram delivery in IP networks.
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download IP Forwarding - Internet - Lecture Slides and more Slides Internet and Information Access in PDF only on Docsity!

IP Forwarding

1

Relates to Lab 3.

Covers the principles of end-to-end datagram delivery in IP networks.

Delivery of an IP datagram

• View at the data link layer layer:

  • Internetwork is a collection of LANs or point-to-point links or switched networks that are connected by routers

2

IP

Tenets of end-to-end delivery of

datagrams

The following conditions must hold so that an IP

datagram can be successfully delivered

4

1. The network prefix of an IP destination address must

correspond to a unique data link layer network (=LAN or

point-to-point link or switched network).

(The reverse need not be true!)

2. Routers and hosts that have a common network prefix

must be able to exchange IP dagrams using a data link

protocol (e.g., Ethernet, PPP)

3. Every data link layer network must be connected to at least

one other data link layer network via a router.

Routing tables

  • Each router and each host keeps a routing table which tells the router how to process an outgoing packet
  • Main columns: 1. Destination address: where is the IP datagram going to? 2. Next hop: how to send the IP datagram? 3. Interface: what is the output port?
  • Next hop and interface column can often be summarized as one column
  • Routing tables are set so that datagrams gets closer to the its destination

Destination Next Hop

interface

10.1.0.0/ 10.1.2.0/ 10.2.1.0/ 10.3.1.0/ 20.1.0.0/ 20.2.1.0/

direct direct R direct R R

eth eth serial eth eth eth

5

Routing table of a host or router

IP datagrams can be directly delivered (“direct”) or is sent to a router (“R4”)

Delivery of IP datagrams

  • There are two distinct processes to delivering IP datagrams:
    1. Forwarding: How to pass a packet from an input interface to the output interface?
    2. Routing: How to find and setup the routing tables?
  • Forwarding must be done as fast as possible:
    • on routers, is often done with support of hardware
    • on PCs, is done in kernel of the operating system
  • Routing is less time-critical
    • On a PC, routing is done as a background process

Processing of an IP datagram in IP

8

UDP TCP

Input queue

Lookup next hop

Routing Protocol

Destination address local?

Static routing

Yes

Send datagram

IP forwarding enabled?

No Discard

Yes (^) No

Demultiplex

routing table

IP module

Data Link Layer

IP router: IP forwarding enabled Host: IP forwarding disabledDocsity.com

Processing of an IP datagram at a

router

  1. IP header validation
  2. Process options in IP header
  3. Parsing the destination IP address
  4. Routing table lookup
  5. Decrement TTL
  6. Perform fragmentation (if necessary)
  7. Calculate checksum
  8. Transmit to next hop
  9. Send ICMP packet (if necessary)

10

Receive an

IP datagram

Routing table lookup

  • When a router or host need to transmit an IP datagram, it performs a routing table lookup
  • Routing table lookup: Use the IP destination address as a key to search the routing table.
  • Result of the lookup is the IP address of a next hop router, and/or the name of a network interface

Destination

address

Next hop/

interface

network prefix

or

host IP address

or

loopback address

or

default route

IP address of

next hop router

or

Name of a

network

interface

Routing table lookup: Longest Prefix

Match

  • Longest Prefix Match: Search for the routing table entry that has the longest match with the prefix of the destination IP address
  1. Search for a match on all 32 bits
  2. Search for a match for 31 bits …..
  3. Search for a mach on 0 bits

Host route, loopback entry  32-bit prefix match Default route is represented as 0.0.0.0/  0-bit prefix match

13

Destination address Next hop

10.0.0.0/ 128.143.0.0/ 128.143.64.0/ 128.143.192.0/ 128.143.71.0/ 128.143.71.55/ default

R R R R R R R

128.143.71.

The longest prefix match for 128.143.71.21 is for 24 bits with entry 128.143.71.0/

Datagram will be sent to R

Route Aggregation

Destination Next Hop

R

direct direct R R 14

• Longest prefix match algorithm permits to

aggregate prefixes with identical next hop address

to a single entry

• This contributes significantly to reducing the size

of routing tables of Internet routers

Destination Next Hop

R

direct direct R R R

Routing table manipulations with ICMP

  • When a router detects that an IP datagram should have gone to a different router, the router (here R2) - forwards the IP datagram to the correct router - sends an ICMP redirect message to the host
  • Host uses ICMP message to update its routing table

(1) IP datagram

(2) IP datagram

16

R

(3) ICMP redirect

ICMP Router Solicitation

ICMP Router Advertisement

  • After bootstrapping a host broadcasts an ICMP router solicitation.
  • In response, routers send an ICMP router advertisement message
  • Also, routers periodically broadcast ICMP router advertisement

This is sometimes called the Router Discovery Protocol