Internet and Tools, Media and Serial Lines
- Packet Switching
- Internet history, measuring Internet size
- ping, traceroute, telnet,
round-trip times
- Media:
- Copper
- Fiber
- Wireless and Satellites
- Serial Lines:
- Asynchronous Communication
- Encoding
- Baud Rates, Maximum Data Rates
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
Internet History
- late 1960s: ARPA (now DARPA) decided to fund research into networks
that could survive nuclear attacks
- ARPAnet evolved into NSFnet to 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
- lost
- duplicated
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
- how do you define a host connected to the Internet? Do modems count?
systems behind firewalls?
Measuring the Size of the Internet
- automatically count the number of names assigned by various entities
(60M in 2000):
- 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
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 ping
telnet
- I can ping www.x.com, but can't connect to its web server
- telnet www.x.com 80, type GET / HTTP/1.0 (and two
carriage returns)
- can use telnet to connect to any server that uses TCP
and ASCII encoding, including the one in your project
- you must know the address and port number
- Ping exercises:
- I recommend doing the exercises at the end of chapter 2
- in particular, what is the largest round-trip time you can find?
Transmission Media
- transmission involves sending bits of information
- energy is needed to signal the value of bits
- most commonly, we use electromagnetic energy:
- electrical (voltage/current) levels on wires
- radio
- microwave
- infrared
- light
- different media can carry different bit rates and have
different error rates
Electrical Wire
- "copper"
- long wires act like antennas: they lose signal energy, and
acquire unrelated signal energy (noise)
- to minimize antenna-like behavior, two geometric configurations:
- in both configurations, current in one direction is almost
canceled by current moving in the opposite direction
- relatively high error rate, relatively low bit rate (up to about
100MHz), relatively low cost, suitable for short distances
Optical Fibers
- light reflects back into the pipe
- on/off unidirectional signaling on a single fiber (bidirectional
is possible but rarely used)
- fiber types:
- multimode (greatest dispersion)
- multimode with low dispersion (signals traveling longer distances
travel faster)
- single-mode (least dispersion)
- relatively low error rate, high bit rate (THz), relatively high
cost, suitable for long-distance land-lines
Wireless Transmission
- electromagnetic radiation can be used in ranges of increasingly
higher frequency:
- Radio
- Microwave
- Infrared
- Light
- higher frequencies are more directional and (generally)
more affected by weather
- higher frequencies can carry more bits/second
Satellites
- wireless transmission to and from the satellite
- a transmission from the ground to a satellite is point-to-point
- a transmission from the satellite is a broadcast to a relatively
wide area
- satellites can be used to overcome the line-of-sight issues with
many wireless transmissions
- satellites add delay and cost
Serial Lines
- RS-232 standard, later augmented with RS-422 standard
- asynchronous communication: receiver must be able to
decode sender's signal without knowledge of the sender's clock
(with synchronous communication, the sender sends the clock as
well as the data)
- serial communication: one bit is sent on the wire before
the next bit is sent (opposite of parallel communication)
Bit Encodings
- one encoding: no voltage is no bit (idle), positive voltage is 1,
negative voltage is 0 bit
- RS-232 encoding: positive voltage is 0, negative (or zero) voltage is 1,
idle sends 1
- two sides of RS-232 must agree on the number of data
bits sent (e.g. 5, 8) and on the bit time (e.g. 9600 baud)
- sender sends the start bit (always 0), the n data bits, and 1 or more
stop bits (always 1)
- receiver starts an accurate clock at the center of the start bit,
uses it to read the data bits
- two signal wires plus ground give bidirectional communication
Bit Errors
- BREAK is a long sequence of zero bits --
multiple hundreds of milliseconds
- if a bit signal is corrupted (e.g. by lightning), the signal on the
wire may not be what was intended to be sent
- if the start bit is distorted (by noise or bad wiring), the receiver
may interpret the successive bits at the wrong time
- if the two endpoints fail to agree on bit time or number of
bits, the communication will fail and random-looking characters will
be received
Baud
- A Baud is the number of changes per second in the
signal (named after Baudot)
- for RS-232 and many other systems, the number of Baud is the
same as the number of bits per second
- but 10Mb/s Manchester-encoding Ethernet runs at 20MBaud
- 33Kb/s modems run at much lower baud rates (9600 baud?)
- the maximum frequency of transmission on a wire decreases
with distance, increases with power used
Nyquist Theorem
- the maximum frequency of transmission on a wire decreases
with distance
- frequency limiting means a signal is distorted, ideal
"vertical" transitions become slanted (slower) transitions
- a signal can be decomposed into frequencies (cycles per
second, Hertz): the bandwidth of a signal is the difference between
the maximum and the minumum (significant) frequencies of the signal
- Nyquist Sampling Theorem: if a signal has bandwidth B and
uses K signal levels, the maximum data rate is D = 2B log2K b/s
Shannon's Theorem
- it is impossible to reach the performance of Nyquist's theorem
in the presence of noise -- otherwise we could use very large K
to send lots of bits with little bandwidth
- signal power S, noise power N, signal-to-noise ratio S/N
- a decibel level dB is dB = 10 log10 S/N, so 20dB means
the signal is 100 times more powerful than the noise
- Shannon's theorem: the capacity C of a channel with bandwidth
B Hz is C = B log2(1+S/N) b/s
Example
- Telephone circuit has a bandwidth of 3000 Hz and a S/N ratio
of 30dB
- Shannon limit gives us
C = 3000 log2(1+1000) b/s =~ 30,000 b/s
- using the Nyquist theorem, this corresponds to using about
1,000 different signal levels
- in-class exercise: what channel capacity can we get if
the S/N ratio is 0dB and the bandwidth is 1,000 Hz?