CCNA Routing and Switching Complete Study Guide. Todd Lammle
alt="Diagram shows a network which includes a router at center that is connected to two switches on either side and each switch is connected to two computers. Connection between router and one switch is open."/>
FIGURE 1.3 Routers create an internetwork.
The network in Figure 1.3 is actually a pretty cool little network. Each host is connected to its own collision domain because of the switch, and the router has created two broadcast domains. So now our Sally is happily living in peace in a completely different neighborhood, no longer subjected to Bob’s incessant shouting! If Bob wants to talk with Sally, he has to send a packet with a destination address using her IP address – he cannot broadcast for her!
But there’s more… routers provide connections to wide area network (WAN) services as well via a serial interface for WAN connections – specifically, a V.35 physical interface on a Cisco router.
Let me make sure you understand why breaking up a broadcast domain is so important. When a host or server sends a network broadcast, every device on the network must read and process that broadcast – unless you have a router. When the router’s interface receives this broadcast, it can respond by basically saying, “Thanks, but no thanks,” and discard the broadcast without forwarding it on to other networks. Even though routers are known for breaking up broadcast domains by default, it’s important to remember that they break up collision domains as well.
There are two advantages to using routers in your network:
■ They don’t forward broadcasts by default.
■ They can filter the network based on layer 3 (Network layer) information such as an IP address.
Here are four ways a router functions in your network:
■ Packet switching
■ Packet filtering
■ Internetwork communication
■ Path selection
I’ll tell you all about the various layers later in this chapter, but for now, it’s helpful to think of routers as layer 3 switches. Unlike plain-vanilla layer 2 switches, which forward or filter frames, routers (layer 3 switches) use logical addressing and provide an important capacity called packet switching. Routers can also provide packet filtering via access lists, and when routers connect two or more networks together and use logical addressing (IP or IPv6), you then have an internetwork. Finally, routers use a routing table, which is essentially a map of the internetwork, to make best path selections for getting data to its proper destination and properly forward packets to remote networks.
Conversely, we don’t use layer 2 switches to create internetworks because they don’t break up broadcast domains by default. Instead, they’re employed to add functionality to a network LAN. The main purpose of these switches is to make a LAN work better – to optimize its performance – providing more bandwidth for the LAN’s users. Also, these switches don’t forward packets to other networks like routers do. Instead, they only “switch” frames from one port to another within the switched network. And don’t worry, even though you’re probably thinking, “Wait – what are frames and packets?” I promise to completely fill you in later in this chapter. For now, think of a packet as a package containing data.
Okay, so by default, switches break up collision domains, but what are these things? Collision domain is an Ethernet term used to describe a network scenario in which one device sends a packet out on a network segment and every other device on that same segment is forced to pay attention no matter what. This isn’t very efficient because if a different device tries to transmit at the same time, a collision will occur, requiring both devices to retransmit, one at a time – not good! This happens a lot in a hub environment, where each host segment connects to a hub that represents only one collision domain and a single broadcast domain. By contrast, each and every port on a switch represents its own collision domain, allowing network traffic to flow much more smoothly.
The term bridging was introduced before routers and switches were implemented, so it’s pretty common to hear people referring to switches as bridges. That’s because bridges and switches basically do the same thing – break up collision domains on a LAN. Note to self that you cannot buy a physical bridge these days, only LAN switches, which use bridging technologies. This does not mean that you won’t still hear Cisco and others refer to LAN switches as multiport bridges now and then.
But does it mean that a switch is just a multiple-port bridge with more brainpower? Well, pretty much, only there are still some key differences. Switches do provide a bridging function, but they do that with greatly enhanced management ability and features. Plus, most bridges had only 2 or 4 ports, which is severely limiting. Of course, it was possible to get your hands on a bridge with up to 16 ports, but that’s nothing compared to the hundreds of ports available on some switches!
Figure 1.4 shows how a network would look with all these internetwork devices in place. Remember, a router doesn’t just break up broadcast domains for every LAN interface, it breaks up collision domains too.
FIGURE 1.4 Internetworking devices
Looking at Figure 1.4, did you notice that the router has the center stage position and connects each physical network together? I’m stuck with using this layout because of the ancient bridges and hubs involved. I really hope you don’t run across a network like this, but it’s still really important to understand the strategic ideas that this figure represents!
See that bridge up at the top of our internetwork shown in Figure 1.4? It’s there to connect the hubs to a router. The bridge breaks up collision domains, but all the hosts connected to both hubs are still crammed into the same broadcast domain. That bridge also created only three collision domains, one for each port, which means that each device connected to a hub is in the same collision domain as every other device connected to that same hub. This is really lame and to be avoided if possible, but it’s still better than having one collision domain for all hosts! So don’t do this at home; it’s a great museum piece and a wonderful example of what not to do, but this inefficient design would be terrible for use in today’s networks! It does show us how far we’ve come though, and again, the foundational concepts it illustrates are really important for you to get.
And I want you to notice something else: The three interconnected hubs at the bottom of the figure also connect to the router. This setup creates one collision domain and one broadcast domain and makes that bridged network, with its two collision domains, look majorly better by contrast!
The best network connected to the router is the LAN switched network on the left. Why? Because each port on that switch breaks up collision domains. But it’s not all good – all devices are still in the same broadcast domain. Do you remember why this can be really bad? Because all devices must listen to all broadcasts transmitted, that’s why! And if your broadcast domains are too large, the users have