Switching vs. Routing

team lib

It's not easy to tell a switch from a router these days.

There is a widespread misconception in networking circles that the difference between switching and routing is a simple binary opposition . In fact, it's very difficult to define the boundaries between the two functions. And needless to say, vendors call their product offerings by names that will result in the highest sales rather than by a careful study of where they fit in a logical taxonomy of devices. However, it's worth making an effort to clarify the distinction between switching and routing even if we're doomed to marketing-driven obfuscation in the long run.

As far as communication networks are concerned , the notion of switching begins with circuit switching. The telephone (or telegraph) company provides an electrical path that allows my instrument to connect to yours, perhaps with an operator plugging a connector into a jack. The telephone company first combined (or multiplexed) multiple calls on a single physical circuit using Frequency Division Multiplexing (FDM). You can think of these discrete calling paths as the first virtual circuits in the sense that there was no longer a one-to-one ratio between phone calls and wires (or insulators on the utility pole).

Frame Switching

However, FDM turned out to be insufficiently scalable for the demands of telephony. So, in the early 1960s the phone companies began digitizing voice signals and multiplexing them in the time domain using Time Division Multiplexing (TDM).

For example, with TDM a T1 line interleaves 24 phone calls among successive time slots within one frame, which consists of 193 bits. Bit 1 through bit 8 are dedicated to channel 1, bit 9 through bit 16 are dedicated to channel 2, and so on until bit 185 through bit 192 are dedicated to channel 24. The 193rd framing bit is used to synchronize the system. The interleaving process repeats 8,000 times each second. (Note that 193 bits per frame times 8,000 frames per second equals 1.544Mbits/sec, which is the throughput rate of a T1 line.)

Today, TDM phone call switching is circuit-oriented, though the devices that perform the switching function on digital circuits bear little resemblance to the mechanical switches that once selected paths made up of solitary electrical circuits.

One disadvantage to TDMwhether you're making a call with a TDM system or leasing a full-time digital lineis that your cost will be the same whether you fill every time slot with data or whether you transmit nothing (for our purposes, let's consider voice to be just another form of data). As we know, the data transmissions required for many applications are bursty , with intervals of high demand and no demand distributed almost randomly . Thus, TDM-based networks (or any circuit-oriented networks with hard resource allocations ) are likely to be inefficient or otherwise not wholly suitable for data traffic.

Ultimately, dedicated circuits are a high-cost form of connectivity, and setting up a circuit via a switching system designed for voice communications results in long circuit-initiation times, as well as high cost.

Packet Switching

In the late 1960s the notion of packet switching was developed. The first commercial outgrowth of this technology was the X.25 network, which is still heavily relied on in much of the world, in spite of outbreaks of Internet fever in many countries . Packets on an X.25 network aren't slotted rigidly in the way that circuits in the TDM system are. Instead, the packets are created and transmitted as needed. Therefore, X.25 service can be priced by the packet or by the byte rather than by connection time or as a full-time circuit; you're using network capacity only when you're sending or receiving data.

Despite this freer form of multiplexing, X.25 networks are still connection-oriented, and a session between two nodes still requires a virtual circuitthe virtual circuit has just been unbundled from a fixed time slot.

Each packet in an X.25 network has a Logical Channel Number, or LCN. When a packet comes into a switch, the switch looks up the LCN to decide which port to send the packet out of. The path through the network of packet switches is defined in advance for Permanent Virtual Circuits (PVCs) and established on the fly for Switched Virtual Circuits (SVCs). With SVCs, call setup is required before data transmission can take place.

Incidentally, the protocol data units at Layer 3 are known as packets, while the Layer 2 protocol data units are called frames, at least when writers are precise. The X.25 protocols include Layer 3 functions, while frame relay, which is essentially X.25 with error correction and flow control removed, remains at Layer 2.

Connectionless Switching

LANs, which people began to develop in the 1970s, are a form of connectionless communication. When a Layer 2 bridge connects LANs, a form of frame switching takes place. When a Layer 3 router connects LANs, a form of packet switching takes place. IP and its precursors were the first wide area connectionless protocols used extensively. Each packet includes its source and destination addresses and moves independently through the network.

With these connectionless switching systems, for the first time there was no advance setup of the path needed. There was no advance agreement on the part of the intermediate stages committing to a specific level of service. There was no state maintained on the network's packet switches, which have no notion of circuits, paths, flows, or any other end-to-end connection.

There's an economic and a fault-tolerance factor you should keep in mind when considering the router-using flavor of packet switching. The economic issue revolves around the relative costs of computer cycles and communications circuits. If processing power is cheap, it's not unreasonable to figure out the routes every packet should take in order to make the best use of expensive circuits. If circuits are cheap, you may prefer to set up a mesh of connections using relatively dumb circuit switches, rather than dedicate a bunch of high- powered , special-purpose computers to routing packets.

The fault-tolerance issue (often expressed as the overheated claim that the Internet was designed to survive a nuclear war) is that connectionless networks are more resilient than connection-oriented ones. If a link or a router goes down, the overall system is designed to find routes around the problem. A broken connection-oriented network, designed to remember how to handle each circuit rather than to solve a routing problem for each packet, will likely need manual reconfiguration if it consists of PVCs, and if it consists of SVCs, it will at least need to perform a call setup.

So, even though routing is a form of packet switching, we can distinguish routing from other forms of switching by its connectionlessness. By "connectionless," we mean that any responsibility for maintaining the "state" of an end-to-end connection lies with the end nodesthe network itself doesn't track a circuit, connection, or flow. Why wouldn't we say that routers maintain state information when we know that they in fact maintain routing tables that govern the process? The short answer is that routing tables are applied indifferently to each packet; a switch uses some aspect of a connection (or flow) that the packet includes to select the path through the network.

When routers begin to maintain the state of circuits, connections, or flows (presumably in order to accomplish something worthwhile, such as increased performance), then in this more rarefied sense it's reasonable for them to call themselves switches. (To watch the lines blur even more, read about new strategies to switching and routing below in "New Twists.")

In a flat switched Ethernet network there is only one path between any two nodes. The forwarding tables in the switches might be considered to maintain state since they describe an end-to-end connection, though it's a degenerate case.

Last Word

So you can't distinguish a router from a switch by OSI layer. There are legitimate switching functions that can be performed at Layer 3 as well as Layer 2. It's tempting to conclude that switching is something that gets done in hardware, while routing gets done in software on a microprocessor. The grain of truth behind this idea is that performance is one of the most significant drivers behind the adoption of switching products, but the boundaries between software and hardware get thinner all the time, and they're no help with the logical distinction we're looking for.

In a switching network, you'll find the intermediate devices keeping track ofor rememberingqualities of the connection. In a pure routing network, the intermediate devices will be indifferent to anything but handing off packets to the next device, and they will not be distracted by any other information, upstream or downstream.

New Twists

Companies Take New Approaches to Switching and Routing

Cisco Systems has a new technique it calls tag switching. Ipsilon Networks, with a device that combines traditional IP-routing software with ATM hardware, has produced a technology it calls IP switching. Both of these new methods perhaps blur the distinction between switching (in the narrow sense) and routing.

However, the blurring of distinctions may be appropriate because it's desirable to add some of the beneficial characteristics of connection-oriented architectures to the familiar world of connectionless routers. In particular, switching can have a performance advantage over routing. Switching permits the assignment and guarantee of Quality of Service (QOS) characteristics, along with providing better abilities to control congestion. Also, switching enables precise path selection, which can be useful for diagnostic purposes.

In a tag-switching network, an ingress router will add a tag to a packet as soon as a packet enters the network. If the network consists of routers, the tag is an index into the routing tables of downstream routers that improves performance by simplifying the route lookup. But the tag can also be a Virtual Channel Identifier (VCI) for an ATM switch or a frame relay virtual circuit. If an edge router has identified a path via an ATM switch or frame relay virtual circuit as being the optimal path for a particular packet, it will assign the packet the appropriate VCI tag, which will allow the packet to use the path to "cut through" a switched network.

Cisco claims it will begin shipping tag-switching products by mid-1997, and it has submitted related protocols to the IETF, though the prospect for standardization before the end of 1998 is dim, especially because somewhat-competing proposals from IBM, Cascade, and 3Com are also in play. [Editor's note: These efforts ultimately resulted in the widely accepted MPLS standards.]

IBM, Cascade, and 3Com have endorsed Ipsilon's IP switching, though they all continue to deliver products based on other technologies that at least parallel, if not compete with, Ipsilon's. Ipsilon's switching relies on its Ipsilon Flow Management Protocol (IFMP, see Broadcast, LAN Magazine, June 1996, page 20). The specifics of the protocol have been published as RFC 1953 and RFC 1954, and RFC 1987 describes the related switch management protocol. Note, however, that informational RFCs such as these are not in any way an effort at standardization as it is normally understood . The Ipsilon protocols are proprietary, although they have been openly published and other vendors, including Digital Equipment, have built products with them.

To understand IFMP, you must first understand that network users have to define policies describing what sequences of IP packets constitute a flow. In most cases, flows will be identified by source, destination, and port matchesfor instance, the ftp traffic between two nodes. Each qualifying IP flow is mapped to a virtual circuit in the ATM switch. If too many types of traffic are designated as flows, an ATM switch will get congested with too many virtual circuits; if too few are classified as flows, the network won't gain the maximum advantage from IP switching, because it will simply continue to route many flows.

The company claims that IP switching sets up a "soft state" across the network, as opposed to the "hard state" ATM switches establish. This is perhaps an alternate way of saying that a flow doesn't quite qualify as a connection, but it's still accurate to say that switching is taking place, not just routing.

Neither the Cisco approach nor the Ipsilon approach actually take full advantage of the capabilities of ATM, though they might claim this fact as a feature rather than a reservation. Tag switching has the advantage of supporting any Layer 3 protocol; Ipsilon initially supported only IP, though it has promised support for IPX. Tag switching is also more parsimonious with ATM virtual circuits than IP switching isCisco assigns a virtual channel to a route, and any traffic on that route will employ that virtual channel, while Ipsilon assigns a separate virtual channel to each flow, many of which might trace the same route.

This tutorial, number 105, by Steve Steinke, was originally published in the May 1997 issue of Network Magazine.

 
team lib


Network Tutorial
Lan Tutorial With Glossary of Terms: A Complete Introduction to Local Area Networks (Lan Networking Library)
ISBN: 0879303794
EAN: 2147483647
Year: 2003
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net