Switches and Routers

Switch

Layer 2
Physically connects end systems / nodes in a network. allows them to connect to each other.
Based on MAC address. unconcerned with and oblivious of IP address.
Separates collision domains. micro-segmentation per port.
full-duplex links: switch port can be TX or RX at same time as node's NIC can be RX or TX (TX-RX or RX-TX).
enables virtual point-to-point connections in LAN: each node/host/end system can be communicating with another simultaneously.

Forwards incoming frame to node if switch knows which of its ports is the one connected to that node.
learns what MAC(s) at other end of link by reading incoming frame's SRC MAC. Stores this port--MAC address pair in its MAC address table.
Floods if node's port not learned yet or is a broadcast frame.

VLAN: virtual/logical network defined by set of ports on [one or more trunked] switch[es].
Vlan == broadcast domain == subnet == IP network
Trunk link between switches tags frames with 802.1Q 4B Vlan# header.
end systems are oblivious of Vlan. They only know what IP network (subnet) they are in.

STP: spanning tree protocol avoids loops in network with redundant links. A LAN with multiple switches (for efficiency and redundancy) can have multiple paths in the LAN to destination node; a loop might keep a frame cycling forever, so STP eliminates all loops.

Router

Layer 3
Connects IP networks together into an internetwork.
Based on IP address: hierarchical (network and host).
Each interface is in different IP network and has valid host IP address in that net.
Forwards packet to next hop in its journey in the internet.
Routing table indicates which interface a packet should be forwarded out.
Routing table created and maintained by a routing protocol.
Routers in the internet communicate among themseleves to converge upon the optimal routes to networks.
Security role: packet filtering firewall block/allow specified types or addresses of traffic.
Traffic management role: packets with unknown addresses dropped.
Separates broadcast domains (broadcasts are not forwarded to other networks).
Edge network has a default gateway: all packets destined to other networks go to it.


2600 routers
Switches

Wiring closet rack

VLAN