local-area-network (lan) architecture department of computer science southern illinois university...
TRANSCRIPT
Local-Area-Network (LAN) Architecture
Department of Computer ScienceSouthern Illinois University Edwardsville
Fall, 2013
Dr. Hiroshi FujinokiE-mail: [email protected]
Switch & Router/000
CS 447 Networks and Data Communication
Switch and Routers
What are the difference between switches and routers?QUESTION
Application
Presentation
Session
Transport
Network
Data-Link
Physical
76
5
4
3
2
1 Repeater
Bridge
Router
Network Connecting Devices
Where is “switch”?
Switch
Switching Hub
Layer-3 Switch
Same
Switch & Router/001
CS 447 Networks and Data Communication
Connecting Devices in LAN
• Bridge
• Router
• RepeaterLow level
High level
Switch & Router/002
IP addressNetwork-layer address
Datalink-layer address MAC address
Physical Ports
Routers: the network devices that forward (or drop) packets by software
Switches: the network devices that forward (or drop) packets by hardware
Simple Definitions
Information used for decision making
CS 447 Networks and Data Communication
• Repeater = signal re-former (+ amplifier)
Input (segment 1) Output (segment 2)Repeater
LAN Segment 2LAN Segment 1
Repeater
One LAN segment
Signal with noise Clean signal
Repeater
Switch & Router/003
CS 447 Networks and Data Communication
Repeater Hub
• Repeater Hub = a multi-port repeater
Ports
Internal shared bus
RepeaterBroadcast messages go through a hub (or Repeater)
Hub
Switch & Router/004
(Repeater-HUB)
CS 447 Networks and Data Communication
• Bridge (switch) = a packet localizer (packet filter)
LAN 1 LAN 2
A B C X Y Z
1 2
Bridge
HOST PORT
A
B
C
X
Y
Z
1
1
1
2
2
2
Bridge (switch)
Switch & Router/005
Switching Table
CS 447 Networks and Data Communication
LAN 1 LAN 2
A B C X Y Z
1 2
Bridge
Bridge Example: if A sends data to B
The bridge will NOT forward packet to LAN2
HOST PORT
A
B
C
X
Y
Z
2
2
2
1
1
1A tries to senddata to Host B
Switch & Router/006
CS 447 Networks and Data Communication
LAN 1 LAN 2
A B C X Y Z
1 2
Bridge
The bridge will forward the packet to LAN2
A tries to senddata to Host Y
HOST PORT
A
B
C
X
Y
Z
2
2
2
1
1
1
Bridge Example: if A sends data to Y
Switch & Router/007
CS 447 Networks and Data Communication
Bridge = a packet localizer (packet filter)
LAN 1 LAN 2
A B C X Y Z
1 2
Bridge
HOST PORT
A
B
C
X
Y
Z
1
2
A CData
Origin
Destination
A CDataA Z Data
A Z Data
Origin
Destination
Switch & Router/008
CS 447 Networks and Data Communication
LAN 1 LAN 2
A B C X Y Z
1 2
Bridge
HOST PORT
A
B
C
X
Y
Z
1
2
Z X Data
Z X Data
Origin
Destination2
Bridge = a packet localizer (packet filter)
Switch & Router/009
CS 447 Networks and Data Communication
Switching Hub
• Switching Hub = a multi-port bridge
Ports
Hub
Switch & Router/010
(Switching-HUB)
Multi-Port Bridge
SwitchingTable
A B C D E
AD BE
CS 447 Networks and Data Communication
Router = intelligent packet forwarding device between two network domains
The problem of repeaters and bridges (what repeaters and bridges can’t do?)
Your destinations must be only one-hop away!
You
Repeater/Bridge
Your Destination
What if your destination is more than one-hop away?
Switch & Router/011
Your Destination
Internet
Request
ResponseRequest (1)
Response with tag (2)
Request (3)Response (4)
Internet
Request
Response
You
Internet
Request
ResponseRequest (1)
Response with tag (2)
Request (3)Response (4)
Internet
Request
Response
Network 1 Network N
Repeater/Bridge
?
CS 447 Networks and Data Communication
Switch & Router/012
Receiver
Sender
Routers exchange routing tablesRouter
Network D
Network C
Network (= LAN or WAN) A
Network B
Router = intelligent packet forwarding device between two network domains
CS 447 Networks and Data Communication
Switch and Routers
Now we know:
Layer-3 Switch
Switch
Router
Bridge
Repeater Switching Hub
Switch & Router/013
CS 447 Networks and Data Communication
Switch and Routers
What is the definition of “switch”, then?
Network connecting device
Packet forwarding is performed by hardware
Cut-Through forwarding (not store-and-forward) forwarding
MAC-address is used as address
Switch & Router/014
CS 447 Networks and Data Communication
MAC Frame
Switch and Routers
What is MAC address?
It’s a hardware address associated to each NIC
(usually hardwired in a ROM chip on a NIC)
The address used in Data-Link layer
Address deeply related to hardware
We can never change it!
Source MAC Address
Source MAC Address
Frame Preamble
Payload8 bytes6 bytes6 bytes64 - 1518 bytes
Switch & Router/015
CS 447 Networks and Data Communication
Switch and Routers
MAC Address (48 bits)
8 bits 8 bits 8 bits 8 bits 8 bits 8 bits
Vendor ID Model # Serial #
http://www.cavebear.com/CaveBear/Ethernet/vendor.html
00 AA 00 47 4E 85
• 00 A0 24 – 3COM• 00 AA 00 -- Intel• 00 00 C0 -- SMC
• 47 – EtherExpress16 • 4E 85 = 20101th card
Switch & Router/016
What is MAC address? How does it look like?
CS 447 Networks and Data Communication
Router
Router_Switch/017
Internal structure of typical router
CPURouting
AlgorithmRoutingTable
RoutingProtocol
Memory
Output Buffer
InputLines
OutputLines
CS 447 Networks and Data Communication
Internal structure of typical router
• Definition of the procedure for how to calculate the best path
• Define what is “the best path”
Routing Algorithm
Routing Table
Routing Protocol
• Information the CPU uses to calculate the best path
• It’s implemented as software
• It’s data-structure (usually as “table” format)
• It’s software that constructs and maintains the routing table
• Routing protocol talks to other routers to collect the latest routing information in a network
• Entries in the routing table is network-layer addresses(e.g., IP addresses)
Router_Switch/018
CS 447 Networks and Data Communication
Router
Internal structure of typical router
CPU
MemoryInputLines
OutputLines
RoutingAlgorithm
RoutingTable
RoutingProtocol
Router_Switch/019
IP address
DataProcedure
CS 447 Networks and Data Communication
Layer-2 Switch (Bridge)
Internal structure of typical switch
Switching Fabric
Output Buffer
OutputLinesCrossbar switch, TDM switch,
Bus switch, etc.
SwitchControl Unit
InputLines
Switching Table
Short-Term-Buffer (STB)Router_Switch/020
CS 447 Networks and Data Communication
• The component where frames are switched
• Usually implemented by hardware (e.g., crossbar switch and bus switch)
• Checks the packet header• Control switching fabric using the information in the switching table and the packet header
• Tells the switch control unit the correct output port• (Destination MAC Address) + (Output Port #)
STB
Switching Fabric
Switch Control Unit
Switching Table
• Temporary buffer
Internal structure of typical switch
Router_Switch/021
CS 447 Networks and Data Communication
Layer-2 Switch (Bridge)
InputLines
OutputLines
SwitchControl Unit
Switching Table
Router_Switch/022
Internal structure of typical switch
CS 447 Networks and Data Communication
SwitchControl Unit
Switching Table
Router_Switch/023
Port #1
Port #2
Port #3
Dest. MAC Port#
Sent to Host X
Copy destinationMAC Address
Host X
MAC=4A3D
4A3D 1
Switching FabricSTB
Internal structure of typical switch
CS 447 Networks and Data Communication
Layer-3 switches
Router_Switch/024
• Layer-3 switches
= Switches that use layer-3 information (IP address) for forwarding
• The network devices that perform forwarding are traditionally routers
Why not router any more?
- LAN speed keeps increasing
(10Mbps 100Mbps 1,000Mbps)
- Intra-LAN repeaters and switches have been doing a good job in keeping up to the speed (because they are hardware devices)
- Routers become throughput bottleneck
Let switches take care of (replace) routers
CS 447 Networks and Data Communication
Layer-3 switches
Router_Switch/025
LAN Backbone
Leaf-levelEthernet
becomes faster
Routers become performance bottleneck
CS 447 Networks and Data Communication
Layer-3 switches
Router_Switch/026
LAN Backbone
Internet/WAN
We still needa router here.
(why?)
CS 447 Networks and Data Communication
Two different types of Layer-3 switches
- As core switches for virtual-circuit networks (ATM, FrameRelay)
Switching Router
Routing Switch
• It is a router that has built-in switch
• Route first and switch all the rest
• Typical applications:
• It is a switch that has built-in router
• It implements routing protocol (can communicate with other routers)
• Switches that know other networks (or sub-networks) more than one-hop away (this is the difference between L2 and L3 switches)
• It does not implement routing protocol(Routing table must be set up manually)
Router_Switch/027
CS 447 Networks and Data Communication
Internal Structure of Switching Router
CPU RoutingAlgorithm
RoutingTable
RoutingProtocol
Memory SessionMngmnt
Switching Fabric
SW Ctrl UnitSwitchingTable
Router_Switch/028
Switch
Router
CS 447 Networks and Data Communication
(For Virtual Circuit Packet Switching)
CPU RoutingAlgorithm
RoutingTable
RoutingProtocol
Switching Fabric
Memory
SW Ctrl Unit
SessionMngmnt
SwitchingTable
Router_Switch/029
Internal Structure of Switching Router
CS 447 Networks and Data Communication
Virtual Circuit
Sender S1 S2 Sn Receiver
Time
SignalingMessage
A transmitting station needs to set up a path firstPath set-upat switch S1
Router_Switch/030
CS 447 Networks and Data Communication
CPU RoutingAlgorithm
RoutingTable
RoutingProtocol
Switching Fabric
Memory
SW Ctrl Unit
SessionMngmnt
Signalingmessagearrived
STEP 1
SwitchingTable
Router_Switch/031
CS 447 Networks and Data Communication
CPU RoutingAlgorithm
RoutingTable
RoutingProtocol
Switching Fabric
Memory
SW Ctrl Unit
SessionMngmnt
STEP 2
Signalingmessage
stored at STB
SwitchingTable
Router_Switch/032
No switching entryFor this packet
CS 447 Networks and Data Communication
CPU RoutingAlgorithm
RoutingTable
RoutingProtocol
Switching Fabric
Memory
SW Ctrl Unit
SessionMngmnt
STEP 3
Signalingmessage
sent to memoryRouting willbe performedfor this packet
Router_Switch/033
CS 447 Networks and Data Communication
CPU RoutingAlgorithm
RoutingTable
RoutingProtocol
Switching Fabric
Memory
SW Ctrl Unit
SessionMngmnt
STEP 4
Router_Switch/034
CS 447 Networks and Data Communication
CPU RoutingAlgorithm
RoutingTable
RoutingProtocol
Switching Fabric
Memory
SW Ctrl Unit
SessionMngmnt
STEP 5
DestinationHost Address
OutputPort #
SenderHost Address
OutputPort #
Router_Switch/035
CS 447 Networks and Data Communication
Sender S1 S2 Sn Receiver
Path set-upat this switch Path set-up
at this switch Path set-upat this switch
SenderHost Address
OutputPort #
DestinationHost Address
OutputPort #
Router_Switch/036
CS 447 Networks and Data Communication