Docsity

Project Report - Network Layer: Internet Protocol | CS 242, Study Guides, Projects, Research of Computer Systems Networking and Telecommunications

Partial preview of the text

Download Project Report - Network Layer: Internet Protocol | CS 242 and more Study Guides, Projects, Research Computer Systems Networking and Telecommunications in PDF only on Docsity!

Network Layer:Internet Protocol (IP)

CS 242: Computer NetworksWeek 08: Monday, 10/29/07Daniel BilarWellesley CollegeFall 2007

Goals today 

Progress report, project proposal questions 

Network layer: The Internet Protocol



Bare minimum to be on the ‘net’, provides interoperabilitybetween networks



IP datagram structure



Mapping parts of of network with traceroute



Addressing



Old: Classful (A,B,C,D) 

New: CIDR



Subnets 

Getting an IP address with DHCP Some slides adapted and pictures gratefully acknowledged

from Schul, Rexford and Kurose

Review: TCP algorithms 

Besides the limitation imposed by thereceiver through the receiver window ,TCP sender controls the congestionwindow value via 4 algorithms



Slow Start



Congestion Avoidance



Fast Retransmit



Fast Recovery

Review: Interplay of algorithms

Network “IP” layer^ 

Transport segment fromsending to receiving host^ 

On sending sideencapsulates segments intodatagrams 

on receiving side, deliverssegments to transport layer

^

Network layer protocolsin

every

host and router

^

Router examines headerfields in all IP datagramspassing through it andmakes decisions based ondata

applicationtransport^ network^ data linkphysical

applicationtransport^ network^ data linkphysical

network data linkphysical

network data linkphysical

network data linkphysical^ network^ data linkphysical

network data linkphysical

network data linkphysical

network data linkphysical

network data linkphysical

network data linkphysical

network data linkphysical

network data linkphysical

Purpose of IP: Interoperability^ FTP^ TCP^ IP

Ethernet

Ethernet

ATM IP

FTP TCP^ IP ATM

Router

Host

Bridge

ATM Switch

Host

The IP layer is a ‘lowest commondenominator’ for any participant onwhat we call the Internet

Key Functions



Routing:

Determine

route taken by packetsfrom source to dest.^ 

process of planning tripfrom source to destimation 

We’ll see more of this with^ routing algorithms



Forwarding:

Move

packets from router’s inputto appropriate routeroutput^ 

process of getting throughsingle interchange

(^12) 3

0111

value in arrivingpacket’s header

routing algorithm local forwarding table header value output link

0100010101111001

3 2 2 1

IP datagram format ver

length

32 bits

data

(variable length,typically a TCP

or UDP segment/datagram) 16-bit identifier

headerchecksum

time to

live

32 bit source IP address

IP protocol version

number

header length

(bytes) max number remaining hops (decremented at

each router)

total datagramlength (bytes)^ forfragmentation/reassembly

upper layer protocolto deliver payload to

head.len

type ofservice

“type” of data

flgs

fragment

offset

upperlayer

32 bit destination IP address

Options (if any)

E.g. timestamp,record routetaken, specifylist of routersto visit.

Overhead (bytes) 

20 (TCP) +20 (IP) = 40bytes + applayer

IP Header: Length, Fragments, TTL 

Total length (16 bits)



Number of bytes in the packet 

Maximum size is 63,535 bytes (

16



… though underlying links may impose harder limits



Fragmentation information (32 bits)



Packet identifier, flags, and fragment offset 

Supports dividing a large IP packet into fragments 

… in case a link cannot handle a large IP packet



Time-To-Live (8 bits)



Used to identify packets stuck in forwarding loops 

… and eventually discard them from the network

IP Header: More on Time-to-Live(TTL) 

Potential robustness problem



Forwarding loops can cause packets to cycle forever 

Confusing if the packet arrives much later



Time-to-live field in packet header



TTL field decremented by each router on the path 

Packet is discarded when TTL field reaches 0… 

…and “time exceeded” message is sent to the source

Example Traceroute: Berkeley toCNN

1

169.229.62. 2

169.229.59. 3

128.32.255. 4

128.32.0. 5

128.32.0. 6

209.247.159. 7

8

64.159.1. 9

209.247.9. Hop number, IP address, DNS name10 66.185.138.3311 *12 66.185.136.1713 64.236.16.

inr-daedalus-0.CS.Berkeley.EDUsoda-cr-1-1-soda-br-6-2vlan242.inr-202-doecev.Berkeley.EDUgigE6-0-0.inr-666-doecev.Berkeley.EDUqsv-juniper--ucb-gw.calren2.netPOS1-0.hsipaccess1.SanJose1.Level3.net?? pos8-0.hsa2.Atlanta2.Level3.netpop2-atm-P0-2.atdn.net? pop1-atl-P4-0.atdn.netwww4.cnn.com

No responsefrom router

No name resolution

Try Traceroute Yourself 

On UNIX machine (uses UDP datagram’s TTL)



Traceroute 

E.g., “traceroute

www.cnn.com

” or “traceroute



On Windows machine (Uses IP packet’s TTL)



Tracert 

E.g., “tracert

www.cnn.com

” or “tracert 12.1.1.1”



Common uses of traceroute



Discover the topology of the Internet 

Debug performance and reachability problems

IP Header: Header Checksum 

Checksum (16 bits)



Sum of all 16-bit words in the IP packet header (notdata – why?) 

If any bits of the header are corrupted in transit 

… the checksum won’t match at receiving host 

Receiving host discards corrupted packets

^

Sending host will retransmit the packet, if needed^134

Mismatch!

IP Header: To and From Addresses 

Two IP addresses



Source IP address (32 bits) 

Destination IP address (32 bits)



Destination address



Unique identifier for the receiving host 

Allows each node to make forwarding decisions



Source address



Unique identifier for the sending host 

Recipient can decide whether to accept packet 

Enables recipient to send a reply back to source