Layer 2 vs Layer 3 Addressing and Forwarding
- forwarding at layer 3 is referred to as routing
- forwarding at layer 2 is referred to as switching
How Switching and Routing are Used in a Network
- network is connected to the Internet via WAN interface on router
- router’s other interfaces are used to divide the network into 3 logical subnetworks
- subnets are mapped to layer 2 segments, each implemented using a switch
- nodes within each subnet can address one another directly
- can communicate with nodes in other subnets only via the router
- within each subnet, nodes use MAC addresses to forward frames to each other
- use a mechanism to translate between layer 3 IP address and layer 2 MAC addresses
- Network layer can forward between different types of layer 1/layer 2 networks
- private zone is implemented using Ethernet
- but link between router’s public interface and the ISP might use a different technology (e.g., DSL)
