Comp 346/488: Intro to Telecommunications
Tuesdays 7:00-9:30, Lewis Towers 412
Class 1
Reading (7th -- 9th editions)
10.1, 10.2, 10.3
Chapter 1: 1.3, 1.4
Chapter 2, 2.1-2.6, especially 2.3 on TCP/IP
Topics
- POTS
- digital lines & encoding; transmission issues
- signal properties
- digitized sound and java programming
- packet-switched voice
- VOIP (Voice over IP): signaling protocols, IP management
- Synchronos Optical NETworks (SONET) and Asynchronous Transfer Mode (ATM)
- cellular telephony; spread-spectrum
- Asterisk phone switch
Basics
- Telecom v datacom
- POTS
- history
- Asterisk
- basics of packet switching
- review of protocols, IP as example
What is telecommunications? How is it different from data communications?
Phone system: 135 years old
Public internet: less than 20 years old
Characteristics of voice traffic: minimal delay, even smaller
variation in delay, but modest bandwidth: 64kbps voice channel (when
digitized)
The magic 64kbps number comes from 8-bit samples taken 8000 times per second. This is known as the DS0 rate
for digitized lines. This is in universal use in North America.
Sampling at 8000 times/second means, as we shall see, that frequencies
up to 4000 Hz are preserved. When we look at ultra-fast SONET
protocols, we'll see that no matter how large the bandwidth, the basic
frame rate is 8000 frames/second (frames simply get larger as the
bandwidth goes up), so one single byte in each consecutive frame always
represents a singld DS0 line.
Also: voice is loss-tolerant and error-tolerant! (cell-phone users unite!)
Why TCP is bad for voice: the problem
is that if a packet is lost, TCP stops and waits for the lost data to
time out and be retransmitted. This can introduce very large random
delays.
Note that Skype does use TCP, though.
Turnover delay: when you stop
talking, and the other person replies immediately, what delay do you
perceive? This equals one full RTT (round-trip time).
Fill time: with packet-based
telephony, the largest source of delay is packet fill time. Voice data
accumulates at 8 bytes/ms. If a packet is 1000 bytes, it will take 125
ms to fill, resulting in a minimum RTT of 250 ms. This is objectionably
large. Typically, voice packets contain much less data, as little as 48
bytes (ATM). Skype packets are variable-sized (in part due to
compression), but most packets have less than 120 bytes of data.
POTS
Plain Old Telphone System
(plugboard model); circuit switching (see chapter 10.2, figure 10.2)
-
Connecting exchanges
-
trunk lines, long-lines
Note the following features of classic-POTS:
- circuit switching
-
fixed bitrate / analog capacity
- reserved channel (even if you don't talk)
-
need for amplification
- packet switching
- how it differs
- telecom use of packetization
- extend timeline past 1882
- issues (below)
POTS today:
FXS (Foreign Exchange Subscriber) and FXO (Foreign Exchange Office) ports (4-wire modular jacks)
FXS ports are the ones you plug (analog) phones into.
FXO ports are the ones you connect to the line.
A traditional phone has an FXO port; the wall jack is the FXS port. A
typical modem card has an FXO port you connect to the wall jack, and an
FXS port that you plug your phone into so you can still call when the
modem is not in use.
A modem itself is a special kind of sound card: it translates between "modem sounds" and digital serial-line data.
from www.telephonetribute.com:
1793: first commercial SEMAPHORE system, between line-of-sight towers
(cf Terry Pratchet's SF novel Going Postal)
1860: end of semaphore
1844: Samuel FB Morse demo of telegraph: "What hath God wrought?"
1875: first speech by Alexander Graham Bell: "Mr. Watson, come here, I want you"
1876: first patent; offered to Western Union for $100K. Western Union refuses: "Furthermore, why would any
person want to use this ungainly and impractical device when he can send a
messenger to the telegraph office and have a clear written message sent to any
large city in the United States?"
Edison invents electric motor & phonograph
1877: AG Bell and Thos Watson form Bell Telephone Co
1880: 30,000 telephones in us
1882: Bell buys Western Union
1884: phone service between NY and Boston
1890: Herman Hollerith 1st punchcard contract for census
1892: Almon Strowger, St Louis undertaker, develops dial phone
Phone service between
NY and Chicago. You went to a special ATT office to place your call.
1894: Bell patents expire
1899: Brown Telephone Co founded; later to become Sprint
1906: Lee deForest invents the vacuum tube (a concept so preposterous he is later sued for fraud)
1907: Theodore Vail returns as CEO of ATT; founder of end-to-end policy
(control everything from phone to phone)
1913: 1st US antitrust suit against Bell system
1915: 1st use of vacuum-tube amplifiers; 1st transcontinental call
1922: Alexander Graham Bell dies
1949: US sues ATT to divest Western Electric
1951: First direct-dialed long-distance call
1956: consent decree: ATT could keep Western Electric but could only make telephone equipment, and had to license its patents
1956: Hush-a-phone decision: allowed customers to add things that did
not affect the network (like acoustic couplers)
1968: Carterphone decision: customers can add "customer premise equipment" (own phone, fax, etc)
1973: Robert Metcalfe invents Ethernet, at Xerox
1978: final implementation of Carterphone decision
1981: Bell divestiture trial begins; Judge Greene presiding
1982: Bell settles suit
1984: divestiture: ATT spins off the "seven sisters":
Ameritech - acquired by SBC, 1999
Bell Atlantic - acquired GTE, changed name to Verizon
Bell South - acquired by SBC/ATT in 2006
Nynex - acquired by Bell Atlantic, 1996
Pacific Telesis - acquired by SBC in 1997
Southwestern Bell: changed name to SBC in 1995, bought ATT in 2005 & changed name to ATT
US West - now owned by Qwest
GTE was also a full-sized phone company.
1986: Sprint "pin drop" advertising campaign, announcing an era of
long-distance quality equaling local-call quality. Sprint had the first
all-fiber network.
Telephony issues:
-
reservations of capacity
-
"virtual" circuits
-
physical transmission issues (signal degradation)
-
TDM, FDM (note that there are some subtle encoding issues)
-
Asynchronous Transfer Mode (ATM)
-
Fiber optics, SONET
- echo
Digitization; encoding of voice
Sampling rate, 8-bit v 16-bit encoding
Selling data-transmission lines (ISPs, WANs)
Cellular phones
Echo is a steady problem with phone systems. One source of the echo that you hear is your voice coming out the other party's handset, into their microphone, and back over the line to you.
If Alice and Bob talk to each other using skype, and Alice hears a lot
of echo while Bob hears none, a likely possibility is that Bob is using
his speakers, and his microphone picks up a lot of speaker sound, while
Alice is using headphones and a mike that does not pick up any
headphone sounds. That is, the echo Alice hears is "Bob's fault".
There is another, more intractable, form of echo. There are two wires
run to an analog phone. At some point relatively near the phone, the
two wires go into a special transformer called a hybrid and the output is two pairs
of wires: one pair for each direction. The signals then travel
separately in each direction, until they are recombined by the hybrid
at the other end. Hybrids create a certain amount of echo, due to
imperfect signal separation. As with the skype situation, the echo you
hear is the result of "leakage" at the hybrid at the other end.
Software echo suppression is cpu-intensive; this is best done in hardware.
Asterisk
The Asterisk open-source telephony project was started by Jim Dixon
(hardware) and Mark Spencer. Dixon was a telecom engineer who worked
with ATT 3b20's, and noticed that PC hardware was, in theory anyway,
catching up (or surpassing it). Around 1999, for an early Pentium
system, he developed a card with FXS and FXO ports. Because this
promised to revolutionize telephony, he named the cards for Emiliano
Zapata, the Mexican revolutionary.
Our phone switch has an analog TDM410 card, with 3 FXS ports, 1 FXO port, and hardware echo cancellation.
Asterisk can be used for many things (for example, it makes a darned
fine answering machine), but one of the most basic is as a private
phone switch, known in the telecom world as a Private Branch eXchange, or PBX.
Basically, a phone switch (Asterix or proprietary ATT or something else) consists of:
- A CPU
- analog phones connected to FXS ports
- trunk lines to the telco, connected to FXO ports
- possibly digital connections to things like channel banks and IP phones
We'll ignore call set-up for the moment. While you are making a call,
your voice data is collected one or two bytes at a time by the card
with the FXS port. The CPU is interrupted regularly, and the card
driver turns that voice sample over to the telephony software. The
software figures out which call it's part of, and puts the sample into
the outbound-voice queue of the appropriate outbound port.
One call can thus involve up to 8,000 interrupts / second. For CPUs,
this is not a very big number, although some older motherboard designs
made interrupts very expensive. The Zapata cards buffer the data 1ms at
a time (8 bytes), so they interrupt the CPU once per ms (probably
independent of the number of calls). With efficient interrupting (and
perhaps some buffering), a standard single-cpu PC can easily support 24
lines.
An alternative to FXS ports on cards is a channel bank:
a hardware device with 24 FXS/FXO ports on one side and a T1 line on
the other. T1 lines are, in the telecom world, bundles of 24 DS0 lines.
You then connect the PBX to the T1 (using a T1 card).
Asterisk voicemail
To get your messages, dial your extension and press "*". Then dial your password, normally the same as your extension.
Note that asterisk can be configured to email you your messages (in
addition to leaving them in your mailbox). Loyola has had some interest
in this feature for at least fifteen years, but with the Audix system it is too expensive.
When you set up an Asterix PBX, you assign extensions somewhat arbitrarily. Suppose we have a small number of trunk lines
from the telco that come into our PBX FXO ports, and many more internal
phones connected to FXS ports. Outbound calls are straightforward: the
telco doesn't really need to know who's placing the call (except that
we may want to cooperate with Caller ID by providing "CID"
information). But what about inbound calls? To which internal phone
should it be routed? Typically, we get a block of phone numbers from
the telco, and use those (or straightforward mods of those) for our
internal phone extensions. Then, when an inbound call arrives, our PBX
uses Direct Inward Dial, or DID, information attached to the beginning
of the call (often in analog form) in order to identify the desired
extension. The PBX then connects the call to that extension.
Basics of packet switching
packets
addressing
routing/switching
Simplest routing: every switch keeps every destination in a table
-
This is an extreme form of datagram routing
-
Does not scale beyond 105 hosts
Fairness issue of packet max size. This is particularly important if
1500-byte large packets are intermixed with 80-byte voice packets.
How does having a fixed bitrate differ from having a designated bandwidth?
Two problems: fairness and queuing delay / jitter.
PACKET "switching": users send individual bufferfuls, called PACKETS.
Think ~1KB, although much smaller packets are also in common use.
After one user is done, someone else has an opportunity to send.
Consider packets: with 16 users all sharing a 1Mbps line
(1 bit/microsec, 1Kb/ms), each gets 64Kbps if divided equally.
If.
There is, in fact, no guarantee of equal division, though, with packet switching.
Ethernet does not guarantee this, IP does not guarantee this.
(Token Ring guarantees that each active sender gets an equal share of the number of packets sent, but this means senders with smaller packets
get to send less data. And besides, token ring does not scale well.)
The whole point of packets is that you can send more if you have to:
packet-switched LANs support BURSTY transmission.
Furthermore, even if there were fairness, we have great irregularity at the small
scale. If soneone sends a 1.25KB (10Kb) packet, the line is tied up for
10 ms. Someone expecting 64Kbps would pile up 640 bits in that time.
Yes, they can be queued, but they will certainly arrive late.
Some delay is inevitable. But telephony users would like to see consistent delay, not random delay whenever some other user sends
off a big packet we have to wait for.
3-7 layer models
layering as software engineering
protocol graphs: ARP, video/audio system, etc
TCP/IP 4-5 layer model
OSI 7-layer model: problems with presentation & session layer
QUESTION: is it legitimate to separate the Internetwork (packet-delivery)
layer from the transport layer? Is it a good idea?
Clearly, there are cases where commingling the LAN and IP layers makes sense:
if there is no need to accomodate different low-level LAN protocols.
If you are building closed systems (eg if you are The Phone Company), that might happen.
Fig 2.3, p 39 (9th edition): what layer is ATM?
Brief review of TCP/IP, from the perspective of What is a protocol:
IP: note how routing table is minimized by having entries only for networks (or else turning things over to LAN)
IP is non-interactive; as a host protocol, IP really just describes
a format (well, we didn't talk about fragmentation reassembly).
Routers, though, have some active steps to take with IP.
TCP: this is much more interactive; both sides have a great deal
of state to maintain
Finish IP, TCP
-
addressing/naming
-
space for address bits: tension between this and small packets
-
SAP: a "port", an endpoint on a machine (Service Access Point)
-
PDU: data + header as seen at a particular level (Protocol Data Unit)
-
PDU of one layer will start with header of next layer up
Emphasize TCP statefulness
packet attributes: addresses, checksum (CRC), routing
LAN (Link) headers
IP header: fixed address for duration
Forwarding strategy
IP: a "compromise" layer; not needed in (dedicated-network) telephony?
TCP:
- timeout/retransmit
-
sequence numbers
-
connection / disconnection
-
port #s
Abstract TCP responsibilities:
- lost-packet recovery
-
end-to-end channel
- throughput optimization (sliding windows)
- congestion management
Frame Relay & ATM (using "virtual circuits"):
sort of like one giant LAN, but with strange physical headers
Protocols:
syntax, semantics, timing
-
examples from IP protocol
-
syntax: header format, addresses
-
semantics: router processing of packets,
-
sending host processing of packets
-
address assignment
- how we respond to lost packets
-
timing: for example, "no packets should be older than 30 sec"
IP protocol issues: syntax/semantics/performance
Host: basically send off, fragmenting if necessary
Router:
-
decide if local v nonlocal
-
either way, get physical addr for next hop
-
repackage
-
fragment if necessary
-
decrement TTL
-
update checksum
TCP protocol: finite-state machine.
TCP recognizes a number of states, eg
-
CLOSED
-
LISTEN
-
SYN_SENT
-
SYN_RECD
-
ESTABLISHED
-
CLOSING
-
TIME_WAIT
There are specific rules as to how TCP responds to each possible packet, in each possible state.
State diagram for 3-way handshake (9th edition: Figure 22.8 on p 710)
ITU v IETF standardization
ITU: Members are governments!
ISO: members include large corporations;
standards are expensive!
2.1: protocols cover such things as:
-
encapsulation
-
segmentation-reassembly
-
connection
-
ordered delivery
-
flow control
-
error control/correction
-
addressing
-
multiplexing
-
security
-
quality/priority
OSI
The OSI model is (finally) deprecated in the 9th edition.
7 layers. In OSI, transport and network are relatively independent; TCP and IP interact more.
OSI has 5 transport flavors; TCP/IP has 2 (TCP and UDP)
(some say TCP/IP needs more).
Presentation:
-
byte orientation,
-
other data format issues
-
encryption
-
compression (probably really needs to be application-specific)
Session: connection bookkeeping, BILLING,
-
connection-establishment part of transport
-
request/reply
-
interruption capability
-
full-duplex v one-way
-
grouping of data
Chapter 3: Today we will learn about sin
Sine waves
Electromagnetic signals; guided media (wire/fiber) v unguided ("wireless")
transmission media can be point-to-point v multiple-access (multipoint)
time-domain: horizontal axis is time
-
typical sine waves
-
square waves, nonperiodic signals
-
discrete v continuous
-
periodic signals
-
wavelength (v frequency)
-
phase
frequency-domain concepts
-
any periodic signal is a superposition of sine waves
-
Actually, any signal is, but you have more control of the frequencies
with periodic signals
-
construction of a square wave with sines: fourier.xls
-
discrete v continuous
-
deep question: why sin?
-
if we use sin/cos as basis, square wave has infinite bw
-
if we use square waves as basis, each individual one has zero bw
Fact: physical transmission media have natural action on sine
waves, due to things like "capacitance". This action is different
at different frequencies (eg high-frequency attenuation or distortion).
discussion of benefits of fourier analysis:
what if distortion is linear, but:
-
higher-frequency sine waves transmit faster/slower
-
higher-frequency sine waves get damped more
what if we want to understand bandpass filtering