





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















IP datagram forwarding, ARP
IPv
End-to-end protocols: UDP, TCP
End-to-end data: presentation formatting
network programming: sockets interface
class27.ppt
CS 213 F’
class27.ppt
Forwarding: the process of copying an input packet
Routing: the process of building the tables on each
Every IP datagram contains the IP address of the destination.
network.Network part of IP address uniquely identifies a single physical
physical network.All hosts and routers with same network part are on the same
least one other physical network.Every physical network on the Internet has a router connected to at
CS 213 F’
class27.ppt
if (NetworkNum(S) == NetworkNum(D)) { deliver packet directly to D
/* IP->physical mapping via ARP */
else deliver packet to default router
if (NextHop is an interface)NextHop = lookup(NetworkNum(D));
deliver packet directly to D using interface NextHop
else if (NextHop !=
else deliver packet to default router
NextHop) pairs(NetworkNum,consists ofForwarding table
Algorithm for router receiving packet for host DAlgorithm for host S sending to host D:
CS 213 F’
class27.ppt
R
R
H
H
H Network 3 (FDDI) H
H
H H
H
R
(Ethernet)Network 2
(Point-to-point)Network 4
Network 1 (Ethernet)
NetworkNum
NextHop
Interface
Interface
tableforwarding Router R
CS 213 F’
class27.ppt
Problem: IP addressing scheme makes inefficient use
Partial solution: subnetting
network to the external world.physical network part of address identifies a “virtual” physical
networks within the “virtual” physical network.use some of the high order “host” bits to identify local physical
network number
host number
Subnet mask (255.255.255.0)Class B address
xxxxxxxx xxxxxxxx xxxxxxxx
Subnet number
CS 213 F’
class27.ppt
if (D1 == MySubnetNum)D1 = SubnetMask & destination IP address deliver datagram directly to destination
else deliver datagram to default router for each forwarding table entry <SubnetNum,SubnetMask,NextHop>Algorithm on a host: if (D1 == SubnetNum)D1 = SubnetMask & destination IP address if (NextHop is an interface) deliver datagram directly to destination
else deliver datagram to NextHop (a router)
Algorithm on a router:
CS 213 F’
class27.ppt
registryID
providerID
SubscriberID
SubnetID
InterfaceID
embedded InterfaceID allows host to assign itself an IP address!
class27.ppt
Ver
Pri
Ver
IP version (6)
Pri/Flowlabel
Quality of Service )
PayloadLen
packet len (max 64KB)
NextHdr
header typeoptional/encapsulated
HopLimit
same as TTL in IPv
Source Address
128-bit source addr
Dest Address
128-bit dest addr
FlowLabel
PayloadLen
NextHdr
Source Address
HopLimit
Next header/data
(^4)
(^8)
16
24
31
Destination Address
TCP (6)authentication (51)fragmentation (44)Optional header examples:
CS 213 F’
class27.ppt
interfacesocketsBerkeley
process)(process-deliverybyte streamReliable
host)(host-to-deliverydatagrambest effortprocess)(process-deliverydatagrambest effort
Application (FTP, Telnet, WWW, email)Application (FTP, Telnet, WWW, email)
User Datagram Protocol
(UDP)
User Datagram Protocol
(UDP)
Transmission Control Protocol
(TCP)
Transmission Control Protocol
(TCP)
Internet Protocol (IP)Internet Protocol (IP)
Network Interface (ethernet)Network Interface (ethernet)
HardwareHardware
physical leveldata link levelnetwork leveltransport level
CS 213 F’
class27.ppt
process-to-process (end-to-end)
SrcPort
DstPort
CheckSum
Length
Data
CS 213 F’
class27.ppt
Source PortSource Port
Dest. PortDest. Port
AcknowledgmentAcknowledgmentSequence NumberSequence Number
Hlen/FlagsHlen/Flags
WindowWindow
D. ChecksumD. Checksum
Urgent PointerUrgent Pointer
Options..Options..
CS 213 F’
class27.ppt
(IP address, port)
connection
CS 213 F’
current window
Bytes 10 and higher cannot be sent until the right edge of window moves.Bytes 7 -- 9 have been not been sent but will be sent without delay.Bytes 3 -- 6 have been sent but not acknowledged (and thus must be buffered)Bytes through 2 have been sent and acknowledged (and thus can be discarded)
byte stream
right
curr
CS 213 F’
sender can increment left edge of window
sender can delete data to the left of the window.
sender can increment the right edge of its window
sender can transmit more data.