5-5 Interconnecting LANs with the Router
The previous section introduced the function of a router in a network. A router routes data based on the destination network address or logical address rather than the physical address used by layer 2 devices, such as the switch and the bridge. Information exchanged with bridges and layer 2 switches requires that the MAC address for the hosts be known. Routed networks such as most enterprise and campus networks use IP addressing for managing the data movement. Enterprise network is a term used to describe the network used by a large company. The use of the network or logical address on computers allows the information to be sent from a LAN to a destination without requiring that the computer know the MAC address of the destination computer. Remember, delivery of data packets is based on knowing the MAC address of the destination.
An overview of the router interface was presented in section 5-4. The router interface provides a way to access the router for configuration either locally or remotely. Interfaces are provided for making serial connections to the router and to other devices that require a serial communications link. For example, interfaces to wide area networking devices require a serial interface. RJ-45 ports are provided on the router interface for connecting the router to a LAN. Older routers can require the use of an AUI port to establish an Ethernet connection to a UTP cable. This port provides a 10Mbps data connection to Ethernet (10Mbps) networks. The RJ-45 connection is used to connect both Ethernet (10Mbps), FastEthernet (100Mbps), Gigabit Ethernet (1000Mbps), and 10 Gigabit Ethernet (10G) to a LAN. The RJ-45 connection can also support gigabit and 10G Ethernet, but high-speed data networks can also use a fiber connection.
This section introduces the information needed to design, manage, and configure campus networks. An example of a small interconnected LAN is provided in Figure 5-19. This example shows four Ethernet LANs interconnected using three routers. The LANs are configured in a star topology using switches at the center of the LAN. The LANs are labeled LAN A, LAN B, LAN C, and LAN D. The routers are labeled RouterA, RouterB, and RouterC (router naming protocols are discussed in Chapter 7, “Introduction to Router Configuration”). Connection of the routers to the LANs is provided by the router’s FastEthernet port (FA0/0, FA0/1, FA0/2, . . . ). Look for the FA label in Figure 5-19.
FIGURE 5-19 A small interconnected LAN.
The interconnections for the routers and the LANs are summarized as follows:
- Router A connects directly to the LAN A switch via FastEthernet port FA0/0. RouterA also connects directly to RouterB via the FastEthernet port FA0/1 and connects to RouterC via FastEthernet port FA0/2.
- Router B connects directly to the LAN B switch via FastEthernet port FA0/0. RouterB connects to the LAN C switch via FastEthernet port FA0/1. RouterB connects directly to RouterA via FastEthernet port FA0/2 and connects to RouterC via FastEthernet port FA0/3.
- Router C connects directly to the LAN D switch via the FastEthernet port FA0/0. Connection to RouterB is provided via Ethernet port FA0/1. RouterC connects to RouterA via FastEthernet port FA0/2.
The serial ports (S0/0, S0/1, S0/2,...) are not being used to interconnect the routers in this sample campus network. The serial interfaces are typically used to interconnect LANs that connect through a data communications carrier such as a telephone company (Telco).
The network configuration provided in Figure 5-19 enables data packets to be sent and received from any host on the network after the routers in the network have been properly configured. For example, computer A1 in LAN A could be sending data to computer D1 in LAN D. This requires that the IP address for computer D1 is known by the user sending the data from computer A1. The data from computer A1 will first travel to the switch where the data is passed to RouterA via the FA0/0 FastEthernet data port. RouterA will examine the network address of the data packet and use configured routing instructions stored in routing tables to decide where to forward the data. RouterA determines that an available path to RouterC is via the FA0/2 FastEthernet port connection. The data is then sent directly to RouterC. RouterC determines that the data packet should be forwarded to the FA0/0 port to reach computer D1 in LAN D. The data is then sent to D1. Alternatively, RouterA could have sent the data to RouterC through RouterB via Router A’s FA0/1 FastEthernet port. Path selection for data packets is examined in Chapter 9, “Routing Protocols.”
Delivery of the information over the network was made possible by the use of an IP address and routing tables. Routing tables keep track of the routes used for forwarding data to its destination. RouterA used its routing table to determine a network data path so computer A1’s data could reach computer D1 in LAN D. RouterA determines that a path to the network where computer D1 is located can be obtained via RouterA’s FA0/2 FastEthernet port to the FA0/2 FastEthernet port on RouterC. RouterC determines that computer D1 is on LAN D, which connects to RouterC’s FA0/0 FastEthernet port. An ARP request is issued by RouterC to determine the MAC address of computer D1. The MAC address is then used for final delivery of the data to computer D1.
If RouterA determines that the network path to RouterC is down, RouterA can route the data packet to RouterC through RouterB. After RouterB receives the data packet from RouterA, it uses its routing tables to determine where to forward the data packet. RouterB determines that the data needs to be sent to RouterC, and it uses the FA0/3 FastEthernet port to forward the data.
Gateway Address
The term gateway is used to describe the address of the networking device that enables the hosts in a LAN to connect to networks and hosts outside the LAN. For example, for all hosts in LAN A, the gateway address will be 10.10.10.250. This address is configured on the host computer. Any IP packets with a destination outside the LAN will be sent to the gateway address.
Network Segments
The network segment defines the networking link between two LANs. There is a segment associated with each connection of an internetworking device (for example, router—hub, router—switch, router—router). For example, the IP address for the network segment connecting LAN A to the router is 10.10.20.0. All hosts connected to this segment must contain a 10.10.20.x because a subnet mask of 255.255.255.0 is being used. Subnet masking is fully explained in Chapter 6.
Routers use the information about the network segments to determine where to forward data packets. For example, the network segments that connect to RouterA include
- 10.10.20.0
- 10.10.200.0
- 10.10.100.0
The computers in LAN A will have a 10.10.20.x address. All the computers in this network must contain a 10.10.20.x IP address. For example, computer A1 in LAN A will have the assigned IP address of 10.10.20.1 and a gateway address of 10.10.20.250. The computers in LAN B are located in the 10.10.10.0 network. This means that all the computers in this network must contain a 10.10.10.x IP address. The x part of the IP address is assigned for each host. The gateway address for the hosts in LAN B is 10.10.10.250.