1 of 50

CS 31204: Computer Networks – History and Protocol Stack

INDIAN INSTITUTE OF TECHNOLOGY

KHARAGPUR

Department of Computer Science and Engineering

Sandip Chakraborty

sandipc@cse.iitkgp.ac.in

Abhijnan Chakraborty

abhijnan@cse.iitkgp.ac.in

2 of 50

Few slides in this presentation has been adopted from the online resources accompanying the book Computer Networking: A Top-Down Approach by Jim Kurose and Keith Ross

https://gaia.cs.umass.edu/kurose_ross/eighth.php

Indian Institute of Technology Kharagpur

3 of 50

Circuit Switching – the Beginning

  • The concept of how telephone switching works – creates a dedicated communication links between two communication nodes (telephones)

  • In January 1878, the first telephone switch went into operation in New Haven Connecticut.

Indian Institute of Technology Kharagpur

4 of 50

Circuit Switching

Indian Institute of Technology Kharagpur

5 of 50

Problem with Circuit Switching for Data Communication

  • Data traffic is bursty – uses an on-off pattern for data communication.

Indian Institute of Technology Kharagpur

6 of 50

Packet Switching

  • Decide data boundary from the communication of one user – data packets

Packet Multiplexing

Indian Institute of Technology Kharagpur

7 of 50

The First Packet Switching Network

Robert Taylor was promoted to the head of the information processing office at Defense Advanced Research Projects Agency (DARPA) in June 1966. He intended to realize Licklider's ideas of an interconnected networking system. Bringing in Larry Roberts from MIT, he initiated a project to build such a network. The first ARPANET link was established between the University of California, Los Angeles (UCLA) and the Stanford Research Institute at 22:30 hours on October 29, 1969.

Kleinrock said in an interview: "We typed the L and we asked on the phone,

"Do you see the L?"

"Yes, we see the L," came the response.

We typed the O, and we asked, "Do you see the O."

"Yes, we see the O."

Then we typed the G, and the system crashed ...

Yet a revolution had begun"

By December 5, 1969, a 4-node network was connected by adding the University of Utah and the University of California, Santa Barbara. 

Source: Wikipedia

Indian Institute of Technology Kharagpur

8 of 50

ARPANET – The First Packet Switching Network

Indian Institute of Technology Kharagpur

9 of 50

History of Computer Networks

Indian Institute of Technology Kharagpur

10 of 50

Internet Structure: A “network of networks”

  • Hosts connect to Internet via access Internet Service Providers (ISPs)
  • Access ISPs in turn must be interconnected
      • so that any two hosts (anywhere!) can send packets to each other
  • Resulting network of networks is very complex
      • Evolution driven by economics, national policies

Let’s take a stepwise approach to describe current Internet structure

mobile network

home network

enterprise

network

national or global ISP

local or regional ISP

datacenter

network

content

provider

network

Indian Institute of Technology Kharagpur

11 of 50

Internet Structure: A “network of networks”

Question: given millions of access ISPs, how to connect them together?

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

Indian Institute of Technology Kharagpur

12 of 50

Internet Structure: A “network of networks”

Question: given millions of access ISPs, how to connect them together?

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

connecting each access ISP to each other directly doesn’t scale: O(N2) connections.

Indian Institute of Technology Kharagpur

13 of 50

Internet Structure: A “network of networks”

Option: connect each access ISP to one global transit ISP?

Customer and provider ISPs have economic agreement.

global�ISP

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

Indian Institute of Technology Kharagpur

14 of 50

Internet Structure: A “network of networks”

ISP A

ISP C

ISP B

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

But if one global ISP is viable business, there will be competitors ….

Indian Institute of Technology Kharagpur

15 of 50

Internet Structure: A “network of networks”

ISP A

ISP C

ISP B

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

But if one global ISP is viable business, there will be competitors …. who will want to be connected

IXP

peering link

Internet exchange point

IXP

Indian Institute of Technology Kharagpur

16 of 50

Internet Structure: A “network of networks”

ISP A

ISP C

ISP B

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

… and regional networks may arise to connect access nets to ISPs

IXP

IXP

access

net

access

net

regional ISP

access

net

access

net

access

net

Indian Institute of Technology Kharagpur

17 of 50

Internet Structure: A “network of networks”

ISP A

ISP C

ISP B

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

access

net

… and content provider networks (e.g., Google, Microsoft, Akamai) may run their own network, to bring services, content close to end users

IXP

IXP

access

net

access

net

access

net

access

net

access

net

Content provider network

regional ISP

Indian Institute of Technology Kharagpur

18 of 50

Internet Structure: A “network of networks”

access

ISP

access

ISP

access

ISP

access

ISP

access

ISP

access

ISP

access

ISP

access

ISP

At “center”: small # of well-connected large networks

    • “tier-1” commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coverage
    • content provider networks (e.g., Google, Facebook): private network that connects its data centers to Internet, often bypassing tier-1, regional ISPs

Regional ISP

Regional ISP

Tier 1 ISP

Tier 1 ISP

IXP

Google

IXP

IXP

Indian Institute of Technology Kharagpur

19 of 50

Packet Switching: Store-and-forward

  • packet transmission delay: takes L/R seconds to transmit (push out) L-bit packet into link at R bps
  • store and forward: entire packet must arrive at router before it can be transmitted on next link

source

R bps

destination

1

2

3

L bits

per packet

R bps

One-hop numerical example:

  • L = 10 Kbits
  • R = 100 Mbps
  • one-hop transmission delay = 0.1 msec

Indian Institute of Technology Kharagpur

20 of 50

Packet Switching: Queueing

A

B

C

R = 100 Mb/s

R = 1.5 Mb/s

D

E

queue of packets

waiting for transmission over output link

Queueing occurs when work arrives faster than it can be serviced:

Indian Institute of Technology Kharagpur

21 of 50

Packet Switching: Queueing

Packet queuing and loss: if arrival rate (in bps) to link exceeds transmission rate (bps) of link for some period of time:

  • packets will queue, waiting to be transmitted on output link
  • packets can be dropped (lost) if memory (buffer) in router fills up

A

B

C

R = 100 Mb/s

R = 1.5 Mb/s

D

E

queue of packets

waiting for transmission over output link

Indian Institute of Technology Kharagpur

22 of 50

How Do Packet Delay and Loss Occur?

  • Packets queue in router buffers, waiting for turn for transmission
    • Queue length grows when arrival rate to link (temporarily) exceeds output link capacity
  • Packet loss occurs when memory to hold queued packets fills up

A

B

packet being transmitted (transmission delay)

packets in buffers (queueing delay)

free (available) buffers: arriving packets

dropped (loss) if no free buffers

Indian Institute of Technology Kharagpur

23 of 50

Packet Delay: Four Sources

dproc: nodal processing

  • check bit errors
  • determine output link
  • Typically, < microsecs

dqueue: queueing delay

  • time waiting at output link for transmission
  • depends on congestion level of router

propagation

nodal

processing

queueing

dnodal = dproc + dqueue + dtrans + dprop

A

B

transmission

Indian Institute of Technology Kharagpur

24 of 50

Packet Delay: Four Sources

propagation

nodal

processing

queueing

dnodal = dproc + dqueue + dtrans + dprop

A

B

transmission

dtrans: transmission delay:

  • L: packet length (bits)
  • R: link transmission rate (bps)
  • dtrans = L/R

dprop: propagation delay:

  • d: length of physical link
  • s: propagation speed (~2x108 m/sec)
  • dprop = d/s

dtrans and dprop

very different

Indian Institute of Technology Kharagpur

25 of 50

Caravan Analogy

  • car ~ bit; caravan ~ packet; toll service ~ link transmission
  • toll booth takes 12 sec to service car (bit transmission time)
  • “propagate” at 100 km/hr
  • Q: How long until caravan is lined up before 2nd toll booth?

  • time to “push” entire caravan through toll booth onto highway = 12*10 = 120 sec
  • time for last car to propagate from 1st to 2nd toll both: 100km/(100km/hr) = 1 hr
  • A: 62 minutes

toll booth

toll booth

(aka link)

ten-car caravan

(aka 10-bit packet)

100 km

100 km

toll booth

toll booth

(aka link)

toll booth

Indian Institute of Technology Kharagpur

26 of 50

Caravan Analogy

toll booth

toll booth

(aka router)

ten-car caravan

(aka 10-bit packet)

100 km

100 km

  • Suppose cars now “propagate” at 1000 km/hr
  • And suppose toll booth now takes one min to service a car
  • Q: Will cars arrive to 2nd booth before all cars serviced at first booth?

A: Yes! after 7 min, first car arrives at second booth; three cars still at first booth

Indian Institute of Technology Kharagpur

27 of 50

Packet queueing delay (revisited)

  • a: average packet arrival rate
  • L: packet length (bits)
  • R: link bandwidth (bit transmission rate)
  • La/R ~ 0: avg. queueing delay small
  • La/R -> 1: avg. queueing delay large
  • La/R > 1: more “work” arriving is more than can be serviced - average delay infinite!

La/R ~ 0

La/R -> 1

traffic intensity = La/R

average queueing delay

1

service rate of bits

R

arrival rate of bits

L

a

.

:

“traffic

intensity”

Indian Institute of Technology Kharagpur

28 of 50

“Real” Internet Delays and Routes

  • What do “real” Internet delay & loss look like?
  • traceroute program: provides delay measurement from source to router along end-end Internet path towards destination. For all i:

3 probes

3 probes

3 probes

    • sends three packets that will reach router i on path towards destination (with time-to-live field value of i)
    • router i will return packets to sender
    • sender measures time interval between transmission and reply

Indian Institute of Technology Kharagpur

29 of 50

Real Internet Delays and Routes

1 cs-gw (128.119.240.254) 1 ms 1 ms 2 ms

2 border1-rt-fa5-1-0.gw.umass.edu (128.119.3.145) 1 ms 1 ms 2 ms

3 cht-vbns.gw.umass.edu (128.119.3.130) 6 ms 5 ms 5 ms

4 jn1-at1-0-0-19.wor.vbns.net (204.147.132.129) 16 ms 11 ms 13 ms

5 jn1-so7-0-0-0.wae.vbns.net (204.147.136.136) 21 ms 18 ms 18 ms

6 abilene-vbns.abilene.ucaid.edu (198.32.11.9) 22 ms 18 ms 22 ms

7 nycm-wash.abilene.ucaid.edu (198.32.8.46) 22 ms 22 ms 22 ms

8 62.40.103.253 (62.40.103.253) 104 ms 109 ms 106 ms

9 de2-1.de1.de.geant.net (62.40.96.129) 109 ms 102 ms 104 ms

10 de.fr1.fr.geant.net (62.40.96.50) 113 ms 121 ms 114 ms

11 renater-gw.fr1.fr.geant.net (62.40.103.54) 112 ms 114 ms 112 ms

12 nio-n2.cssi.renater.fr (193.51.206.13) 111 ms 114 ms 116 ms

13 nice.cssi.renater.fr (195.220.98.102) 123 ms 125 ms 124 ms

14 r3t2-nice.cssi.renater.fr (195.220.98.110) 126 ms 126 ms 124 ms

15 eurecom-valbonne.r3t2.ft.net (193.48.50.54) 135 ms 128 ms 133 ms

16 194.214.211.25 (194.214.211.25) 126 ms 128 ms 126 ms

17 * * *

18 * * *

19 fantasia.eurecom.fr (193.55.113.142) 132 ms 128 ms 136 ms

traceroute: gaia.cs.umass.edu to www.eurecom.fr

* means no response (probe lost, router not replying)

3 delay measurements from

gaia.cs.umass.edu to cs-gw.cs.umass.edu

3 delay measurements

to border1-rt-fa5-1-0.gw.umass.edu

looks like delays decrease! Why?

trans-oceanic link

Indian Institute of Technology Kharagpur

30 of 50

Packet Loss

  • Queue (aka buffer) preceding link in buffer has finite capacity

A

B

packet being transmitted

buffer

(waiting area)

packet arriving to

full buffer is lost

  • Packet arriving to full queue dropped (aka lost)
  • Lost packet may be retransmitted by previous node, by source end system, or not at all

Indian Institute of Technology Kharagpur

31 of 50

Throughput

  • throughput: rate (bits/time unit) at which bits are being sent from sender to receiver
    • instantaneous: rate at given point in time
    • average: rate over longer period of time

server, with

file of F bits

to send to client

link capacity

Rs bits/sec

link capacity

Rc bits/sec

server sends bits

(fluid) into pipe

pipe that can carry

fluid at rate

(Rs bits/sec)

pipe that can carry

fluid at rate

(Rc bits/sec)

Indian Institute of Technology Kharagpur

32 of 50

Throughput

Rs < Rc What is average end-end throughput?

Rs bits/sec

Rc bits/sec

Rs > Rc What is average end-end throughput?

link on end-end path that constrains end-end throughput

bottleneck link

Rs bits/sec

Rc bits/sec

Indian Institute of Technology Kharagpur

33 of 50

Throughput: Network Scenario

10 connections (fairly) share backbone bottleneck link R bits/sec

Rs

Rs

Rs

Rc

Rc

Rc

R

  • per-connection end-end throughput: min(Rc,Rs,R/10)
  • in practice: Rc or Rs is often bottleneck

Indian Institute of Technology Kharagpur

34 of 50

TCP/IP Protocol Stack

Physical

Data Link

Network

Transport

Application

Physical

Data Link

Network

Transport

Application

Physical

Data Link

Physical

Data Link

Network

Physical

Data Link

Indian Institute of Technology Kharagpur

35 of 50

Transport Layer Services

  • Connection oriented communication
    • Create a logical connection between your machine and Google server

Process to process Connection

Identify processes using port number

Indian Institute of Technology Kharagpur

36 of 50

Transport Layer Services

  • Connection oriented communication
    • Create a logical connection between your machine and Google server

  • Ordered delivery of data packets

  • Reliability

  • Flow control

  • Congestion avoidance

Indian Institute of Technology Kharagpur

37 of 50

Network (Internet) Layer Services

  • Connectionless communication - construct messages (datagrams) from packets and route them to the next hop
    • Why do transport layer packets need to be converted to datagrams at every hop?

  • Host addressing - use IP addresses to uniquely identify a host in the network

  • Datagram routing - decide the path to route every datagram from the network graph

Indian Institute of Technology Kharagpur

38 of 50

Data Link Layer Services

  • Encapsulation of network layer data packets into frames

  • Frame synchronization

  • Error control

  • Flow control
    • Why do we need flow control at the link layer?

  • Channel access / medium access, Physical addressing

Indian Institute of Technology Kharagpur

39 of 50

Data Link Layer

Medium Access Control (MAC)

Logical Link Control (LLC)

Error control and flow control

Channel access and physical layer

addressing

Indian Institute of Technology Kharagpur

40 of 50

Addressing a Host in the Network

  • Every host has two addresses –
    • Logical address (IP address) – used to find out the path towards a host
    • Physical address (MAC address) - uniquely identify a host in the Internet

  • Logical address – Dr. Sandip Chakraborty, Room-311, Department of Computer Science and Engineering, IIT Kharagpur, Kharagpur - 721302, West Bengal, India

  • Physical address – My Aadhar number (XXXX XXXX XXXX)

Indian Institute of Technology Kharagpur

41 of 50

Addressing a Host in the Network

  • Every host has two addresses –
    • Logical address (IP address) – used to find out the path towards a host
    • Physical address (MAC address) - uniquely identify a host in the Internet

  • Logical address (32 bit IP address) – 172.16.32.64

  • Physical address (64 bit MAC address) – 00:00:00:14:22:01:2C:4D

Indian Institute of Technology Kharagpur

42 of 50

Protocol Stack Implementation in a Host

Software, Kernel

Firmware, Device Driver

Hardware

Physical

Data Link

Network

Transport

Application

Indian Institute of Technology Kharagpur

43 of 50

How Application Data Passes Through Different Layers

Physical

Data Link

Network

Transport

Application

HTTP Data

HTTP Header

HTTP Data

HTTP Header

TCP Header

HTTP Data

HTTP Header

TCP Header

IP Header

HTTP Data

HTTP Header

TCP Header

IP Header

MAC Header

HTTP Data

HTTP Header

TCP Header

IP Header

MAC Header

PHY Header

PHY Trailer

Indian Institute of Technology Kharagpur

44 of 50

How do you access a page at www.google.com?

  1. Application Layer: Use DNS to get the IP address of the Google server - DNS returns 74.125.224.72
  2. Application Layer: Construct an HTTP GET Request – �GET 74.125.224.72/index.html HTTP/1.1�Construct an HTTP packet and forward it to the transport layer

Indian Institute of Technology Kharagpur

45 of 50

How do you access a page at www.google.com?

  1. Transport Layer: Construct the transport layer packet (TCP packet)
    • Source port: 3324 (port address corresponding to your browser tab)
    • Destination port: 80 (port for a HTTP server)

Indian Institute of Technology Kharagpur

46 of 50

How do you access a page at www.google.com?

  1. Network Layer: Construct the network layer packet (IP packet)
    • Source IP: 172.16.22.121 (IP of your machine)
    • Destination IP: 74.125.224.72 (IP obtained from DNS query)

Indian Institute of Technology Kharagpur

47 of 50

How do you access a page at www.google.com?

  1. Network Layer: Use the routing procedure to find out the next hop IP to reach the Google server at 74.125.224.72. Let this IP be 172.16.28.192

172.16.28.192

172.16.22.121

74.125.224.72

Indian Institute of Technology Kharagpur

48 of 50

How do you access a page at www.google.com?

  1. Data Link Layer: Construct the data link layer frame from the IP datagram.
    • How do we get destination MAC address? We need the MAC address corresponding to 172.16.28.192

172.16.28.192

172.16.22.121

Gateway

Local Area Network (LAN)

Indian Institute of Technology Kharagpur

49 of 50

How do you access a page at www.google.com?

  1. Data Link Layer: Use ARP protocol to get the MAC address corresponding to 172.16.28.192

172.16.28.192

172.16.22.121

Gateway

Local Area Network (LAN)

Indian Institute of Technology Kharagpur

50 of 50

In Summary

Physical

Data Link

Network

Transport

Application

HTTP Data

HTTP Header

HTTP Data

HTTP Header

TCP Header

HTTP Data

HTTP Header

TCP Header

IP Header

HTTP Data

HTTP Header

TCP Header

IP Header

MAC Header

HTTP Data

HTTP Header

TCP Header

IP Header

MAC Header

PHY Header

PHY Trailer

Indian Institute of Technology Kharagpur