MAC Address and ARP

MAC Address and ARP

Why MAC address?

Notes:

MAC addresses (more)

Notes:

ARP: address resolution protocol

Question: how to determine interface’s MAC address, knowing its IP address?

ARP table: each IP node (host, router) on LAN has table

image-4.png287x210

ARP: how it works

Notes:

Ethernet, Switch and VLAN

Ethernet: physical topology

Notes:

Ethernet frame structure

sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

image-5.png397

image-6.png398

Ethernet switch

Switch: multiple simultaneous transmissions

Switch: self-learning

image-7.png221x247

Switch table (initially empty)

MAC addr interface TTL
A 1 60

Switch: frame filtering/forwarding

when frame received at switch:

  1. record incoming link, MAC address of sending host
  2. index switch table using MAC destination address

Pseudo:

if entry found for destination
then {
	if destination on segment from which frame arrived
		then drop frame
		else forward frame on interface indicated by entry
	}
else flood /* forward on all interfaces except arriving interface */

Self-learning, forwarding: example

MAC addr interface TTL
A 1 60
A' 4 60

Interconnecting switches

self-learning switches can be connected together:

image-8.png438x139

Q: sending from A to G - how does S1 know to forward frame destined to G via S4 and S3?

Notes:

VLAN (Virtual LAN): motivation

consider:

Notes:

image-9.png260x187

VLANs

port-based VLAN: switch ports grouped (by switch management software) so that single physical switch

Virtual Local Area Network:

image-10.png363x159

Notes:

Port-based VLAN

Notes:

Getting IP Address by DHCP

IP addresses: how to get one?

Q: How does a host get IP address?

DHCP: Dynamic Host Configuration Protocol

DHCP client-server scenario

image-11.png424x253

image-12.png426x353

DHCP: more than IP addresses

DHCP can return more than just allocated IP address on subnet:

DHCP: example

image-13.png308