Transcript Ethernet
10BaseT, 100BaseT, hub
T= Twisted pair (copper wire)
Nodes connected to a hub, 100m max distance
Hub: physical layer repeaters
repeat received bits on one interface to all other interfaces; no
buffering
Transmission by one node may collide with any node residing
at any segment connected to the same hub
twisted pair
hub
5/31/05
1
CS118/Spring05
Interconnecting using hubs
Can use a backbone hub to interconnect LAN segments
Extends max distance between nodes
Create a single large collision domain
Can’t interconnect 10BaseT & 100BaseT
hub
hub
5/31/05
hub
2
hub
CS118/Spring05
Ethernet Switch
Link layer device: stores and forwards Ethernet frames
forwards frame based on MAC dest address
uses CSMA/CD to access segment
Transparent: hosts are unaware of presence of switches
plug-and-play: switches do not need to be configured
switch
1
3
2
hub
5/31/05
hub
3
hub
CS118/Spring05
Building a forwarding table by self learning
When receive data frame: associate sender address with
incoming interface
record sender/interface pair in a forwarding table
Each entry: MAC Address, Interface, Time Stamp
stale entries in table dropped (TTL can be 60 min)
Data forwarding algorithm: when receive a frame
if entry found for destination
then{
if destination on interface from which frame arrived
then drop the frame
else forward the frame on interface indicated
}
else flood (forward to all but the interface the frame came from)
5/31/05
4
CS118/Spring05
Switch example
Suppose C sends a data frame to D
address
A
B
E
G
C
D
switch
1
3
2
hub
hub
hub
A
interface
1
1
2
3
1
2
I
B
C
F
D
E
G
H
Switch receives from C
Add to forwarding table: C is on interface 1
D is not in table: forwards to interfaces 2 and 3
frame received by D
When D replies back with a frame to C
Add to forwarding table: D is on interface 2
Forward to C
5/31/05
5
CS118/Spring05
More on Switch
Traffic isolation:
same-LAN-segment frames (usually) not forwarded onto other
LAN segments
segments become separate collision domains
switch
collision domain
hub
Collision
domain
hub
collision
domain
hub
cut-through switching: frame forwarded from input to
output port without first collecting entire frame
can combine 10/100/1000 Mbps interfaces
5/31/05
6
CS118/Spring05
Switches vs. Routers
both are store-and-forward devices
routers: network layer devices (examine network layer
headers)
Switches: link layer devices
routers maintain routing tables, implement routing
algorithms
switches maintain switch tables, implement selflearning algorithms
Switch
5/31/05
7
CS118/Spring05
Switches: advantages and limitations
Transparent: no need for any change to hosts
Isolates collision domains
resulting
in higher total max throughput
Can connect different types of Ethernet
because
it is a store and forward device
Constrained topology: tree only
all
inter-segment traffic concentrated on a single tree
(all multicast traffic forwarded to all LAN’s)
5/31/05
8
CS118/Spring05
Routers: advantages and limitations
Support arbitrary topologies
Efficient support for multicast routing
And
can prevent broadcast storms
Require IP address configuration (not plug and
play)
More complex data processing than switches
bridges do well in small setting (few hundred
hosts), routers are used in large networks
5/31/05
9
CS118/Spring05
Point to Point Data Link Control
One sender, one receiver, one link
e.g.,
dialup link, ISDN line
easier than broadcast link:
no
Media Access Control
no need for explicit MAC addressing
popular point-to-point DLC protocols:
PPP (point-to-point
protocol)
HDLC: High level data link control (Data link used to
be considered “high layer” in protocol stack!
5/31/05
10
CS118/Spring05
PPP Design Requirements [RFC 1661, 1662]
packet framing: encapsulation of network-layer
datagram in data link frame
carry data of any network layer protocol (not just IP)
ability to de-multiplex upwards
bit transparency: must carry any bit pattern in data field
error detection
connection liveness: detect, signal link failure to network
layer
network layer address negotiation: endpoint can
learn/configure each other’s network address
Non-requirements
no error correction/recovery
no flow control
out of order delivery OK 11
5/31/05
CS118/Spring05
PPP Data Frame
Flag: delimiter (framing)
Address: does nothing (only one option)
Control: does nothing; in the future possible multiple
control fields
Protocol: upper layer protocol to which frame delivered
(eg, PPP-LCP, IP, IPCP, etc)
info: upper layer data being carried
check: cyclic redundancy check for error detection
5/31/05
12
CS118/Spring05
Byte Stuffing
“data transparency” requirement: data field must be
allowed to include flag pattern <01111110>
Q: is received <01111110> data or flag?
Define the
Control Escape octet as 01111101
Sender: adds (“stuffs”) < 01111101> byte after each <
01111110> data byte
Receiver:
< 01111101> followed by <01111110>: discard first byte,
continue data reception
single 01111110: flag byte
5/31/05
13
CS118/Spring05
Byte Stuffing
flag byte
pattern
in data
to send
flag byte pattern plus
stuffed byte in
transmitted data
5/31/05
14
CS118/Spring05
PPP Data Control Protocol
Before exchanging networklayer data, data link peers
must
configure PPP link (max.
frame length, authentication)
learn/configure network
layer information
for IP: carry IP Control
Protocol (IPCP) msgs
(protocol field: 8021) to
configure/learn IP address
5/31/05
15
CS118/Spring05