SlideShare a Scribd company logo
1 of 19
1
IP - FORWARDING
K. PALANIVEL
Systems Analyst, Computer Centre
Pondicherry University, Puducherry – 605014.
LECTURE 11
COMS 525: TCPIP
COURSE
TOPIC
Part - II
Delivery of an IP datagram
• View at the data link layer:
– Internetwork is a collection of LANs or point-to-
point links or switched networks that are connected
by routers
2
IP
Delivery of an IP datagram
• View at the IP layer:
– An IP network is a logical entity with a network number
– We represent an IP network as a “cloud”
– The IP delivery service takes the view of clouds, and
ignores the data link layer view
3
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 datagrams 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/24
10.1.2.0/24
10.2.1.0/24
10.3.1.0/24
20.1.0.0/16
20.2.1.0/28
direct
direct
R4
direct
R4
R4
eth0
eth0
serial0
eth1
eth0
eth0
5
Routing table of a host or router
IP datagrams can be directly delivered
(“direct”) or is sent to a router (“R4”)
Delivery with routing tables
to:
20.2.1.2
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
7
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 disabled
Processing of an IP datagram in IP
• Processing of IP datagrams is very similar on an IP
router and a host
• Main difference: “IP forwarding” is enabled on router
and disabled on host
• IP forwarding enabled
 if a datagram is received, but it is not for the local
system, the datagram will be sent to a different
system
• IP forwarding disabled
 if a datagram is received, but it is not for the local
system, the datagram will be dropped
9
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
11
Type of routing table entries
• Network route
– Destination addresses is a network address (e.g.,
10.0.2.0/24)
– Most entries are network routes
• Host route
– Destination address is an interface address (e.g.,
10.0.1.2/32)
– Used to specify a separate route for certain hosts
• Default route
– Used when no network or host route matches
– The router that is listed as the next hop of the default route
is the default gateway (for Cisco: “gateway of last resort)
• Loopback address
– Routing table for the loopback address (127.0.0.1)
– The next hop lists the loopback (lo0) interface as outgoing
interface 12
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
…..
32. Search for a match on 0 bits
Host route, loopback entry
 32-bit prefix match
Default route is represented as 0.0.0.0/0
 0-bit prefix match
13
Destination address Next hop
10.0.0.0/8
128.143.0.0/16
128.143.64.0/20
128.143.192.0/20
128.143.71.0/24
128.143.71.55/32
default
R1
R2
R3
R3
R4
R3
R5
128.143.71.21
The longest prefix match for
128.143.71.21 is for 24 bits with
entry 128.143.71.0/24
Datagram will be sent to R4
Route Aggregation
Destination Next Hop
10.1.0.0/24
10.1.2.0/24
10.2.1.0/24
10.3.1.0/24
20.0.0.0/8
R3
direct
direct
R3
R2
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
10.1.0.0/24
10.1.2.0/24
10.2.1.0/24
10.3.1.0/24
20.2.0.0/16
30.1.1.0/28
R3
direct
direct
R3
R2
R2
How do routing tables get updated?
• Adding an interface:
– Configuring an interface eth2 with
10.0.2.3/24 adds a routing table
entry:
• Adding a default gateway:
– Configuring 10.0.2.1 as the default
gateway adds the entry:
• Static configuration of network routes or
host routes
• Update of routing tables through routing
protocols
• ICMP messages
Destination Next Hop/
interface
10.0.2.0/24 eth2
15
Destination Next Hop/
interface
0.0.0.0/0 10.0.2.1
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
R1
(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
Ethernet
H1
R1 R2
ICMP router
advertisement
ICMP router
advertisement
ICMP router
solicitation
17
QUESTIONS ???
11   coms 525 tcpip - internet protocol - forward

More Related Content

What's hot (20)

Rajesh basics of networking and routing
Rajesh basics of networking and routingRajesh basics of networking and routing
Rajesh basics of networking and routing
 
Routing
RoutingRouting
Routing
 
Routing Protocols
Routing Protocols Routing Protocols
Routing Protocols
 
How packet data travel over network
How packet data travel over networkHow packet data travel over network
How packet data travel over network
 
Lesson.7: Configuring IP Routing A
Lesson.7: Configuring IP Routing ALesson.7: Configuring IP Routing A
Lesson.7: Configuring IP Routing A
 
Chap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmpChap2. ipv4-arp-icmp
Chap2. ipv4-arp-icmp
 
Routing
RoutingRouting
Routing
 
Evolution of Routing Techniques
Evolution of  Routing TechniquesEvolution of  Routing Techniques
Evolution of Routing Techniques
 
Arp
ArpArp
Arp
 
Routing Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.pptRouting Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.ppt
 
Dynamic Routing All Algorithms, Working And Basics
Dynamic Routing All Algorithms, Working And BasicsDynamic Routing All Algorithms, Working And Basics
Dynamic Routing All Algorithms, Working And Basics
 
Rip ospf and bgp
Rip ospf and bgpRip ospf and bgp
Rip ospf and bgp
 
Network layer
Network layerNetwork layer
Network layer
 
Icmp
IcmpIcmp
Icmp
 
Dik acn presentation
Dik acn presentationDik acn presentation
Dik acn presentation
 
Routing
RoutingRouting
Routing
 
16 coms 525 tcpip - routing protocols -all
16    coms 525 tcpip - routing protocols -all16    coms 525 tcpip - routing protocols -all
16 coms 525 tcpip - routing protocols -all
 
Networking Chapter 7
Networking Chapter 7Networking Chapter 7
Networking Chapter 7
 
Routing
RoutingRouting
Routing
 
Week16 lec1
Week16 lec1Week16 lec1
Week16 lec1
 

Similar to 11 coms 525 tcpip - internet protocol - forward

Computer network (12)
Computer network (12)Computer network (12)
Computer network (12)NYversity
 
MULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKSMULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKSKathirvel Ayyaswamy
 
RHSA_1_Chapter(11)_Resume_chaptre_11.pptx
RHSA_1_Chapter(11)_Resume_chaptre_11.pptxRHSA_1_Chapter(11)_Resume_chaptre_11.pptx
RHSA_1_Chapter(11)_Resume_chaptre_11.pptxAbdellahELMAMOUN
 
Uccn1003 -may10_-_lect04a_-_intro_to_routing_rules
Uccn1003  -may10_-_lect04a_-_intro_to_routing_rulesUccn1003  -may10_-_lect04a_-_intro_to_routing_rules
Uccn1003 -may10_-_lect04a_-_intro_to_routing_rulesShu Shin
 
Networking Chapter 8
Networking Chapter 8Networking Chapter 8
Networking Chapter 8mlrbrown
 
Routing of netwok protocls and how .pptx
Routing of netwok protocls and how .pptxRouting of netwok protocls and how .pptx
Routing of netwok protocls and how .pptxsayidkhalif
 
Lecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignmentsLecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignmentsSerious_SamSoul
 
Gohil-Network layer & Address Resolution Protocol.pptx
Gohil-Network layer & Address Resolution Protocol.pptxGohil-Network layer & Address Resolution Protocol.pptx
Gohil-Network layer & Address Resolution Protocol.pptxJuvil2
 
474-22-DatagramForwarding.pptx
474-22-DatagramForwarding.pptx474-22-DatagramForwarding.pptx
474-22-DatagramForwarding.pptxThangamaniR3
 
Apnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshopApnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshopNguyen Minh Thu
 

Similar to 11 coms 525 tcpip - internet protocol - forward (20)

tcpip.ppt
tcpip.ppttcpip.ppt
tcpip.ppt
 
Clase 4. Routing IP.pdf
Clase 4. Routing IP.pdfClase 4. Routing IP.pdf
Clase 4. Routing IP.pdf
 
Computer network (12)
Computer network (12)Computer network (12)
Computer network (12)
 
IP Routing.pptx
IP Routing.pptxIP Routing.pptx
IP Routing.pptx
 
MULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKSMULTIMEDIA COMMUNICATION & NETWORKS
MULTIMEDIA COMMUNICATION & NETWORKS
 
RHSA_1_Chapter(11)_Resume_chaptre_11.pptx
RHSA_1_Chapter(11)_Resume_chaptre_11.pptxRHSA_1_Chapter(11)_Resume_chaptre_11.pptx
RHSA_1_Chapter(11)_Resume_chaptre_11.pptx
 
Chapter_4.pptx
Chapter_4.pptxChapter_4.pptx
Chapter_4.pptx
 
Uccn1003 -may10_-_lect04a_-_intro_to_routing_rules
Uccn1003  -may10_-_lect04a_-_intro_to_routing_rulesUccn1003  -may10_-_lect04a_-_intro_to_routing_rules
Uccn1003 -may10_-_lect04a_-_intro_to_routing_rules
 
Networking Chapter 8
Networking Chapter 8Networking Chapter 8
Networking Chapter 8
 
Routing of netwok protocls and how .pptx
Routing of netwok protocls and how .pptxRouting of netwok protocls and how .pptx
Routing of netwok protocls and how .pptx
 
Lecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignmentsLecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignments
 
Gohil-Network layer & Address Resolution Protocol.pptx
Gohil-Network layer & Address Resolution Protocol.pptxGohil-Network layer & Address Resolution Protocol.pptx
Gohil-Network layer & Address Resolution Protocol.pptx
 
IP Routing
IP RoutingIP Routing
IP Routing
 
computerNetworkSecurity.ppt
computerNetworkSecurity.pptcomputerNetworkSecurity.ppt
computerNetworkSecurity.ppt
 
TCP/IP and UDP protocols
TCP/IP and UDP protocolsTCP/IP and UDP protocols
TCP/IP and UDP protocols
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
ADDRESSING PADA TCP IP
ADDRESSING PADA TCP IPADDRESSING PADA TCP IP
ADDRESSING PADA TCP IP
 
474-22-DatagramForwarding.pptx
474-22-DatagramForwarding.pptx474-22-DatagramForwarding.pptx
474-22-DatagramForwarding.pptx
 
Apnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshopApnic-Training-IPv6_workshop
Apnic-Training-IPv6_workshop
 
Network Layer
Network LayerNetwork Layer
Network Layer
 

More from Palanivel Kuppusamy

15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocolsPalanivel Kuppusamy
 
14 coms 525 tcpip - applications - snmp
14    coms 525 tcpip - applications - snmp14    coms 525 tcpip - applications - snmp
14 coms 525 tcpip - applications - snmpPalanivel Kuppusamy
 
13 coms 525 tcpip - applications - file transfer protocol
13   coms 525 tcpip - applications - file transfer protocol13   coms 525 tcpip - applications - file transfer protocol
13 coms 525 tcpip - applications - file transfer protocolPalanivel Kuppusamy
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnetPalanivel Kuppusamy
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ipPalanivel Kuppusamy
 
07 coms 525 tcpip - udp [autosaved]
07    coms 525 tcpip - udp [autosaved]07    coms 525 tcpip - udp [autosaved]
07 coms 525 tcpip - udp [autosaved]Palanivel Kuppusamy
 
06 coms 525 tcpip - dhcp and dns
06   coms 525 tcpip - dhcp and dns06   coms 525 tcpip - dhcp and dns
06 coms 525 tcpip - dhcp and dnsPalanivel Kuppusamy
 
04 coms 525 tcpip - arp and rarp
04   coms 525 tcpip - arp and rarp04   coms 525 tcpip - arp and rarp
04 coms 525 tcpip - arp and rarpPalanivel Kuppusamy
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpipPalanivel Kuppusamy
 
01 coms 525 tcpip - networking concepts review
01   coms 525 tcpip - networking concepts review01   coms 525 tcpip - networking concepts review
01 coms 525 tcpip - networking concepts reviewPalanivel Kuppusamy
 
00 coms 525 tcpip - introduction to networks
00   coms 525 tcpip -  introduction to networks00   coms 525 tcpip -  introduction to networks
00 coms 525 tcpip - introduction to networksPalanivel Kuppusamy
 

More from Palanivel Kuppusamy (16)

15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocols
 
14 coms 525 tcpip - applications - snmp
14    coms 525 tcpip - applications - snmp14    coms 525 tcpip - applications - snmp
14 coms 525 tcpip - applications - snmp
 
13 coms 525 tcpip - applications - file transfer protocol
13   coms 525 tcpip - applications - file transfer protocol13   coms 525 tcpip - applications - file transfer protocol
13 coms 525 tcpip - applications - file transfer protocol
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnet
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ip
 
09 coms 525 tcpip - tcp 2
09   coms 525 tcpip - tcp 209   coms 525 tcpip - tcp 2
09 coms 525 tcpip - tcp 2
 
08 coms 525 tcpip - tcp 1
08   coms 525 tcpip - tcp 108   coms 525 tcpip - tcp 1
08 coms 525 tcpip - tcp 1
 
07 coms 525 tcpip - udp
07    coms 525 tcpip - udp07    coms 525 tcpip - udp
07 coms 525 tcpip - udp
 
07 coms 525 tcpip - udp [autosaved]
07    coms 525 tcpip - udp [autosaved]07    coms 525 tcpip - udp [autosaved]
07 coms 525 tcpip - udp [autosaved]
 
06 coms 525 tcpip - dhcp and dns
06   coms 525 tcpip - dhcp and dns06   coms 525 tcpip - dhcp and dns
06 coms 525 tcpip - dhcp and dns
 
05 coms 525 tcpip - icmp
05   coms 525 tcpip - icmp05   coms 525 tcpip - icmp
05 coms 525 tcpip - icmp
 
04 coms 525 tcpip - arp and rarp
04   coms 525 tcpip - arp and rarp04   coms 525 tcpip - arp and rarp
04 coms 525 tcpip - arp and rarp
 
03 coms 525 tcpip - ip address
03   coms 525 tcpip -  ip address03   coms 525 tcpip -  ip address
03 coms 525 tcpip - ip address
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpip
 
01 coms 525 tcpip - networking concepts review
01   coms 525 tcpip - networking concepts review01   coms 525 tcpip - networking concepts review
01 coms 525 tcpip - networking concepts review
 
00 coms 525 tcpip - introduction to networks
00   coms 525 tcpip -  introduction to networks00   coms 525 tcpip -  introduction to networks
00 coms 525 tcpip - introduction to networks
 

Recently uploaded

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 

Recently uploaded (20)

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 

11 coms 525 tcpip - internet protocol - forward

  • 1. 1 IP - FORWARDING K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University, Puducherry – 605014. LECTURE 11 COMS 525: TCPIP COURSE TOPIC Part - II
  • 2. Delivery of an IP datagram • View at the data link layer: – Internetwork is a collection of LANs or point-to- point links or switched networks that are connected by routers 2 IP
  • 3. Delivery of an IP datagram • View at the IP layer: – An IP network is a logical entity with a network number – We represent an IP network as a “cloud” – The IP delivery service takes the view of clouds, and ignores the data link layer view 3 IP
  • 4. 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 datagrams 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.
  • 5. 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/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.1.0.0/16 20.2.1.0/28 direct direct R4 direct R4 R4 eth0 eth0 serial0 eth1 eth0 eth0 5 Routing table of a host or router IP datagrams can be directly delivered (“direct”) or is sent to a router (“R4”)
  • 6. Delivery with routing tables to: 20.2.1.2
  • 7. 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 7
  • 8. 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 disabled
  • 9. Processing of an IP datagram in IP • Processing of IP datagrams is very similar on an IP router and a host • Main difference: “IP forwarding” is enabled on router and disabled on host • IP forwarding enabled  if a datagram is received, but it is not for the local system, the datagram will be sent to a different system • IP forwarding disabled  if a datagram is received, but it is not for the local system, the datagram will be dropped 9
  • 10. 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
  • 11. 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 11
  • 12. Type of routing table entries • Network route – Destination addresses is a network address (e.g., 10.0.2.0/24) – Most entries are network routes • Host route – Destination address is an interface address (e.g., 10.0.1.2/32) – Used to specify a separate route for certain hosts • Default route – Used when no network or host route matches – The router that is listed as the next hop of the default route is the default gateway (for Cisco: “gateway of last resort) • Loopback address – Routing table for the loopback address (127.0.0.1) – The next hop lists the loopback (lo0) interface as outgoing interface 12
  • 13. 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 ….. 32. Search for a match on 0 bits Host route, loopback entry  32-bit prefix match Default route is represented as 0.0.0.0/0  0-bit prefix match 13 Destination address Next hop 10.0.0.0/8 128.143.0.0/16 128.143.64.0/20 128.143.192.0/20 128.143.71.0/24 128.143.71.55/32 default R1 R2 R3 R3 R4 R3 R5 128.143.71.21 The longest prefix match for 128.143.71.21 is for 24 bits with entry 128.143.71.0/24 Datagram will be sent to R4
  • 14. Route Aggregation Destination Next Hop 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.0.0.0/8 R3 direct direct R3 R2 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 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.2.0.0/16 30.1.1.0/28 R3 direct direct R3 R2 R2
  • 15. How do routing tables get updated? • Adding an interface: – Configuring an interface eth2 with 10.0.2.3/24 adds a routing table entry: • Adding a default gateway: – Configuring 10.0.2.1 as the default gateway adds the entry: • Static configuration of network routes or host routes • Update of routing tables through routing protocols • ICMP messages Destination Next Hop/ interface 10.0.2.0/24 eth2 15 Destination Next Hop/ interface 0.0.0.0/0 10.0.2.1
  • 16. 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 R1 (3) ICMP redirect
  • 17. 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 Ethernet H1 R1 R2 ICMP router advertisement ICMP router advertisement ICMP router solicitation 17