Interconnection Devices - California State University, Long Beach

advertisement
CECS 474 Computer Network Interoperability
Interconnection Devices
Repeaters, Hubs, Bridges, Switches & Routers
for LANs, CANs & WANs
Tracy Bradley Maples, Ph.D.
Computer Engineering & Computer Science
Cal ifornia State University, Long Beach
LANs, CANs & WANs
LAN (Local Area Network)
Usually, a single LAN technology with multiple
segments connected via switches. One router
connection to the Internet.
CAN (Campus Area Network)
Usually, many switched LANs operating as subnetworks through VLANs (Virtual LANs) or subnetting. Some routers used.
WAN (Wide Area Network)
Multiple routers interconnected by
point-to-point links. Routers can also
connect to local CANs and LANs.
Repeaters & Hubs
A repeater is a network interconnection device with two interfaces that regenerates
signals coming in one interface onto the other.
Repeaters:
• Use no logic in regenerating signals, thus data and noise are both regenerated by
the repeater.
• Can be used to extend the range of a single LAN.
• Operate at Layer 1 (Physical Layer) of the TCP/IP Stack.
Layer 5
LAN
ß----------------
-------------------
LAN
----------------à
Layer 5
Layer 4
ß----------------
-------------------
----------------à
Layer 4
Layer 3
ß-------------à
-------------------
----------------à
Layer 3
Layer 2
ß-------------à
-------------------
----------------à
Layer 2
Layer 1
ß-------------à
ß-------------à
Layer 1
Host A
REPEATER/ HUB
Only repeats signals
(noise/errors are repeated)
Host B
Repeaters & Hubs (Cont’d)
A hub is a network interconnection device with multiple interfaces that accepts an
incoming signal from an interface and repeats it onto all other interfaces.
Physically, hubs are:
• Small electronic devices.
• Have connections for several computers (e.g., 4, 8, or 20).
Logically, hubs:
• Operate only on signals.
• Propagate each incoming signal to all connections.
• Are similar to connecting segments with repeaters.
• Do not understand frames (Layer 2 packets) so cannot filter them.
Hubs have extremely low cost and are becoming obsolete.
Layer 2 Frames
A frame is a packet of data passed across the network at Layer 2 of the TCP/IP Stack.
At Layer 2, media access control (MAC) addresses are used to send messages from
one computer to another.
• MAC addresses are also known as physical addresses or hardware
addresses.
• MAC addresses are not the same an IP addresses. IP addresses are software
addresses that can be changed. MAC addresses are hardware addresses
associated with the network interface card (NIC) and cannot be changed.
Frames have two MAC addresses in their header: (1) the MAC address of the source
computer, and (2) the MAC address of the destination computer.
Ethernet Frame Format
Bridges & Switches
A bridge is a network interconnection device (with only two interfaces) that forwards
frames coming in from an interface to the outgoing interface corresponding to the
MAC destination address in the frame.
A bridge:
•
•
•
•
•
Is a hardware device.
Connects two LAN segments.
Forwards frames.
Does not forward noise or collisions from the incoming connection.
Learns addresses and filters frames based on those addresses.
A bridge is used to connect two local-area
networks (LANs) of the same type.
Bridges & Switches (Cont’d)
A switch is a network interconnection device (with multiple interfaces) that accepts
a frame from an interface and forwards the frame to the interface corresponding to
the MAC destination address in the frame.
A switch:
• Is physically similar to a hub.
• Is logically similar to a bridge.
• Operates on frames.
• Understands MAC addresses.
• Only forwards frames when necessary.
 Switches allow separate pairs of computers to communicate at the same time.
 Switches can be used in heavily loaded networks to isolate data flow and
improve performance.
 Switches are the Layer 2 Ethernet device of choice.
Bridges & Switches (Cont’d)
Layer 5
LAN 1
ß----------------
-------------------
LAN 2
----------------à
Layer 5
Layer 4
ß----------------
-------------------
----------------à
Layer 4
Layer 3
ß----------------
-------------------
----------------à
Layer 3
Layer 2
ß-------------à
ß-------------à
Layer 2
Layer 1
ß-------------à
ß-------------à
Layer 1
Host A
SWITCH
Only connects networks
with the same Link layers
Host B
Layer 3 Datagrams
An IP datagram is a packet of data passed across the network at
Layer 3 of the network protocol stack.
At Layer 3 (and above), IP addresses are used to send messages from one computer
to another.
IP addresses are software addresses that can be changed according to the network
subnet to which they belong.
IP datagrams have two IP addresses in their header: (1) the IP address of the source
computer, and (2) the IP address of the destination computer.
Routers
A router is a network interconnection device that accepts an IP datagram from an
incoming port and forwards the datagram to the outgoing link that corresponds to
the IP destination address in the frame.
A router:
• Forwards data depending on IP
addresses, not Hardware (MAC)
addresses.
• Isolates each LAN into a separate
subnet, with separate IP addresses.
• Can route between different LAN
technologies.
• Needs to be set up before they are
used. Once set up, they can
communicate with other routers and
learn the way to parts of a network
that are added after a router is
initially configured.
A Home Router
Routers (Cont’d)
TCP/IP PROTOCOL STACK & INTERCONNECTION DEVICE SUMMARY
No.
Layer Name
Name of a “Packet”
used at the layer
Address Typed used at layer
Names of Interconnection
Device in Each Layer
End-to-end or
link-to-link operation
5
Application
Message
IP Addresses
4
Transport
Segment
IP Addresses
3
Internet
IP Datagram
IP Addresses
Router
Link-to-Link
2
Network Interface
or Link
Frame
MAC Addresses
Switch
or Bridge
Link-to-Link
1
Physical
bits
---------
Hub
or Repeater
Link-to-Link
End-to-End
Protocol Translator
End-to-End
Download