Ethernet
CS/ECE 438: Spring 2014 Instructor: Matthew Caesar http://courses.engr.illinois.edu/cs438/
Ethernet CS/ECE 438: Spring 2014 Instructor: Matthew Caesar - - PowerPoint PPT Presentation
Ethernet CS/ECE 438: Spring 2014 Instructor: Matthew Caesar http://courses.engr.illinois.edu/cs438/ Some History Ethernet was invented as a broadcast technology Each packet received by all attached hosts Easy to set up, cheap to
CS/ECE 438: Spring 2014 Instructor: Matthew Caesar http://courses.engr.illinois.edu/cs438/
framing, encoding, devices (hubs/switches/bridges), forwarding, addressing
5
done transmitting a packet
6
LAN segments, learning
and-play
7
8
End Host
0D:73:CA:F3 F0:4D:A2:3A
Switch Cable
9
End Host
0D:73:CA:F3 F0:4D:A2:3A
Switch Cable
10
End Host
0D:73:CA:F3 F0:4D:A2:3A
Switch Cable
Root Switch
11
network introduces problems
isolation, lack of access control
very fast
subscribers
A B source dest
add A to list of hosts on port 1
but is not mandatory
Port 1 Port 2
Bridge A B C X Y Z
Host Port A 1 B 1 C 1 X 2 Y 2 Z 2
14
groups called VLANs
subnet, single broadcast domain
VLAN tag
VLAN
B1
Faculty VLAN Student VLAN
Student printers Student workstations Faculty printer Faculty fileserver Faculty workstation
management
to addressing restrictions
topology
configuration file
16
Trunk ports Access ports
VLAN 1 VLAN 2
header
combinations
17
Trunk ports Access ports
VLAN 1 VLAN 2
untagged frames
native VLAN
18
Trunk ports Access ports
VLAN 1 VLAN 2
into/from trunking, even if neighbor disagrees), Desirable (attempts to make port a trunk; pursues agreement with neighbor)
19
auto auto desirable
Can we create VLAN 7? Ok.
VLAN 7
communicate with a remote host B
Protocol”
Hosts
Router
27
28
Client DHCP Server DHCP DISCOVER DHCP DISCOVER DHCP DISCOVER DHCP DISCOVER DHCP OFFER DHCP OFFER DHCP OFFER DHCP OFFER DHCP REQUEST DHCP REQUEST DHCP REQUEST DHCP REQUEST DHCP ACK DHCP ACK DHCP ACK DHCP ACK DHCP RELEASE DHCP RELEASE DHCP RELEASE DHCP RELEASE
“Can anyone give me an IP address*?” (bcast)
*and other config information
“Sure, you can use 10.0.0.3” (multiple offers can arrive) “Ok, I would like to use 10.0.0.3” “Ok, you can use 10.0.0.3” Returns 10.0.0.3 to available pool 10.0.0.3 acquired “I am done with 10.0.0.3”
information
information
information
“offer” message
information
“offer” message
information
“offer” message
(DHCP “relay agents” used when the DHCP server isn’t on the same broadcast domain -- see text)
Router
XYZ DHCP Server
a.b.c.d is mine from (now’, now’+lease) a.b.c.d is XYZ’s from (now, now+c.lease)
we’re back on track in ~lease time
Router
XYZ DHCP Server
a.b.c.d is mine from (now, now+lease) a.b.c.d is XYZ’s from (now, now+c.lease)
Router
XYZ DHCP Server
a.b.c.d is mine from (now, now+lease) a.b.c.d is XYZ’s from (now, now+c.lease)
Router
Host Host Host Host DHCP Server
DNS Server What I learnt from DHCP my IP: 1.2.3.48 netmask: 1.2.3.0/24 (255.255.255.0) DNS: 1.2.3.156 router: 1.2.3.19
Router
Host Host Host Host DNS 1.2.3.48 1.2.3.156 58-23-D7-FA-20-B0 90-E2-A1-09-66-1B 1.2.3.53 1.2.3.156 IP packet
with IP addresses
to a given IP address?
IP address
42
bridges’ learned information
Broadcast ARP request: “Who owns IP address 4.4.4.4?”
IP=2.2.2.2 MAC=AA:AA:AA:AA:AA IP=3.3.3.3 MAC=BB:BB:BB:BB:BB IP=4.4.4.4 MAC=CC:CC:CC:CC:CC
Broadcast ARP reply: “I own 4.4.4.4, and my MAC address is CC:CC:CC:CC:CC”
IP=5.5.5.5 MAC=DD:DD:DD:DD:DD
Broadcast Gratuitous ARP reply: “I own 5.5.5.5, and my MAC address is DD:DD:DD:DD:DD”
IP MAC 4.4.4.4 CC:CC:CC:CC:CC DD:DD:DD:DD:DD 5.5.5.5
rather than ultimate destination IP address
host host DNS ... host host host ... router router
1.2.3.0/24 (255.255.255.0) 5.6.7.0/24
1.2.3.156
1.2.3.48 1.2.3.19
router
NIC doesn’t capture them since not its MAC address
What do hosts need to know? And how do they find out?
How does host A send an IP packet to host B? A R B
A R B
51
A R B
52
A R B
53
A R B
Two points:
mask of port’s address (i.e., local)
54
A R B
We’ve seen two broad approaches
Can we get the best of both?
Hawaii and gets an idea!
routing
transmission (CSMA)
sender clock rates
dropped if address does not match
Application gateway Transport gateway Router Switch Hub Frame header Packet header TCP header User data
switch
A B C D
switch
A B C D
cycles
Graph Has Cycles! Graph Has No Cycles!
towards destination
from each node
root, choose the path that uses the neighbor switch with the lower ID.
is an easy one to remember and implement
is on the shortest path from the root
root One hop Three hops
updated message (Y, d+1, X)
1
2 3 4 5 6 7
1
2 3 4 5 6 7
1
2 3 4 5 6 7
1
2 3 4 5 6 7
2 3 4 5 6 7
root!
communication
host
transmit
TDMA: Time Division Multiple Access
Rounds
1 2 3 4 5 1 2 3 4 5 Slots =
FDMA: Frequency Division Multiple Access
2,5,6 idle
frequency bands FDM cable
Polling
slave nodes to transmit in turn
(master)
Token passing
node to next sequentially
– Token overhead – Latency – At mercy of any node master slaves
poll data data
later)
93
Stanford in 1970
communication system for Hawaiian islands
Assumptions
slots (time to transmit a frame)
frames only at start of slots
nodes detect collision Operation
transmits in next slot
with probability p until success
by a particular node i: Si = p (1-p)(N-1) by any of N nodes: S= N p (1-p)(N-1)
Pros
continuously transmit at full rate of channel
need slot synchronization
Cons
slot
slots
101
Propagation delay: two nodes may not hear each
Would slots hurt or help? CSMA reduces but does not eliminate collisions Biggest remaining problem? Collisions still take full slot! How do you fix that?
CSMA
not)
local
B and D can tell that collision occurred.
Note: for this to work, need restrictions on minimum frame size and maximum distance. Why?
latency d A B
latency d A B
First widely deployed multiple access
changes
next 2m slots
successful transmission
Look at collisions between two nodes
In theory, there is no difference between theory and
cares)
slot
collapse
(1985)
finite
insight
successful transmission will never relinquish the channel
utilized and completely allocated to one host
B sending successfully halves with each collision
packets
time winner was sending….
start)
N)
capture, or what properties of the backoff enabled it.
played with it. Just getting it to work isn’t enough.