Outline
- Packet Switching
- the Internet
Packet Switching
- telephone networks work(ed) by physically connecting telephones
via copper contacts: circuit switching
- this circuit is reserved for the call whether or not anything is
being said
- computers spend a lot more time saying nothing than saying something,
so circuit switching is inefficient for data
- instead, computer networks are based on the idea of sending packets
to and from different computers along the same wires: packet switching
Packet Switching
- each wire is used to carry a packet at the full speed of the medium
- then, the same wire is reused to carry some other packet
- many users of the same wire amortize the cost so that each pays
relatively little and gets a lot of benefit:
- fast transmission when needed
- low price on average
- each packet groups bytes with (at least) a destination address
- every intermediate system uses the destination address to decide
where to send the packet
- the sending TCP breaks the stream of bytes into packets
and sends the packets
- the receiving TCP collects packets and reassembles them, in order,
into a stream of bytes
Best-Effort service
- packets may get lost, for a variety of reasons, in which case they
will not be delivered: packet loss
- a packet sent earlier may be delivered later than another packet:
packet reordering
- some of the bytes of a packet, or even the address, may be changed:
packet corruption
- a packet could even be delivered multiple times:
packet duplication
- to achieve reliable transmission, protocols such as TCP implement
acknowledgments and, if there is no acknowledgment after
a timeout, retranmsission of packets
Packet loss
- packet networks do not reserve bandwidth for individual users:
users simply send data when they are ready
- most of the time, this works well:
- because most systems send data only a small fraction of the time
- so combining traffic from many hosts leads to high link utilization
- which leads to relatively low cost per user
- some times, all users are trying to send at once
- all packet forwarders (routers and switches) can queue packets
that can't be sent immediately, and forward them in First In First
Out (FIFO) order
- this queuing delay is the biggest variable in transmission
time, as observed, e.g. in the ping in Exercise 1
- if the queue becomes long enough, the router or switch can
drop new packets that are received
- the routers and switches have no control over the amount of data
they receive, and their data forwarding capacity is finite
Internet Function
- an internet is a network of networks
- each individual network has its own mechanisms for delivering
data to all systems directly connected to that network
- the internet protocol is needed to deliver the data to systems
in other networks
- but transparently also works on the local network, and even
within the localhost
Distributed internet implementation
- a router is connected to multiple networks
- every IP packet has a destination address
- when an IP packet arrives at a router, the router looks
up (part of) the address in the router's routing table,
which indicates the next router to reach the destination
- making the internet work requires building and
maintaining correct routing tables on each router
Internet Structure
- at the core, a small number of very large, very fast systems all
interconnected to each other
- tier-2 ISPs connect to these tier-1 ISPs, and often to each other
- tier-3 ISPs generally only connect to one or two tier-2 ISPs
- home and small-office users and content providers generally
connect to tier-3 ISPs
- any network at any level can add additional links for frequent
traffic
Internet History
- late 1960s: ARPA (now DARPA) decided to fund research into networks
that could interconnect computers cheaply, and
that could survive nuclear attacks
- ARPAnet evolved into NSFnet into the Internet
- packet switching was picked over circuit switching because there
were very few resources (56Kb/s backbone) and efficiency was paramount
- the network offered very few guarantees: packets could be
- corrupted
- reordered
- delayed
- lost
- duplicated
- misdelivered
- these errors still happen in today's internet!
Internet Growth
- internet size around 30M hosts connected to the Internet in 1998
- growth rate exponential from 1981 through 1998, doubling about
every nine to twelve months
- growth rate substantially slower after 1998 -- "part of daily
life for about 2/3 of US population" ("Online Pursuits: The changing
picture of who's online and what they do", Mary Madden)
- how do you define a host connected to the Internet? Do modems count?
systems behind firewalls? systems intermittently connected?
- ==> it is becoming harder to count
Measuring the Size of the Internet
- automatically count the number of names assigned by various entities
(60M in 2000, 160M in 2003):
- very few hosts connected without a name
- there may be no host for a name
- some companies won't tell us what names they have assigned
- automatically solicit a response from a random subset of all possible
IP addresses (about 30M in 2000):
- some computers are designed not to reply to these responses ("ping"s)
- some firewalls block these responses
- routers and other machines with multiple interfaces (each with its
own IP address) will be counted multiple times
ping
edo@maru 233-> ping www.hawaii.edu
PING www1-94.its.Hawaii.EDU (128.171.94.101): 56 data bytes
64 bytes from 128.171.94.101: time=5.6 ms
64 bytes from 128.171.94.101: time=0.7 ms
64 bytes from 128.171.94.101: time=0.6 ms
64 bytes from 128.171.94.101: time=0.7 ms
-www1-94.its.Hawaii.EDU ping statistics-
4 packets transmitted, 4 packets received 0% packet loss
round-trip min/avg/max = 0.6/1.9/5.6 ms
- ping hostname
- on Solaris, ping -s hostname
- on Windows, x is alive
- determine raw connectivity
Round-Trip Times
- round-trip time is a lot easier to measure than one-way latency
- first round-trip time is slow: filling caches
- round-trip time may depend on physical distance, packet size,
network bandwidth, congestion
- round-trip times tell us:
- minimum: the latency of the uncongested network
- average: the performance seen by applications
- maximum: the delay variation (jitter) seen by retransmitting protocols
Exercise 1
- ping times:
- speed of light on fiber or cable is slower than in vacuum (about 2/3)
- communications don't go the shortest route, but have to follow
the cables, which may, e.g. go to LA instead of directly to SF
- routers have queueing delays, as discussed in class
- there may be some delay in the end system, plus the time for each
router to transmit the ping packet
- connections:
- the time per connection is a processing time, plus two or more ping times
- removing the fork() system call
- connections are still allowed while a non-forking server is not
calling accept()
- as long as listen specified a positive queue
length
- but the client program cannot interact with the server program.
traceroute
edo@maru 247-> traceroute www.ifa.hawaii.edu
traceroute to galileo.IfA.Hawaii.Edu (128.171.160.7)
1 128.171.10.1 (128.171.10.1) 1.14 ms 1.01 ms 1.019 ms
2 atm-to-manoa.uhnet.net (128.171.64.218) 1.454 ms 1.037 ms 1.019 ms
3 uhm-ifa-t3.gw.hawaii.net (128.171.68.2) 2.21 ms 2.216 ms 1.996 ms
4 galileo.IfA.Hawaii.Edu (128.171.160.7) 2.653 ms * 1.634 ms
- only needed when ping fails
- if all goes well, shows intermediate hosts (routers)
- sometimes no response (e.g. second packet from Galileo)
- times match (or should match) ping
telnet