Flat networks are constructed by using bridges or Layer 2 LAN switches. This type of network is easy to configure, and it promises better performance than hierarchical networks; it offers higher throughput with lower latencies. However, the scalability of a flat network is limited, and a flat network is subject to broadcast storms.
Figure 8.13. An example of routers in a network
Routers can make linking and rerouting decisions, which makes possible selective routing of individual packets over multiple communication paths. Remember that bridges have to disable all but one path, whereas a router can decide on the fly between numerous communications paths. The path a router selects depends on the user's requirements, including cost, speed, and priority.
Routers are protocol specific, but they can support multiple protocols, such as TCP/IP or Novell's IPX/SPX. The key is that each of the protocols a router supports for internetworking requires its own separate routing table, so the more protocols the router supports, the more complex it is, the more memory intensive it is, and the more expensive it is. Routers can be used as bridges to connect similar and dissimilar networks, and again, they are often applied as firewalls.
The functions of a router are as follows:
• Learning— A router learns who its neighbors are and builds an addressing table based on
their addresses.
• Filtering— A router filters packets based on the addressing information it has gathered.
• Routing and switching— A router selects the best destinations based on the network
addresses, distance, cost, and availability.
• Adapting to network conditions— A router adapts to network conditions by changing what it
considers to be the best or optimum paths, depending on the network traffic status.
How do routers actually work? A router has input ports for receiving packets and output ports for sending those packets toward their destination. When the packet comes to the input port, the router examines the packet header and checks the destination against a routing table (that is, a database that tells the router how to send packets to various destinations). Based on the information in the routing table, the packet is sent to a particular output port, and the output port sends the packets to a router that is one step closer to that packet's destination. Packets are delivered from node to node (that is, router to router) because, at each node, the router modifies the MAC address to be that of the next node. The destination network address does not change, of course, but the destination MAC changes at each node—this is the only way that the packet can travel from one node to the next.
If packets come to the input port more quickly than the router can process them, they are sent to a holding area called an input queue. The router then processes packets from the queue in the order in
which were received. If the number of packets received exceeds the length of the queue, packets may be lost. When this happens, an error control mechanism (such as TCP) that is housed on the sending and receiving computers will have the packets resent. (You'll learn more about TCP in Chapter 9, "The Internet: Infrastructure and Service Providers.") There are two types of routing tables:
• Static— The simpler kind of routing table is the static routing table. In a static routing table,
there are specific ways of routing data to other networks, and only those paths can be used. New routes can be added to the routing table, but they have to be manually programmed. Static routing can't adjust routes as network traffic changes, so it isn't an optimal option for many applications today. A static router knows only its own routing table and does not communicate changes to any of its neighbors.
• Dynamic— Dynamic routing is much more useful than static routing. It allows a packet to
take multiple routes to reach its final destination. Dynamic routing also allows routers to change the way they route information, based on the amount of network traffic on some paths and routers. In dynamic routing, the routing table is a dynamic routing table that changes as network conditions change. A dynamic router talks with other routers so that they can all update their tables to reflect any changes.
There are two broad types of routing protocols: interior and exterior. Interior routing protocols are typically used only in the routers of an enterprise's intranet (that is, its internal network). Interior routing protocols include Routing Information Protocol (RIP) and Open Shortest Path First (OSPF). Exterior protocols are typically used for routers that are located in the Internet. Whereas there may be many different interior routing schemes, a single exterior routing system manages the whole global Internet, and it's based on Border Gateway Protocol 4 (BGP-4). (Routing protocols are discussed in detail in Chapter 9.)
Routers use a hierarchical addressing scheme, whereby the address includes both the network address and the node address. Routers operate at Layer 3, so they are networkable—you can route and relay traffic through a series of routers. Routers are protocol sensitive, so the more
internetworking protocols they support, the more complex the software and the greater the number of routing tables and algorithms required to support those protocols.
IP Switches
The network core is responsible for providing interconnectivity, server access, and network management to the edge devices on the network periphery. At the edge of a LAN, a shortage of network capacity, coupled with proliferation of broadcasts and multicasts, can create significant network problems. When the edge demand exceeds the capacity of the core, buffer overruns create capacity overload and lead to lost packets, reducing the availability and reliability of the network. As a result, users today are suffering from congestion, inadequate server access, and slow response