Upload
networkingcentral
View
593
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
141-623 Communication networks and networking for managers
Suntorn WitosurapotSuntorn Witosurapot
Contact Address: Phone: 074 287369 or
Email: [email protected]
November 2003
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
2
Chapter 3
A Small Ethernet PC Network
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
3
Review:Review: Architecture Reference
Presentation
OSI TCP/IP
Application
Application
Session
Transport
Network
Transport
Internet
Data Link
Physical
Data Link
Physical
GeneralFunction
ApplicationCommunication
Internetworking
Single NetworkTransmission
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
4
Review:Review: a View of Horizontal Layered Message Communication in TCP/IP
PC
Ethernet Switches
Routers (IP)
MessageMessage
Web Server
MessageMessagePC Web Server
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
5
Review:Review: a View of Logical Message Communication in TCP/IP
HTTP MsgApplicationLayer Proc
Proc = Process
ApplicationLayer Proc
TransportLayer Proc
TCP Msg TransportLayer Proc
NetworkLayer Proc
IP Packet NetworkLayer Proc
NetworkLayer Proc
Client PC ServerEthernet Switch Router
Data LinkLayer Proc
EthFrame
Data LinkLayer Proc
Data LinkLayer Proc
Data LinkLayer Proc
PhysicalLayer Proc
PhysicalLayer Proc
PhysicalLayer Proc
PhysicalLayer Proc
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
6
Review:Review: Communication at All Layers on the Source Host
HTTPMsg
ApplicationProcess
TCPHdr
HTTPMsg
TransportProcess
TCPHdr
IPHdr
HTTPMsg
InternetProcess
DLHdr
TCPHdr
IPHdr
DLHdr
HTTPMsg
Data LinkProcess
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
7
Preview: An Ethernet PC network
Our goals:
• Understand Ethernet architecture and its components
– Able to differentiate between hubs and switches and
reasons for the growing dominance of switches
– Understand the division of data link into the medium access
control and logical link control layers
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
8
Elements of a Small Ethernet PC Network
Access Router
A1-44-D5-1F-AA-4C
D4-47-55-C4-B6-9F
To the Internet Ethernet Switchor Hub
B2-CD-13-5B-E4-65C3-2D-55-3B-A9-4F
UTP
UTPUTP
UTP
UTP
BroadbandModem
ClientClient Server
Server
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
9
Network Interface Card (NIC)
• Each station must have a network interface card (NIC)
• This is true for both clients and servers
• The NIC implements LAN protocols
PhysicalData Link
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
10
Ethernet Standards
• Ethernet standards dominate in small LANs
– Governs switches, wiring and NIC (network interface cards)
• IEEE (Institute of Electrical and Electronics Engineers) Standardization
– 802 LAN/MAN Standards Committee (802 Committee) creates LAN standards
• 802.3 Working Group creates Ethernet standards
• So Ethernet standards are also known as 802.3 standards.
PhysicalData Link
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
11
Ethernet Standards (cont.)
• Physical Layer Ethernet Standards Using UTP
– 802.3 1010Base-T• 10 Mbps
– 802.3 100Base-TX, 100Base-FX• 100 Mbps• 10/100 operation (auto-sensing)
– 802.3 1000Base-T• Gigabit Ethernet (?? Mbps)
PhysicalData Link
T = twisted pair;
F = fiber optics;
T = twisted pair;
F = fiber optics;
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
12
Purchasing and Installing UTP
• Wiring Quality Categories
– Governed by the TIA/EIA-568 standardGoverned by the TIA/EIA-568 standard
– Categories 3, 4, 5, 5e (enhanced) and 6 (released in 2002)
• Higher numbers indicate better quality
– Category 5e is recommended for new buildings
– Category 5 or 5e is required for 100Base-TX
– Category 5 or 5e is required for 1000Base-TX (Gigabit Ethernet), but 5 is marginal
PhysicalData Link
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
13
Hubs and Switches:
• Available either in a form of• Desktop box, or
•19’’ Stackable/Rack-Mountable module
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
14
Hub Operation
A1-44-D5-1F-AA-4C
D4-47-55-C4-B6-9F
Ethernet Hub
B2-CD-13-5B-E4-65C3-2D-55-3B-A9-4F
UTPUTP
UTP
UTP
ClientClient Server
Server
Station A1-44-D5-1F-AA-4Ctransmits a bit.
Hub broadcasts the bitout all other ports.
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
15
Hub Operation
A1-44-D5-1F-AA-4C
D4-47-55-C4-B6-9F
Ethernet Hub
B2-CD-13-5B-E4-65C3-2D-55-3B-A9-4F
UTPUTP
UTP
UTP
ClientClient Server
Server
While stationA1-44-D5-1F-AA-4C
is transmitting.
If stationB2-CD-13-5B-E4-65
wishes to transmit, it must wait.
WaitingTransmitting
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
16
Hub Operation: Waiting to Transmit with a Hub
• Waiting creates latency (delay)– Becomes intolerable with many stations
• Not a problem for very small networksNot a problem for very small networks
• Speed of hub is shared by all stations—each gets only a fraction
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
17
Switch Operation
A1-44-D5-1F-AA-4Con switch port 10
D4-47-55-C4-B6-9Fon switch port 16
Ethernet Switch
B2-CD-13-5B-E4-65on switch port 13
C3-2D-55-3B-A9-4Fon switch port 15
UTP UTP UTPUTP
ClientClient
Server
Server
A switchswitch sends a frameout a single port —the one to the receiver
FrameFrame Frame
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
18
Switch Operation
A1-44-D5-1F-AA-4Con switch port 10
D4-47-55-C4-B6-9Fon switch port 16
Ethernet Switch
B2-CD-13-5B-E4-65on switch port 13
C3-2D-55-3B-A9-4Fon switch port 15
UTP UTP UTPUTP
ClientClient
Server
Server
Multiple simultaneoussimultaneousconversations arepossible!
FrameFrame Frame
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
19
Ethernet Switching Table
A1-44-D5-1F-AA-4Con switch port 10
D4-47-55-C4-B6-9Fon switch port 16
Ethernet Switch
B2-CD-13-5B-E4-65on switch port 13
C3-2D-55-3B-A9-4Fon switch port 15
UTP UTP UTPUTP
ClientClient
Server
Server
FrameFrame Frame
Switching TablePort Station
10 A1-44-D5-1F-AA-4C13 B2-CD-13-5B-E4-6515 C3-2D-55-3B-A9-4F16 D4-47-55-C4-B6-9F
15 C3-2D-55-3B-A9-4F
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
20
Ethernet Switches
• They are link-layer devices: operate on Ethernet frames, examining frame header and selectively forwarding frame based on its destination
• Switches isolates collision domains since it buffers frames
• When frame is to be forwarded on segment, bridge uses CSMA/CD to access segment and transmit
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
21
Ethernet Switches: Advantages
• Isolates collision domains resulting in higher total max throughput, and does not limit the number of nodes nor geographical coverage
• Can connect different type Ethernet since it is a store and forward device
• Transparent: no need for any change to hosts LAN
adapters
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
22
802 Standards Layering
Internet Layer
MediaAccessControlLayer
Data Link
Layer
Logical Link
ControlLayer
TCP/IP Internet LayerStandards
Other Internet LayerStandards
802.2
Other MACStandards
(802.5, etc.)
Ethernet 802.3 MAC LayerStandards
Physical Layer10
Base-T100
Base-TX1000
Base-TX
Other PhysicalLayer Standards
(802.5, etc.)
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
23
Octet
• A collection of 8 bits
• Called a byte in computer science
• The term “Octet” is widely used in networking
Octet = group of 8 bits
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
24
Ethernet Frame
Preamble (7 Octets)10101010 …
Begins synchronization
Start of Frame Delimiter (1 Octet)
10101011
Ends synchronizationSignals start of
content of frame
Field Description
1010101010101010101010101010101010…Synchronizes the receiver’s clock with the sender’s clock
Like a boat racing calling out “Hui, Ley, Hui”
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
25
Ethernet Frame (cont.)
Destination Address (6 Octets)Of Receiving NIC
48 BitsExpressed for humans in
HexadecimalExample:Example: A1-34-CD-7B-DF-47Unique NIC value set at factory
Field Description
Source Address (6 Octets)Of Sending NIC
48 BitsExpressed for humans in
HexadecimalExample:Example: 34-D5-E6-6A-BD-B0Unique NIC value set at factory
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
26
Ethernet Frame: MAC Addresses
• Ethernet addressesEthernet addresses are called MAC addressesMAC addresses
• They are station (NIC) address at the MAC layer
• Usually expressed for humans in hexadecimal
– Base 16: Each symbol represents 4 bits (for example,
0101=5 hex)
– Convert each four bits to a hex symbol between 0 and F
– Put dashes between each pair
– Example: A1-34-CD-7B-DF-89
PhysicalMAC
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
27
Ethernet Frame: Hexadecimal Notation
0
0001
0010
0011
0100
0101
1
2
3
4
5
4 Bits(Base 2*)
Decimal(Base 10)
Hexadecimal(Base 16)
0 hex
1 hex
2 hex
3 hex
4 hex
5 hex
0000
*24 =16 combinations
For example, A1-34-CD-7B-DF hex begins with 1010 0001
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
28
Ethernet Frame: Hexadecimal Notation (cont.)
4 Bits(Base 2)
Decimal(Base 10)
Hexadecimal(Base 16
8100110101011
91011
8 hex9 hexA hexB hex
1000
01100111
67
6 hex7 hex
12110111101111
131415
C hexD hexE hexF hex
1100
Example: 110011011101111011111111 = CD-EF
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
29
Ethernet Frame (cont.)
Ethernet 802.3MAC Header
LLC 802.2Header
IP PacketEthernetTrailer
Ethernet Data Field:LLC Frame
Preamble (7 octets)Start of Frame Delimiter (1 octet)
Dest. Address (6 octets)Src. Address (6 octets)
Length (2 octets)
FrameCheck
Sequence(4 octets)
LLC Data Field:IP Packet
PhysicalMAC
Direction
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
30
Ethernet Frame (cont.)
Field Description
Length (2 Octets)Length of Data Field in octets
1,500 (decimal) maximum1,500 (decimal) maximum
LLC FrameContaining IP Packet
PADNeeded if data field < 46 octet min.,
(so that Data Field + PAD will be 46 Octets)
PhysicalMAC
Data Field (variable)
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
31
Ethernet Frame (cont.)
Field Description
Frame Check Sequence(4 Octets)
Error detection field;If error is detected, frame is
discarded
• The FCS field is for error checking.
• Both sender and receiver compute it from the other bits in the frame.
• If the two computed values are different, there has been an error.
• In case of error, the receiver discards the frame; there is no request for retransmission.
PhysicalMAC
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
32
MAC Protocols
• We consider broadcast channels
• Problem: how to determine who gets to use the
channel when there is competition for it
• Two basic schemes: Static channel allocation and
Dynamic channel allocation
PhysicalMAC
•Frequency Division Multiplexing (FDM)•Time Division Multiplexing (TDM)
• Aloha• Carrier Sense Multiple Access (CSMA)
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
33
Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
• With Hubs, NICs must engage in CSMA/CD– CSMA/CD is not used with switches
• Two processes
1. Carrier Sense Multiple Access (CSMA)Carrier Sense Multiple Access (CSMA)
– If a NIC wishes to transmit, it must listen for traffic
• If there is no traffic, the NIC may transmit
• If there is traffic, the NIC must wait to transmit until no traffic is being transmitted; then it may send
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
34
Carrier Sense Multiple Access with Collision Detection (CSMA/CD) (cont.)
2. Collision Detection (CD)Collision Detection (CD)
• If there is a collision (by 2 or more stations transmitting at the same time),
– All NICs stop transmitting and wait for a random random amount of timeamount of time
– The first NIC that finishes its wait may transmit• but only if there is no traffic!
• If there is traffic, the NIC must wait until there is no traffic
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
35
Carrier Sense Multiple Access with Collision Detection (CSMA/CD) (cont.)
3. Collision Detection (CD)Collision Detection (CD)
– If there are multiple collisions,
• The random wait is increased each time
• After 16 collisions, the sending NIC discards the frame
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
36
CSMA/CD: a few details
time
A
B
C
data
interframe gap (IFG): 96 bits
collision enforcement jam signal: 32 bits
collision
backOff time: multiples of the slot time: 512 bits
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
37
CSMA/CD: Why collision occurs?
A B C Dt0
t1
t2
t3
A B C D
A B C D
A B C D
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
38
Recap:Recap: Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
• Hubs do not implement it when talking to stations
• NICs implement it when talking to hub
CSMA/CD with Hubs
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
39
RecapRecap: Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
• Three basic elements for describing CSMA/CD
– CSMACSMA—transmit only if line is clear; waiting otherwise
– CD Part 1CD Part 1—handling a single collision
– CD Part 2CD Part 2—handling of multiple collisions
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
40
NIC-Switch Communication
• No possibility of collisions with switches
• With switches, NICs operate in full-duplex mode
– Turn off CSMA/CD
– Can transmit and receive any time — called Full DuplexFull Duplex
operation
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
41
Network Interface Cards (NICs)
PC Card NICsPC Card NICssnap into external PC card slots on notebooks.
RJ-45Jack
Internal NICs Internal NICs fit into slots on the motherboard.Must open PC to install.
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
42
RecapRecap: Ethernet
• 802.3 Physical Layer Standards– 10Base-T, 100Base-TX, gigabit Ethernet, etc.
– Media and signaling
• 802.3 MAC Layer Standards– Frame Organization
– Hub and Switch Operation
– CSMA/CD versus Full-Duplex
• NICs Handle Both Layers, Plus LLC
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
43
802 Standards Layering
Internet Layer
MediaAccessControlLayer
Data Link
Layer
Logical Link
ControlLayer
TCP/IP Internet LayerStandards
Other Internet LayerStandards
802.2
Other MACStandards
(802.5, etc.)
Ethernet 802.3 MAC LayerStandards
Physical Layer10
Base-T100
Base-TX1000
Base-TX
Other PhysicalLayer Standards
(802.5, etc.)
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
44
Logical Link Control (LLC) Layer
• 802.2 LLC Standard is used in all 802 LANs
– All MAC layer standards interact only with 802.2 at the layer aboveabove them
– All internet layer standards interact only with 802.2 at the layer belowbelow them
LLC 802.2
Ethernet MAC Wireless MAC
IP IP
MACLLC
Physical
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
45
Logical Link Control (LLC) Layer(cont.)
• Optional Error Correction
– Error detection, and retransmission
– Almost never used
– NICs rarely allow user to control LLC functionality
MACLLC
Physical
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
46
Ethernet Frame OrganizationIncluding LLC
• As noted earlier, here is how Ethernet frames are organized, including the LLC header
EthernetHeader
802.2LLC
Header
IP or OtherPacket
EthernetTrailer
Ethernet Data Field: LLC Frame
LLC Data Field
Ethernet Frame
MACLLC
Physical
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
47
Internetworking• To extend / connect networks using the same or different tech.
– LAN LAN
– LAN WAN
– WAN WAN
– LAN WAN LAN
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
48
Why not just one big LAN?
• Limited amount of supportable traffic: on single LAN,
all stations must share bandwidth
• Large “collision domain” (can collide with many stations)
• Limited length and number of stations, e.g.
• 802.3 (Ethernet) specifies maximum cable length
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
49
Ethernet Switching Hubs• Hubs can be arranged in a
hierarchy (or multi-tier design), with backbone hub at its top.
• Each connected LAN referred to as LAN segment
• Hub Advantages:– simple, inexpensive device
– Multi-tier provides graceful degradation: portions of the LAN continue to operate if one hub malfunctions
– extends maximum distance between node pairs (100m per Hub)
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
50
Ethernet Switching Hubs: Backbone• Interconnection without a backbone is not recommended due to
- single point of failure at Computer Science hub- all traffic between EE and SE must path over CS segment
Backbonehub
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
51
Example: 100Mbps Ethernet Backbone strategy
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
52
Internet Access
• Desktop access routeraccess router for very small group
– Usually has built-in switch to connect several PCs
– The access router/switch usually has a built-in DHCP server
so that all PCs can share a single IP address given to the user
by the ISP
18 cm (7 in) wide
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
53
Using an Access Router
BroadbandModem PC
PC
WAN Portto ISP
UTPUTP
UTP
Access router has built-in switch, DHCP server for PCs and NAT Firewall (will be studied later)
Auto-configuredby Access Router
141-623 communiction networks and networking for managers
Chapter 3 A small Ethernet PC Network
54
Linux/Windows Allows PCs to Share a Connection
BroadbandModem
PC With2 NICs
Other PCOr Switch
ISP