Chapter 3: Switching
The main topic here is how LAN switching works; first, in 3.1, avery
generic approach to switching (much of which also applies to IP routing),
and then in 3.2 a specific application of switching to Ethernet (also called
bridging).These two sections are the main part of the chapter.
Switching assumes that each packet has an abstract destination address; switches
must make sure each packet is eventually delivered to that address.
This chapter also includes Section 3.3 on ATM ("asynchronous transfermode"),
which is an important and very different approach to LANs and switching.
We'll omit section 3.4 on switching hardware.
Section 3.1
The main issue for switches, which just connect different physical LANs,is
to figure out which way packets get forwarded; that is, to look at theaddress
and decide to where that switch will send the packet. Each switchmakes a
decision only for the next hop of the route, but, with a littlecoordination,
the packets get routed along the correct global path.
There are two main approaches to switching: datagram switching and virtual
circuits. There is also a third technique, source routing, that is seldom
used in practice. The Internet is built using datagram switching, as areswitched
Ethernets. ATM is a technique based on virtual circuits; the ideawas to support
the requirements for both data and voice. The essentialidea behind datagram
switching is that the switches do not maintainany state information
about endpoint-to-endpoint connections; they keepa huge table of every destination
and look up the next hop to thatdestination for every packet. This
means they spend a lot of time on lookup,and the per-packet overhead is very
high, but there is zero setup overheadfor sending a packet. Virtual circuit
mechanisms, on the other hand, requirethat a "virtual circuit" be set up
for every connection, which is a lotof setup overhead. The tradeoff is that
then the tables used to forwardeach individual packet can be kept very small
and compact (because theycontain entries only for the active connections,
not for every destinationin the world), and per-packet overhead is negligible.
Study questions:
Why would datagram switching work better with relatively large packets?(Think
about where the overhead is.) Why would virtual circuits be a betterchoice
if packets were small?
Exercises:
1 Give VC tables, given the connections
2 Give datagram tables
3 datagram tables with a "default" entry
4 From VC tables, figure out the connections
Section 3.2 - Ethernet bridging/switching
Just read 3.2.1, on how Ethernet bridges work. ("Bridge" is an older term
for "switch".) The basic idea is datagram routing, and every switch maintains
a table of all the known Ethernet hosts in the LAN (an Ethernet switchgenerally
has enough memory for at least 10,000 entries). The twist hereis how bridges
build these tables: by entering the source of eachpacket they see.
Initially the tables are empty. This strategy dependson a crucial feature:
if an Ethernet bridge doesn't know how to delivera packet, it has a fallback
delivery strategy of broadcasting it on alllinks. That strategy is
not available on the Internet at large,and so we'll see in chapter
4 that IP routing -- which also uses datagramrouting -- has to use a much
more upfront algorithm for building the routingtables.
Nowadays, it is routine for bridges to join Ethernet to Token Ring.
Study Questions
What are the limitations on how big a switched Ethernet can grow? Why can't
the entire Internet be one big switched Ethernet?
Exercises
13 Learning bridge example
Section 3.3 - ATM
Actually you are just to read 3.3.1 on the general strategy of cells. Cells
are tiny packets, relative to the IP/Ethernet world. In the latter,
packet sizes start at 512 bytes and go up to 1500 bytes, or more; in ATM,
cells (packets) are 53 bytes (48 bytes of data following 5 bytes of header).
The IP world, in general, believes in large packets. Cells are an important
example of the merits of small packets. Most (but not all) IP people have
been relatively uninterested in ATM.
ATM is usually installed today as a LAN alternative, but its originalproponents
really had in mind using it to replace IP entirely; the Internetwould become
a global ATM network and ATM's routing and congestion algorithmswould rule
the world. At the present time, this seems unlikely to cometo pass.
Study questions
People have said that "ATM" stands for "A Tariffing Mechanism" and "A Technological
Mistake". Explain these. Can you propose another?
Why are cells good for voice traffic?
Exercises
28 Why does cell switching always use virtual circuits?