Академический Документы
Профессиональный Документы
Культура Документы
lecture_2 lecture_2
The network layer treats each packet independently Destination address and routing table: Routing indirect delivery
Route lookup for each packet (routing table) A B R3
IP is connectionless direct delivery direct delivery
IP routers are stateless
direct delivery
B
lecture_2 lecture_2 R
C D E F
lecture_2 lecture_2
1
Routing Table Search - Classless Routing Tables
Longest prefix first The basic idea with IP addressing (and CIDR) is to aggregate
addresses
Conceptually: divide table in 32 buckets - one for each netmask
length and match destination with longest prefixes first more specific networks (with longer prefixes)
less specific networks (with shorter prefixes)
SW algorithms: tree, binary trees, tries (different data structures)
More aggregation leads to smaller routing tables
HW support: TCAMs Content Addressable Memory
The ideal situation is to have domains publishing (exporting) only a
Masklen small set of prefixes
0 Effective address assignment policy
Netid
1 Some mechanisms lead to increased fragmentation
Netid
# of available addresses decreasing distribution of long prefixes (/24)
...
lecture_2 destination
destination IP
IP address
address lecture_2
IP Forwarding
A router switches packets between network interfaces
Extracts header information from the incoming datagram
Destination IP address
Makes a lookup in the forwarding information base by making a match
against networks
Next-Hop IP address,
ARP
Outgoing interface,...
Modifies datagram header
Mapping between logical IP addresses and
Sends on outgoing interface
physical addresses
But a router performs much more than IPv4 lookup
Access lists, filtering
Traffic management
Other protocols: Bridging, MPLS, IPv6, ...
lecture_2 lecture_2
2
Logical and Physical Addresses Communicating with a next-hop
Name: bsdi
bsdi sun
sun svr4
svr4
Name: bsdi
bsdi sun
sun svr4
svr4
lecture_2 lecture_2
lecture_2 lecture_2
lecture_2 lecture_2
3
ARP Timeouts Indirect/Direct Delivery and ARP
If there is no reply to an ARP request A sends an IP packet to B through router R
The machine is down or not responding Ethernet links to connect A and B to R
Request was lost, therefore retry (but not too often)
Eventually give up (When?) IP A IP R IP B
lecture_2 lecture_2
arp reply
Example: sun is hidden behind 140.252.1.183
As noted before, hosts have paid the price by servicing the broadcast,
netb: Netb responds on behalf netb so they can cache this information - this is one of the ways the proxy
of sun. ARP server could know the mapping
slip
140.252.1.129
Note that faking that you are another machine can be used to provide
sun failover for servers
lecture_2 lecture_2
lecture_2 lecture_2
4
Issues in IP
Following the end2end argument, only the absolutely
necessary functionality is in IP
Best Effort Service: Unreliable and Connectionless
Application or Transport layer handles reliability
IP How to deliver datagrams over multiple links (hops) in an
internetwork?
Addressing
Basic functionality and the IP packet header
Best-effort delivery service
Forwarding of packets from one link to another
Error handling
lecture_2 lecture_2
lecture_2 lecture_2
5
The ToS Byte Original proposal DSField Current Proposal
Bit 0 Bit 7
Bit 0 Bit 7 DSCP ECN
Precedence TOS
Differentiated Services (DiffServ) proposes to use 6 of these bits to
provide 64 priority levels - calling it the Differentiated Service (DS) field
Original Proposal RFC 791 RFC 2474
Bits 0-6: Differentiated Services CodePoint (DSCP)
Bits 0-2: Precedence
The DSCP is set when entering an area and determines the QoS
Defines priority e.g., when packets must be dropped handling of the IP datagram in the routers within that area
Scheduling
Bits 3-5: TOS
Shaping
Bit 3: 0 = Normal Delay, 1 = Low Delay Queue Dropping
Bit 4: 0 = Normal Throughput, 1 = High Throughput Explicit Congestion Avoidance (ECN)
Bit 5: 0 = Normal Reliability, 1 = High Reliability. ECN Capable Transport (ECT)
Congestion Experienced (CE)
lecture_2 lecture_2
If the IP datagram is larger than the MTU of the link layer, it In effect, only datagram service (e.g. UDP)
must be divided into several pieces to fit the MTU this is TCP uses 576 byte MTU or path MTU discovery
called fragmentation 3 fields of the IP header concerns fragmentation
lecture_2 lecture_2
lecture_2 lecture_2
6
Fragmentation Example Detailed The TTL field
MTU = 1500 bytes
TTL - Time To Live: 8 bits
IPv4 hdr UDP hdr Limit the lifetime of a datagram - avoid infinite loops
id=0, DF=0 Data
A router receiving a TTL>1 decrements the TTL and
20 bytes 8 bytes 1473 bytes forwards it
A TTL <= 1 shall not be forwarded
ICMP time exceeded is returned to the sender (later slide)
lecture_2 lecture_2
lecture_2 lecture_2
Summary
Basic Routing
Connectionless, next-hop routing
Routing tables: RIBs and FIBs
Longest prefix match
Address resolution
ARP
RARP
IP Internet Protocol
Basic functionality
Header fields
lecture_2