tcp/ip protocol suite 1 copyright © the mcgraw-hill companies, inc. permission required for...
TRANSCRIPT
TCP/IP Protocol Suite 1Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 3
UnderlyingTechnology
TCP/IP Protocol Suite 2
OBJECTIVES:OBJECTIVES: To briefly discuss the technology of dominant wired LANs,
Ethernet, including traditional, fast, gigabit, and ten-gigabit Ethernet.
To briefly discuss the technology of wireless WANs, including IEEE 802.11 LANs, and Bluetooth.
To briefly discuss the technology of point-to-point WANs including 56K modems, DSL, cable modem, T-lines, and SONET.
To briefly discuss the technology of switched WANs including X.25, Frame Relay, and ATM.
To discuss the need and use of connecting devices such as repeaters (hubs), bridges (two-layer switches), and routers (three-layer switches).
TCP/IP Protocol Suite 3
Chapter Chapter OutlineOutline
3.1 Wired Local Area Network3.1 Wired Local Area Network
3.2 Wireless LANs3.2 Wireless LANs
3.3 Point-to-Point WANs3.3 Point-to-Point WANs
3.4 Switched WANs3.4 Switched WANs
3.5 Connecting Devices3.5 Connecting Devices
TCP/IP Protocol Suite 4
3-1 WIRED LOCAL AREA NETWORKS
A local area network (LAN) is a computer network that is designed for a limited geographic area such as a building or a campus. Although a LAN can be used as an isolated network to connect computers in an organization for the sole purpose of sharing resources, most LANs today are also linked to a wide area network (WAN) or the Internet. The LAN market has seen several technologies such as Ethernet, token ring, token bus, FDDI, and ATM LAN, but Ethernet is by far the dominant technology.
TCP/IP Protocol Suite 5
Topics Discussed in the SectionTopics Discussed in the Section
IEEE StandardsFrame FormatAddressingEthernet EvolutionStandard EthernetFast EthernetGigabit EthernetTen-Gigabit Ethernet
TCP/IP Protocol Suite 6
Figure 3.1 IEEE standard for LANs
TCP/IP Protocol Suite 7
Figure 3.2 Ethernet Frame
TCP/IP Protocol Suite 8
Figure 3.3 Maximum and minimum lengths
TCP/IP Protocol Suite 9
Minimum length: 64 bytes (512 bits)
Maximum length: 1518 bytes (12,144 bits)
Note
TCP/IP Protocol Suite 10
Figure 3.4 Ethernet address in hexadecimal notation
TCP/IP Protocol Suite 11
Figure 3.5 Unicast and multicast addresses
multicast: 1unicast: 0
TCP/IP Protocol Suite 12
The broadcast destination address is a special case of the multicast address
in which all bits are 1s.
Note
TCP/IP Protocol Suite 13
The least significant bit of the first byte defines the type of address.
If the bit is 0, the address is unicast; otherwise, it is multicast.
Note
TCP/IP Protocol Suite 14
Define the type of the following destination addresses: a. 4A:30:10:21:10:1A b. 47:20:1B:2E:08:EE c. FF:FF:FF:FF:FF:FF
SolutionTo find the type of the address, we need to look at the secondhexadecimal digit from the left. If it is even, the address is unicast. If it is odd, the address is multicast. If all digits are F’s, the address is broadcast. Therefore, we have the following:a. This is a unicast address because A in binary is 1010 (even).b. This is a multicast address because 7 in binary is 0111 (odd).c. This is a broadcast address because all digits are F ’s.
ExampleExample 3.1
TCP/IP Protocol Suite 15
Show how the address 47:20:1B:2E:08:EE is sent out on line.
SolutionThe address is sent left-to-right, byte by byte; for each byte, it is sent right-to-left, bit by bit, as shown below:
ExampleExample 3.2
← 11100010 00000100 11011000 01110100 00010000 01110111
TCP/IP Protocol Suite 16
Figure 3.6 Ethernet evolution through four generations
TCP/IP Protocol Suite 17
Figure 3.7 Space/time model of a collision in CSMA
Time Time
BA C D
B startsat time t1
t1
Area whereA’s signal exists
C startsat time t2
t2
Area whereB’s signal exists
Area whereboth signals exist
TCP/IP Protocol Suite 18
Figure 3.8 Collision of the first bit in CSMA/CD
TCP/IP Protocol Suite 19
In the standard Ethernet, if the maximum
propagation time is 25.6 μs, what is the minimum
size of the frame?
Solution
The frame transmission time is Tfr = 2 × Tp = 51.2
μs. This means, in the worst case, a station needs
to transmit for a period of 51.2 μs to detect the
collision. The minimum size of the frame is 10
Mbps × 51.2 μs = 512 bits or 64 bytes. This is
actually the minimum size of the frame for
Standard Ethernet, as we discussed before.
ExampleExample 3.3
TCP/IP Protocol Suite 20
Figure 3.9 CSMA/CD flow diagram
TCP/IP Protocol Suite 21
TCP/IP Protocol Suite 22
Figure 3.10 Standard Ethernet implementation
TCP/IP Protocol Suite 23
TCP/IP Protocol Suite 24
Figure 3.11 Fast Ethernet implementation
TCP/IP Protocol Suite 25
TCP/IP Protocol Suite 26
In the full-duplex mode of Gigabit Ethernet, there is no collision;
the maximum length of the cable is determined by the signal attenuation
in the cable.
Note
TCP/IP Protocol Suite 27
Figure 3.12 Gigabit Ethernet implementation
TCP/IP Protocol Suite 28
TCP/IP Protocol Suite 29
3-2 WIRELESS LANS
Wireless communication is one of the fastest growing technologies. The demand for connecting devices without the use of cables is increasing everywhere. Wireless LANs can be found on college campuses, in office buildings, and in many public areas. In this section, we concentrate on two wireless technologies for LANs: IEEE 802.11 wireless LANs, sometimes called wireless Ethernet, and Bluetooth, a technology for small wireless LANs.
TCP/IP Protocol Suite 30
Topics Discussed in the SectionTopics Discussed in the Section
IEEE 802.1MAC SublayerAddressing MechanismBluetooth
TCP/IP Protocol Suite 31
Figure 3.13 Basic service sets (BSSs)
TCP/IP Protocol Suite 32
Figure 3.14 Extended service sets (ESSs)
TCP/IP Protocol Suite 33
Figure 3.15 CSMA/CA flow diagram
TCP/IP Protocol Suite 34
All other stations
• • •
Source Destination
TimeTime Time Time
Figure 3.16 CSMA/CA and NAV
DIFS
SIFS
RTS1
SIFS
CTS 2
SIFS
Data3
ACK 4
NAV(No carrier sensing)
TCP/IP Protocol Suite 35
Figure 3.17 Frame format
TCP/IP Protocol Suite 36
TCP/IP Protocol Suite 37
Figure 3.18 Control frames
TCP/IP Protocol Suite 38
TCP/IP Protocol Suite 39
TCP/IP Protocol Suite 40
Figure 3.19 Hidden station problem
TCP/IP Protocol Suite 41
The CTS frame in CSMA/CA handshake can prevent collision from a hidden
station.
Note
TCP/IP Protocol Suite 42
Time Time Time
AB C
Figure 3.20 Use of handshaking to prevent hidden station problem
RTS
CTS CTS
TCP/IP Protocol Suite 43
Figure 3.21 Exposed station problem
TCP/IP Protocol Suite 44
Figure 3.22 Use of handshaking in exposed station problem
RTS RTSRTS
CTS
DataData
RTSRTS
Collisionhere
CTS
TCP/IP Protocol Suite 72
3-5 CONNECTING DEVICES
LANs or WANs do not normally operate in isolation. They are connected to one another or to the Internet. To connect LANs and WANs together we use connecting devices. Connecting devices can operate in different layers of the Internet model. We discuss three kinds of connecting devices: repeaters (or hubs), bridges (or two-layer switches), and routers (or three-layer switches).
TCP/IP Protocol Suite 73
Topics Discussed in the SectionTopics Discussed in the Section
RepeatersBridgesRouters
TCP/IP Protocol Suite 74
Figure 3.40 Connecting devices
TCP/IP Protocol Suite 75
Figure 3.41 Repeater or hub
SentDiscarded
Maintained DiscardedDiscarded
TCP/IP Protocol Suite 76
A repeater forwards every bit; it has no filtering capability.
Note
TCP/IP Protocol Suite 77
A bridge has a table used in filtering decisions.
Note
TCP/IP Protocol Suite 78
A bridge does not change the physical (MAC) addresses in a frame.
Note
TCP/IP Protocol Suite 79
Figure 3.42 Bridge
71:2B:13:45:61:41 1
43271:2B:13:45:61:42
64:2B:13:45:61:1264:2B:13:45:61:13
Address Port
Bridge table
TCP/IP Protocol Suite 80
Figure 3.43 Learning bridge
Gradual building of Table
a. Original
Address Port
c. After D sends a frame to B
71:2B:13:45:61:41 1464:2B:13:45:61:13
Address Port
d. After B sends a frame to A
71:2B:13:45:61:41 14
271:2B:13:45:61:42
64:2B:13:45:61:13
Address Port
e. After C sends a frame to D
71:2B:13:45:61:41 14
3271:2B:13:45:61:42
64:2B:13:45:61:12
64:2B:13:45:61:13
Address Port
M MM M
TCP/IP Protocol Suite 81
A router is a three-layer (physical, data link, and network) device.
Note
TCP/IP Protocol Suite 82
A repeater or a bridge connects segments of a LAN.
A router connects independent LANs or WANs to create an internetwork
(internet).
Note
TCP/IP Protocol Suite 83
Figure 3.44 Routing example
TCP/IP Protocol Suite 84
A router changes the physical addresses in a packet.
Note
TCP/IP Protocol Suite 85
Ethernet Supplement
TCP/IP Protocol Suite 86
87
Ethernet
First practical local area network, built at Xerox PARC in 70’s
“Dominant” LAN technology: Cheap Kept up with speed race: 10, 100, 1000 Mbps
Metcalfe’s Ethernetsketch
88
Ethernet MAC – Carrier Sense Basic idea:
Listen to wire before transmission
Avoid collision with active transmission
Why didn’t ALOHA have this? In wireless, relevant
contention at the receiver, not sender
Hidden terminal Exposed terminal
NY
CMU
Chicago
St.Louis
Chicago
CMU
NY
Hidden Exposed
89
Ethernet MAC – Collision Detection But: ALOHA has collision detection also?
That was very slow and inefficient Basic idea:
Listen while transmitting If you notice interference assume collision
Why didn’t ALOHA have this? Very difficult for radios to listen and transmit Signal strength is reduced by distance for radio
Much easier to hear “local, powerful” radio station than one in NY
You may not notice any “interference”
90
Ethernet MAC (CSMA/CD)
Packet?
Sense Carrier
Discard Packet
Send Detect Collision
Jam channel b=CalcBackoff()
; wait(b);attempts++;
No
Yes
attempts < 16
attempts == 16
Carrier Sense Multiple Access/Collision Detection
91
Ethernet CSMA/CD: Making it word
Jam Signal: make sure all other transmitters are aware of collision; 48 bits;
Exponential Backoff: If deterministic delay after collision, collision
will occur again in lockstep Why not random delay with fixed mean?
Few senders needless waiting Too many senders too many collisions
Goal: adapt retransmission attempts to estimated current load heavy load: random wait will be longer
92
Ethernet Backoff Calculation
Exponentially increasing random delay Infer senders from # of collisions More senders increase wait time
First collision: choose K from {0,1}; delay is K x 512 bit transmission times
After second collision: choose K from {0,1,2,3}…
After ten or more collisions, choose K from {0,1,2,3,4,…,1023}
93
Outline
Aloha
Ethernet MAC
Collisions
Ethernet Frames
94
CollisionsT
ime
A B C
95
Minimum Packet Size
What if two people sent really small packets How do you find
collision?
96
Ethernet Collision Detect
Min packet length > 2x max prop delay If A, B are at opposite sides of link, and B
starts one link prop delay after A Jam network for 32-48 bits after collision,
then stop sending Ensures that everyone notices collision
97
End to End Delay
c in cable = 60% * c in vacuum = 1.8 x 10^8 m/s Modern 10Mb Ethernet
2.5km, 10Mbps ~= 12.5us delay +Introduced repeaters (max 5 segments) Worst case – 51.2us round trip time!
Slot time = 51.2us = 512bits in flight After this amount, sender is guaranteed sole access to
link 51.2us = slot time for backoff
98
Packet Size
What about scaling? 3Mbit, 100Mbit, 1Gbit... Original 3Mbit Ethernet did not have minimum
packet size Max length = 1Km and No repeaters
For higher speeds must make network smaller, minimum packet size larger or both
What about a maximum packet size? Needed to prevent node from hogging the network 1500 bytes in Ethernet
99
10BaseT and 100BaseT
10/100 Mbps rate; latter called “fast ethernet” T stands for Twisted Pair (wiring) Minimum packet size requirement
Make network smaller solution for 100BaseT
100
Gbit Ethernet
Minimum packet size requirement Make network smaller?
512bits @ 1Gbps = 512ns 512ns * 1.8 * 10^8 = 92meters = too small !!
Make min pkt size larger! Gigabit Ethernet uses collision extension for small pkts and
backward compatibility
Maximum packet size requirement 1500 bytes is not really “hogging” the network Defines “jumbo frames” (9000 bytes) for higher
efficiency
101
Outline
Aloha
Ethernet MAC
Collisions
Ethernet Frames
102
Ethernet Frame Structure
Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
103
Ethernet Frame Structure (cont.) Preamble: 8 bytes
101010…1011 Used to synchronize receiver, sender clock
rates CRC: 4 bytes
Checked at receiver, if error is detected, the frame is simply dropped
104
Ethernet Frame Structure (cont.)
Each protocol layer needs to provide some hooks to upper layer protocols Demultiplexing: identify which upper layer
protocol packet belongs to E.g., port numbers allow TCP/UDP to identify
target application Ethernet uses Type field
Type: 2 bytes Indicates the higher layer protocol, mostly IP but
others may be supported such as Novell IPX and AppleTalk)
105
Addressing Alternatives
Broadcast all nodes receive all packets Addressing determines which packets are kept and which
are packets are thrown away Packets can be sent to:
Unicast – one destination Multicast – group of nodes (e.g. “everyone playing Quake”) Broadcast – everybody on wire
Dynamic addresses (e.g. Appletalk) Pick an address at random Broadcast “is anyone using address XX?” If yes, repeat
Static address (e.g. Ethernet)
106
Ethernet Frame Structure (cont.)
Addresses: 6 bytes Each adapter is given a globally unique address at
manufacturing time Address space is allocated to manufacturers
24 bits identify manufacturer E.g., 0:0:15:* 3com adapter
Frame is received by all adapters on a LAN and dropped if address does not match
Special addresses Broadcast – FF:FF:FF:FF:FF:FF is “everybody” Range of addresses allocated to multicast
Adapter maintains list of multicast groups node is interested in
107
Why Did Ethernet Win?
Failure modes Token rings – network unusable Ethernet – node detached
Good performance in common case Deals well with bursty traffic Usually used at low load
Volume lower cost higher volume …. Adaptable
To higher bandwidths (vs. FDDI) To switching (vs. ATM)
Easy incremental deployment Cheap cabling, etc
108
And .. It is Easy to Manage
You plug in the host and it basically works No configuration at the datalink layer Today: may need to deal with security
Protocol is fully distributed Broadcast-based.
In part explains the easy management Some of the LAN protocols (e.g. ARP) rely on
broadcast Networking would be harder without ARP
Not having natural broadcast capabilities adds complexity to a LAN
Example: ATM
Ethernet Problems: Unstable at High Load Peak throughput worst with
More hosts – more collisions to identify single sender Smaller packet sizes – more frequent arbitration Longer links – collisions take longer to observe, more wasted
bandwidth But works well in
practice Can improve
efficiency by avoiding
above conditions
S =
th
rou
gh
pu
t =
“g
oo
dp
ut ”
(su
cces
s ra
te)
G = offered load = N X p0.5 1.0 1.5 2.0
0.1
0.2
0.3
0.4
Pure Aloha
Slotted Aloha
1/e = 37%
111
Summary
CSMA/CD carrier sense multiple access with collision detection Why do we need exponential backoff? Why does collision happen? Why do we need a minimum packet size?
How does this scale with speed?
Ethernet What is the purpose of different header fields? What do Ethernet addresses look like?
What are some alternatives to Ethernet design?