Up to this point, we have considered hosts connected to a single segment. What if you want to connect multiple segments (or broadcast domains or wires)? There are three ways to connect segments in a computer network:
•Switches
•Routers
•Gateways
Switches act on the physical (Layer 2) interface. Routers act on the interface (Layer 3) address. Gateways or proxies act on some higher-level address, including the protocol identifier and port number. Gateways are outside the scope of this book.
Switches are the simpler of the two kinds of devices we want to look at, so we’ll start there. Figure 3-6 and the list that follows help to illustrate how a switch works.
Figure 3-6 Switching Packets
In Figure 3-6, if host A does not have any information on E, but A wants to send a packet to E:
Host A sends an address discovery packet for E. For IPv6, this will be a neighbor solicitation, and the packet’s destination address will be a multicast. For IPv4, this will be an ARP, and the packet’s destination will be a broadcast.
Switch C receives this packet. Because C receives this packet on port 1, C will learn A is connected to (or reachable by) port 1. A switch learns about which hosts are connected where by examining packets it receives in the normal course of the network’s operation. This is called bridge learning.
Switch C examines the destination address and discovers it is either a multicast (IPv6) or broadcast (IPv4). Broadcast and multicast packets should be forwarded out all unblocked ports, so C forwards this packet through port 2.
Host E receives the address resolution packet and responds.
When C receives E’s response on port 2, it learns E is reachable through port 2.
Switch C forwards E’s responses back through port 1, where A receives the response and builds a local table mapping E’s interface address to E’s physical address.
Note
Switches can decide not to forward a multicast packet out through a port if the switch knows there are no hosts listening to the multicast group. How the switch knows this is outside the scope of this book, but it involves the switch snooping on Internet Group Message Protocol (IGMP) packets.
When A sends a packet toward E, it will place E’s interface and physical addresses into the packet and transmit it onto the segment. When C receives this packet, it will examine its local table, called a bridge or forwarding table, and find E is reachable through port 2. Because the destination is on a different port than where C received the packet, C will forward the packet out the correct port (port 2 in this case). The full guide is at: https://www.acedexam.com/010-151-dctech-supporting-cisco-datacenter-networking-devices/
Note
Hosts will receive and process all packets with a broadcast physical address, some packets with a physical multicast address, and unicast packets only if the destination address matches the physical address of the interface. Switches, on the other hand, receive packets promiscuously, which means they receive and process every packet transmitted on the physical wire or segment.
The process of sending a packet from A to E seems to be just the same as it was without switch C in the network, so what purpose does the switch serve? Let’s walk through the process of A sending packets to B to see the difference:
Host A sends an address discovery packet for B. For IPv6, this will be a neighbor solicitation, and the packet’s destination address will be a multicast. For IPv4, this will be an ARP, and the packet’s destination will be a broadcast.
Switch C receives this packet. Because C receives this packet on port 1, C will learn A is connected to (or reachable by) port 1. A switch learns about which hosts are connected where by examining packets it receives in the normal course of the network’s operation. This is called bridge learning.
Switch C examines the destination address and discovers it is either a multicast (IPv6) or broadcast (IPv4). Broadcast and multicast packets should be forwarded out all unblocked ports, so C forwards this packet through port 2.
Host E receives the address resolution packet and does not respond because the packet request does not contain E’s interface address.
Host B receives the address resolution packet and responds with a unicast packet directly to host A.
When C receives B’s response on port 1, it learns B is reachable through port 1.
Host A receives B’s response and creates a local cache entry mapping B’s physical and interface address.
When A sends packets to B, switch C will receive these packets. When C looks up the packet’s destination in its local forwarding table, it will find B is reachable through port 1, which is the same port B itself is reachable through. Because the packet is received on the same port through which the destination is reachable, C does nothing with the packet.
Because C ignores the packet, E never receives it. For a single packet, the reduction in processing load might be small. Breaking up the network into parts greatly impacts the size of buildable networks—or the possible scale.
Top comments (0)