Switching/Routing

Explained Layer 2 - Switching

  • Uses Mac Addresses (hardcoded into devices)
  • Only for traffic in a local or private network
  • Done by switches

Example Mac address: f8:4d:89:84:eb:8e

Layer 3 - Routing

  • Uses IP Addresses
  • For traffic and routing in a global matter
  • Done by routers

Example IP address: 10.55.22.1/32

  • Switches don’t care for IP-Addresses - only Mac-Addresses Layer 2 !!!
  • Each computer can talk to the other on the same local network
  • And it must be on the same subnet

switching

A subnet for one IP address

ip-address1

A subnet for two IP addresses

ip-address2

More subnets

ip-addresses

A subnet for 256 IP addresses

ip-adress256

  • Talk to different subnets –> router (gateway) must be used
  • Gateway IP needs to be specified –> Gateway IP must be usually on same subnet

networking1