What is a Router?

Repeaters, hubs, bridges, and routers are all devices with two or more network interfaces whose primary purpose is to forward data received on one interface to one of more of the other interfaces. What differentiates these devices is the way in which they accomplish this task.

A repeater simply rebroadcasts, one bit at a time, everything it receives on one interface to all its other interfaces. This can be used to extend the signalling distance of a network medium or to connect two or more network segments together.

A bridge operates at the next level above a repeater. The OSI model would categorize a bridge as being in the Data Link layer. It receives whole packets and rebroadcasts them on the other interfaces. Most bridges also attempt to learn what network addresses are on each network, and only transmit to those networks. This tends to isolate some of the traffic, thereby reducing congestion.

I can think of at least three different kinds of hubs. Your standard, everyday sort of hub is actually a repeater with several ports. A switching hub acts more like a bridge, but operates at a hardware level. An ARCnet passive hub is little more than a connector.

A router operates at the next level above a bridge, in the OSI model's Network layer. Where a bridge deals in packets for a specific media (ie, ethernet packets), a router involves itself with network protocols (IP, IPX, etc). Where a bridge will handle any packet transmitted over the network medium, a router can only deal with those protocols it was designed to understand. Repeaters, hubs, and bridges all act to create a single network from several pieces. A router creates an internetwork, where members of each network can communicate with members of the other network(s).

There are several advantages to using routers in place of the other devices mentioned above. Routers do a better job of isolating traffic to only those networks. Routers are better suited to very large and/or complex topologies (like the Internet) where data may make several hops to reach its destination, because a higher level approach is taken to understand the topology of the internetwork.

The Anatomy of a Router

Below is a picture of the business end of a Cisco 2501 router. This router has an ethernet port, two serial WAN ports, a console port and an auxilliary asynchronous serial port. Except for the console port, any of these ports can be used as network interfaces.

Another example of a router is an Ascend Pipeline 50, pictured below. It has an ISDN BRI WAN port, an ethernet port (AUI and 10baseT) and a console port. The BRI port and the ethernet port are both network interfaces. The BRI port can actually operate as two seperate interfaces, because of the way ISDN is channelized.

A network interface is a device which allows a router to connect to a network or another router for the purpose of communicating data (network packets). An ethernet interface connects the router to an ethernet network. A serial interface normally connects the router to another router, usually through a wide area network connection (a data circuit or phone line).

Inside the router is a computer. This computer is responsible for inputting data from the network interfaces, deciding what to do with it, and outputting it to the correct network interface. This job sounds simple, but there can be a lot of administrative overhead.

The router has a microprocessor just like a personal computer (although it is not normally an Intel processor). The Cisco 2501 has a Motorola 68030, which is also found in Macintoshes and many Unix workstations. A router has memory and ROM, and in the case of Cisco, flash memory and non-volatile memory. A typical Cisco 2501 might have 2 MB of memory, 4 MB of flash, and 32 KB of non-volatile memory.

The flash memory stores the router's operating system, which, in the case of Cisco, is called IOS. The operating system is normally the only software which exists on the router. The non-volatile memory stores the router's configuration.

Configuring Routers

Unlike repeaters, hubs, and bridges, a router is a powerful and flexible device. The downside of this is that it must be configured (and correctly). Since routers are not normally equipped with monitors and keyboards, it is necessary to log into the router from another device. Both the Cisco and the Ascend routers allow you to configure them through a serial port and (once initially configured) through the network.

Once connected, there is some sort of user-interface which the administrator must use to configure the router. With the Cisco, there is a rich command line language. With the Ascend, there is a window/menu based environment, plus a couple of command line tools.