Professional Documents
Culture Documents
NUB, 2020
Credits to Prof. Jennifer Rexford, Department of Computer Science,
Princeton University, and Carlos Vicente
University of Oregon 1
Network Devices
• There are Three main devices are used in computer
networks; each works in a layer and deals with
different data.
Packets Router Layer 3: Network
2
Hubs
• Hubs are multiport devices (e.g. 4 to 24 ports).
• Each port can be connected to a single host (e.g. a
computer) or another hub or switch.
• A frame sent at one interface is sent to all other interface.
• Hub is Half-Duplex.
• Distance of any node to hub must be < 100m.
Hub
3
Hub Limitations
• Hub has one collision domain
— collision domain is part of the network where
a frame from a host can collide with another.
• Channel capacity is shared
— For example, three departments each get 10
Mbps independently but when connected via
a hub they share 10 Mbps)
• Cannot support multiple LAN speeds
— because they do not buffer frames.
4
Switch
• It is a smart hub; it forwards messages to a
specific host by looking in its forwarding table.
• The table maps destination MAC address to
outgoing interface.
Switch
Forwarding Table
Address Port
AAAAAAAAAAAA 1
BBBBBBBBBBBB 5
A C D B
5
Advantages of Switch
1. Full duplex: at each port, host can both send and
receive from the switch at the same time.
2. Support concurrent communication
— Host A can talk to C, while B talks to D
3. Reduces collisions; each port is a separate collision
domain.
4. Utilize full bandwidth.
5. Can connect LANs with different speeds (e.g., 10
and 100 Mbps).
6. Improves privacy by limiting scope of frames.
6
Example
• In the following network, there are 4 collision
domains.
• Each switch interface has its own capacity
(bandwidth) which is not shared with other
channels.
Hub 3.3Mbps
10Mbps
Switch 3.3Mbps
3.3Mbps
10Mbps
10Mbps
10Mbps 7
Switching Techniques
• Store and Forward:
— When a switch receives a frame, it stores the whole
frame before deciding where to forward it. This
introduces some delay.
• Cut-through:
— A frame is forwarded from input to output port as
soon as the frame header is inspected and the
destination address is extracted without awaiting for
assembly of entire frame.
— Cannot detect corrupted frames.
— Best suited for small workgroups.
8
Self Learning
• A switch must be able to construct its forwarding table
automatically → Self Learning:
—When a frame arrives, inspect the source MAC address
—Associate the address with the incoming interface
—Store the mapping in the switch table
A C
Switch learns
how to reach A. D 9
Self Learning: Handling Misses
• If destination MAC is not in the MAC table, it floods
the network (send the frame to all ports except for the
one where the frame arrived) looking for a response
• Only the host with the correct MAC address will
respond
—Hopefully, this case won’t happen very often
B
A C
When in
doubt,
shout!
D 10
Switches and Broadcast
• A switch broadcasts frames:
11
Virtual LANs
• In any company, changes are frequent
14
Router
• Router is used to connect different LANs
together and connect your LAN to the Internet.
• It directs packets based on the destination IP
address.
• Routers build routing tables; switches build MAC
tables
15
Traffic Domains
• Routers do not forward Ethernet broadcasts.
Router
Switch Switch
Collision Domain
Broadcast Domain
16
Traffic Domains
• Switches reduce the collision domain size
—Try to eliminate collision domains by getting rid of
hubs!
• Routers reduce the broadcast domain size
—Segment your network using routers
—Try to keep your broadcast domain limited to no more
than 250 simultaneously connected hosts
18
Example
• The following figure shows an institutional network
using a combination of hubs, Ethernet switches and a
router. Note the hierarchy!
Web Server
Mail server
19
https://www.net.t-labs.tu-berlin.de/teaching/computer_networking/05.06.htm