1 ip datagrams and datagram forwarding. 2 motivation for ip packets because it can connect...

16
1 IP Datagrams And Datagram Forwarding

Upload: jack-hodges

Post on 17-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

1

IP Datagrams And Datagram Forwarding

Page 2: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

2

Motivation For IP Packets

• Because it can connect heterogeneous networks, a router cannot transmit a copy of a frame that arrives on one network across another. To accommodate heterogeneity, an internet must define a hardware-independent packet format.

Page 3: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

3

Internet Packets

• Abstraction

• Created and understood only by software

• Contains sender and destination addresses

• Size depends on data being carried

• Called IP datagram

Page 4: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

4

Packet

• Because it can connect heterogeneous networks, a router cannot transmit a copy of a frame that arrives on one network across another. To accommodate heterogeneity, an internet must define a hardware-independent packet format

Page 5: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

5

The Two Parts Of An IP Datagram

• Header– Contains destination address– Fixed-size fields

• Payload– Variable size up to 64K– No minimum size

Page 6: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

6

Datagram Header

• Three key fields– Source IP address

– Destination IP address

– Type (contents)

Page 7: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

7

IPV4 Header

• From Tanenbaum’s book

Page 8: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

8

IP Datagram Forwarding

• Performed by routers

• Similar to WAN forwarding– Table-driven– Entry specifies next hop

• Unlike WAN forwarding– Uses IP addresses– Next-hop is router or destination

Page 9: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

9

An Example Internet

Page 10: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

10

Example Of An IP Routing Table

• Table (b) is for center router in part (a)

Page 11: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

11

Routing Table Size

• Because each destination in a routing table corresponds to a network, the number of entries in a routing table is proportional to the number of networks in an internet.

Page 12: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

12

Datagram Forwarding

• Given a datagram

• Extract destination address field, D

• Look up D in routing table

• Find next-hop address, N

• Send datagram to N

Page 13: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

13

Mask Field and Datagram Forwarding

• The destination address in a datagram header always refers to the ultimate destination. When a router forwards the datagram to another router, the address of the next hop does not appear in the datagram header.

• If (Mask[i] & D) == Destination[i])forward to NextHop[i];

Page 14: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

14

Key Concept

• The destination address in a datagram header always refers to the ultimate destination. When a router forwards the datagram to another router, the address of the next hop does not appear in the datagram header.

Page 15: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

15

IP Semantics

• IP is connectionless– Datagram contains identity of destination– Each datagram sent/handled independently

• Routes can change at any time

Page 16: 1 IP Datagrams And Datagram Forwarding. 2 Motivation For IP Packets Because it can connect heterogeneous networks, a router cannot transmit a copy of

16

IP Semantics(continued)

• IP allows datagrams to be– Delayed– Duplicated– Delivered out of order– Lost

• Called best effort delivery

• Motivation: accommodate all possible networks