1 计算机网络 胥正川 ( xu zhengchuan ) 管理学院 信息管理与信息系统系...
TRANSCRIPT
First Chapter Topics Covered
3
Network Elements: Recap
• Applications (the only element that users care about)
• Computers– Clients
– Servers
• Switches and Routers
• Transmission Lines– Trunk lines
– Access Lines
• Messages (Frames)
• Wireless Access Points
Never talk about aninnovation “reducing cost,”
“increasing speed,” etc.without specifyingwhich element ischeaper or faster.
For example, multiplexingonly reduces the cost of
trunk lines; othercosts are not decreased
Never talk about aninnovation “reducing cost,”
“increasing speed,” etc.without specifyingwhich element ischeaper or faster.
For example, multiplexingonly reduces the cost of
trunk lines; othercosts are not decreased
4
Recap: LANs and WANs
• LANs transmit data within corporate sites
• WANs transmit data between corporate sites
• Each LAN or WAN is a single network
• LAN costs are low andspeeds are high
• WAN costs are highand speeds are lower
WANWAN
5
LANLAN WANWAN LANLAN
Recap: Internets
• Most firms have multiple LANs and WANs.
• They must create internets
– An internet is a collection of networks connected by routers so that any application on any host on any single network can communicate with any application on any other host on any other network in the internet.
Application Application
Router Router
6
LANLAN WANWAN LANLAN
Recap: Internets
• Elements of an Internet
– Computers connected to the internet are called hosts
• Both servers and client PCs are hosts
– Routers connect the networks of the internet together
• In contrast, switches forward frames within individual networks
Router
Client PC Host Server Host
Router
7
Recap: Internets
• Hosts Have Two Addresses
• IP Address– This is the host’s official address on its internet– 32 bits long
– Expressed for people in dotted decimal notation (e.g., 128, 171, 17.13)
• Single Network Addresses– This is the host’s address on its single network– Ethernet addresses, for instance, are 48 bits long
– Expressed in hexadecimal notation, e.g., AF-23-9B-E8-67-47
8
Recap: Internets
• Switches versus Routers
– Switches move frames through a single network (LAN or WAN)
– Routers move packets through internets
• Messages
– Messages in single networks are called frames
– Messages in internets are called packets
– Packets are encapsulated within (carried inside) frames
9
Quality of Service
• It is not enough that networks work
– They must work well
• Quality of Service (QoS) defines quantitative measures of service quality
– Speed 速度– Delay (Latency) 延迟– Reliability 可靠性
• Security (not a QoS measure but crucial)
10
Figure 1.9: Quality of Service (QoS)
• Speed
– Bits per second (bps)
– Multiples of 1,000 (not 1,024)
– Kilobits per second (kbps)—Note the Lower-case “k”
– Megabits(兆位) per second (Mbps)
– Gigabits (千兆位) per second (Gbps)
– Terabits (兆兆位) per second (Tbps)
– Petabits(千兆兆位) per second (Pbps)
11
Figure 1.9: Quality of Service (QoS)
• Congestion and Latency(拥塞和延迟)– Congestion because traffic chronically or
momentarily exceeds capacity
– Latency delay measured in milliseconds (ms)
– Especially bad for some services such as voice communication or highly interactive applications
12
Figure 1.9: Quality of Service (QoS)
• Reliability 可靠性– Availability 可用性
• Percent of time the network is available to users for transmission and reception
• Want 24x7x365 availability• Telephone network: Five 9s (99.999%)
– Error Rate 错误率• Percent of lost or damaged messages or bits
13
Figure 1.9: Quality of Service (QoS)
• Service Level Agreements (SLAs)
– Quantitative guarantees for various service parameters
– Example: Better than 99% availability and a packet loss error rate of less 0.5% measured over each day; latency not exceeding 45 ms 99% of the time.
– Network provider pays performance penalties if guarantees are not met
Chp 2Topics Covered
15
Topics Covered
• Standards govern the semantics and syntax of messages
– HTTP: Text request and response messages
– Data field, header, and trailer
– Header and trailer subdivided into fields
• Reliability
– In TCP, receiver sends ACKs
– Senders retransmit non-acknowledged segments
16
Topics Covered
• Connection-oriented versus connectionless
– TCP is connection-oriented
– HTTP is connectionless
• Hybrid TCP/IP-OSI Architecture
– OSI is nearly 100% dominant at Layers 1 and 2
– TCP/IP is 70% to 80% dominant at Layers 3 and 4
– Situation at Layer 5 is complex
17
Topics Covered
• Hybrid TCP/IP-OSI Standards Architecture
– 5. Application layer (application-to-application)
– 4. Transport layer (host-to-host)
– 3. Internet layer (across an internet)
– 2. Data link layer (across a switched network)
– 1. Physical layer (between adjacent devices)
18
Topics Covered
• Ethernet
– Source and destination addresses are 48 bits long
– Switches forward packets by destination addresses
– Data field encapsulates an IP packet
– Unreliable: if detects an error, drops the frame
• Internet Protocol (IP)
– 32-bit addresses
– Show 32 bits on each line
– Unreliable: checks headers for errors but discards
19
Topics Covered
• Vertical Communication on the Source Host
– Layer process creates message and then sends the message to the next-lower layer
– Next-lower layer encapsulates the message in its own message
– This continues until the final frame at the data link layer
• Vertical Communication on the Destination Host– Decapsulation and passing up
20
Topics Covered
• Not All Devices Have All Layers
– Hosts have all five
– Routers have only the lowest three
– Switches have only the lowest two
21
Topics Covered
• OSI Architecture– Divides application layer into three layers
• Session• Presentation• Application
• Other Standards Architectures– IPX/SPX
– SNA
– AppleTalk
Chp3 Topics Covered
23
Topics Covered
• Binary Data Encoding• Inherently binary data (IP addresses, etc.)
• Integers (binary arithmetic)
• Alternatives (N bits can represent 2N Alternatives)
• Text (ASCII and Extended ASCII)
• Graphics (pixels, bits per pixel color)
• …
• For transmission the sender converts bits to signals (on/off, voltage levels, etc.)
24
Topics Covered, Continued
• Digital Transmission (Box)
• A few states instead of just two states (binary)
• All binary transmission is digital transmission
• Only some digital transmission (transmission with two states) is binary
• In the box: bit rates and baud rates
25
Topics Covered, Continued
• UTP
– 4-pair UTP cords and RJ-45 connectors and jacks
– Attenuation (often expressed in decibels) and noise• Limit UTP cords to 100 meters
– Electromagnetic interference, crosstalk interference, and terminal crosstalk interference
• Limit wire unwinding to 1.25 cm (a half inch) to limit terminal crosstalk interference
– Serial versus parallel transmission
26
Topics Covered, Continued
• Optical Fiber
– On/off light pulses from transceiver
– Core and cladding; perfect internal reflection
– Dominates for trunk lines among core switches
– 2 fiber strands/fiber cord for full-duplex transmission
– SC and ST connectors are the most common
– Carriers use single-mode fiber and long wavelengths
– LANs use multimode fiber and short wavelengths
27
Topics Covered, Continued
• Multimode Optical Fiber Distance Increases With …
– Greater Wavelength
• 850 nm < 1310 nm < 1550 nm “windows”
• But larger-wavelength transceivers cost more
– Smaller Core Diameter
• 50 microns > 62.5 microns
– Greater Modal Bandwidth (MHz.km)
• Measure of multimode fiber quality
28
Topics Covered, Continued
• Topologies
– Organization of devices and transmission links
– Physical layer concept
– Point-to-point, star, hierarchy, ring, etc.
Chp 4Topics Covered
30
Topics Covered
• Ethernet Standards Setting– 802.3 Working Group
– Physical and data link layer standards
– OSI standards
• Physical Layer Standards– BASE means baseband
– 100BASE-TX dominates for access lines
– 10GBASE-SX dominates for trunk lines
– Link aggregation for small capacity increases
– Regeneration to carry signals across multiple switches
31
Topics Covered
• Ethernet MAC Layer Standards– Data link layer subdivided into the LLC and MAC layers– The Ethernet MAC Layer Frame
• Preamble and Start of Frame Delimiter fields• Destination and Source MAC addresses fields
–Hexadecimal notation• Length field• Data field
–LLC subheader–Packet–PAD if needed
• Frame Check Sequence field
32
• Ethernet MAC Layer Standards– Switch operation
• Operation of a hierarchy of switches
–Single possible path between any two computers
–Hierarchy gives low price per frame transmitted
–Single points of failure and the Spanning Tree Protocol
• VLANs and frame tagging to reduce broadcasting
• Momentary traffic peaks: addressed by overprovisioning and priority
• Hubs and CSMA/CD
Chp 5Topics Covered
34
Radio Propagation
• 802.11 for Corporate WLANs
• Frequencies and Channels
• Antennas
• Propagation Problems
– Inverse square law attenuation
– Dead spots / shadow zones
– Electromagnetic interference
– Multipath interference
– Attenuation and shadow zone problems increase with frequency
35
Radio Propagation
• Shannon’s Equation and the Importance of Channel Bandwidth
– C = B Log2(1+S/N)
• WLANs use unlicensed Radio Bands
• Spread Spectrum Transmission to Reduce Propagation Problems– FHSS (up to 4 Mbps)
– DSSS (up to 11 Mbps)
– OFDM (up to 54 Mbps)
– MIMO (100 Mbps to 600 Mbps)
36
802.11 Operation
• Wireless Access Point Bridge to the Main Wired Ethernet LAN
– To reach servers and Internet access routers
– Transfers packet between 802.11 and 802.3 frames
• Need for Media Access Control (Box)
– CSMA/CA and RTS/CTS
– Throughput is aggregate throughput
37
802.11 Operation
• Bands
– 2.4 GHz band: Only 3 channels, lower attenuation
– 5 GHz band: Around 24 channels, higher attenuation
– More channels means less interference between nearby access points
• Standards
– 802.11b: 11 Mbps, DSSS, 2.4 GHz band
– 802.11a: 54 Mbps, OFDM, 2.4 GHz band
– 802.11g: 54 Mbps, OFDM, 5 GHz band
– 802.11n: 100 Mbps – 600 Mbps, MIMO, Dual-Band
38
802.11 WLAN Security
• Wardrivers and Drive-By Hackers
• Core Security
– WEP (Unacceptably Weak)
– WPA (Lightened form of 802.11i)
– 802.11i (The gold standard today)
– 802.1X and PSK modes for WPA and 802.11i
• Rogue Access Points and Evil Twin Access Points
39
WLAN Management
• Surprisingly Expensive
• Access Point Placement
– Approximate layout
– Site survey for more precise layout and power
• Remote Access Point Management
– Smart access points or WLAN switches and dumb access points
40
Bluetooth
• PANs
• Cable Replacement Technology
• Limited Speeds and Distance
• Application Profiles
Chp 6Topics Covered
42
Telecommunications
• Data Communications versus Telecommunications
• The PSTN’s Technical Elements
– Customer premises equipment (PBX and 4-pair UTP)
– Access system (local loop)
– Transport core
– Signaling (call setup and management)
• POP to interconnect carriers
43
Telecommunications
• Access Lines
– For residences, 1-pair voice-grade UTP• DSL uses existing residential access lines to carry data
by changing the electronics at each end (DSL modem in the home and DSLAM at the end office switch)
• DSL is cheap because 1-p VG UTP is already in place
– For businesses,• 2-pair data-grade UTP for speeds up to a few Mbps• Optical fiber for faster speeds• Usually must be pulled into place, so expensive
– Eventually, fiber to the home (FTTH), FTTC, FTTN
44
PSTN Transmission
• Circuit Switching
– Reserved capacity end-to-end
– Acceptable for voice, but not for bursty data transmission
– Dial-up and leased line circuits
• Analog and Digital Transmission
– Analog signals on the local loop
– ADC and DAC at the end office switch
– ADC: bandpass filtering and sampling for 64 kbps
– DAC: sample values are converted to sound levels
45
Cellular Telephony
• Cells Allow Channel Reuse
– Channel reuse allows more customers to be served with a limited number of channels
• GSM: most widely used technology for cellular telephony
• CDMA for greater channel reuse
• Handoffs and Roaming
46
VoIP
• To allow voice to be carried over data networks
• Converge voice and data networks
• Phone needs a codec
• Transport: UDP header followed by RTP header
• Signaling: H.323 and SIP
• Video over IP
47
Residential Internet Access Services
• Telephone Modems
• Asymmetric Digital Subscriber Line (ADSL)
• Cable Modem Service
• 3G Cellular Data Service
• WiMAX (802.16 and 802.16e)
• Broadband Over Power Lines
• Fiber to the Home (FTTH)
Chp 7Topics Covered
49
WANs
• Wide Area Networks– Carry data between different sites, usually within a
corporation
– High-cost and low-speed lines• 128 kbps to a few megabits per second
– Carriers
– Purposes• Internet access, site-to-site connections, and remote
access for Individuals
– Technologies• Leased line networks, public switched data networks,
and virtual private networks
50
Leased Line Networks
• Leased Lines are Long-Term Circuits
– Point-to-Point
– Always On
– High-speeds
• Device at Each Site
– PBX for leased line voice networks
– Router for leased line data networks
• Pure Hub-and-Spoke, Full Mesh, and Mixed Topologies
51
Leased Line Networks
• Many Leased Line Speeds
– Fractional T1, T1, and bonded T1 dominate
– Slowest leased lines run over 2-pair data-grade UTP
– Above 3 Mbps, run over optical fiber
– Below about 3 Mbps, 2-pair data grade UTP
– Above 3 Mbps, optical fiber
– North American Digital Hierarchy, CEPT, and other standards below 50 Mbps
– SONET/SDH above 50 Mbps
– Symmetrical DSL lines with QoS
52
Public Switched Data Networks
• PSDNs
– Services offered by carriers
– Customer does not have to operate or manage
– One leased line per site from the site to the nearest POP
– By reducing corporate labor, typically cheaper than leased line networks
– Service Level Agreements
– Virtual circuits
53
Frame Relay PSDNs
• Frame Relay
– Most popular PSDN
– 56 kbps to about 40 Mbps
– Access devices, CSU/DSUs, leased access lines, POP ports, virtual circuits, management
• Usually POP port speed charges are the biggest cost component
• Second usually are PVC charges
– Leased line must be fast enough to handle the speeds of all of the PVCs multiplexed over it
54
Other PSDNs
• ATM– High speed and cost– Cell switching– Low use
• Metro Ethernet– Extending Ethernet to MANs– Very attractive speeds and prices– Small but growing rapidly
55
Virtual Private Networks (PVCs)
• The Internet is inexpensive and universal
– VPNs add security to transmission over the Internet (or any other untrusted network)
• IPsec– The strongest security for VPNs– Tunnel mode between sites is inexpensive– Transport mode between computers is expensive
• SSL/TLS– First for browser communication with a single webserver– SSL/TLS gateways make it a full remote access VPN
56
Chp 8Topics Covered
578-57
Topics Covered
• Internetworking Recap from Earlier Chapters
– Internetworking involves the internet and transport layers
– Packets are encapsulated in frames in single networks.
– Transport layer is end-to-end
– Internet layer is hop-by-hop between routers
– IP, TCP, and UDP are the heart of TCP/IP internetworking
588-58
Topics Covered
• Hierarchical IP Address parts
– Network, subnet, and host parts
• Router Operation
– Border routers connect networks
– Internal routers connect subnets
– We focused on TCP/IP routing, but multiprotocol routing is crucial
– Router meshes give alternative routes, making routing very expensive
598-59
Topics Covered
• Routing of Packets• Routing tables• IP address range governed by a row—usually a route
to a network or subnet• Metric to help select best matches• Next-hop router to be sent the packet next
– Can be a local host on one of the router’s subnets
– Process• Final all possible routes through row matching• Select by length of match, then metric if tie• Send out to next-hop router in the best-match row
608-60
Topics Covered
• Detailed Look at Routing Decisions• IP address range
– Destination– Mask– If the masked destination IP address in an arriving
packet matches the destination value, the row is a match
• Next-Hop Router
– Interface– Next-hop router or destination host
Box
618-61
Topics Covered
• Dynamic Routing Protocols• Interior dynamic routing protocols within an
autonomous system– RIP, OSPF, EIGRP
• Exterior dynamic routing protocols between autonomous systems
– BGP
• Address Resolution Protocol
– Router knows the IP address of the next-hop router or destination host
– Must learn the data link layer address as well
628-62
Topics Covered
• Domain Name System (DNS)– General hierarchical naming system for the Internet
638-63
Topics Covered
• The Internet Protocol (IP)
– Detailed look at key fields
– Protocol field lists contents of the data field
– 32-bit IP addresses
– IPv4 is the current version
– IPv6 offers 128-bit IP addresses to allow many more IP addresses to serve the world
648-64
Topics Covered
• The Transmission Control Protocol (TCP)
– Sequence and acknowledgement numbers
– Flag fields that are set or not set
– Window size field allows flow control
– Options are common
– Three-way openings (SYN, SYN/ACK, and ACK)
– Four-way normal closings (FIN, ACK, FIN, ACK)
– One-way abrupt closing (RST)
658-65
Topics Covered
• The User Datagram Protocol (UDP)– Simple four-field header
• Port Numbers and Sockets in TCP and UDP– Applications get well-known port numbers on servers
– Connections get ephemeral port numbers on clients
– Socket is an IP address, a colon, and a port number
– This designates a specific application (or connection) on a specific server (or client)
• Layer 3 Switches– Fast, inexpensive, and limited routers
66
2009-2010 年第一学期网络课试卷题型
• 一、判断题( 6 1.5 ╳ )• 二、选择题( 16 2 ╳ )• 三、简答题(简短文字或画图说明)( 17 )• 四、问答题 + 计算题( 58 )
67
• 1 月 7 日 13 : 30 在教室,然后 16 : 30-19 : 00 在思源 708
• 1 月 13 日下午 16 : 00-19 : 00
• 考试时间地点• 1 月 14 日 上午 8 : 30-10 : 30 ;地点: H6505