Lecture 17: Final Review CSE 123: Computer Networks Chris Kanich Last class!!! Overview Signaling Framing Error detection Reliable transmission Flow control Bridging/Switching Congestion control Routing QoS Wireless CSE 123: Lecture 17: Final Review 2 Final Mechanics Bulk of the final covers material after midterm Routing, QoS, Wireless Some material on signaing, framing, transport, etc. MAC, ARQ, TCP, IP Based upon lecture material, homeworks, and project May be a question regarding the projects Closed book, one page of notes Expect similar style to midterm, just longer CSE 123: Lecture 17: Final Review 3 1
TCP/IP Protocol Stack host host HTTP Application Layer HTTP TCP Transport Layer TCP router router I I Network Layer I I P P P P Ethernet SONET Ethernet Ethernet Ethernet SONET Link Layer interface interface interface interface interface interface CSE 123: Lecture 17: Final Review 4 Signals and Channels A signal is some form of energy (light, voltage, etc) Varies with time (on/off, high/low, etc.) Can be continuous or discrete We assume it is periodic with a fixed frequency A channel is a physical medium that conveys energy Any real channel will distort the input signal as it does so How it distorts the signal depends on the signal CSE 123: Lecture 17: Final Review 5 Channel Properties Bandwidth-limited Range of frequencies the channel will transmit Means the channel is slow to react to change in signal Power attenuates over distance Signal gets softer (harder to “hear”) the further it travels Different frequencies have different response (distortion) Background noise or interference May add or subtract from original signal Different physical characteristics Point-to-point vs. shared media Very different price points to deploy CSE 123: Lecture 17: Final Review 6 2
Signaling Digital modulation FSK, ASK, PSK Dealing with noise Shannon’s law Sampling at the receiver Intersymbol Inteference: Nyquist Limit Synchronous vs. Asynchronous coding Clock recovery NRZ, Manchester, 4B/5B CSE 123: Lecture 17: Final Review 7 (Data) Link Layer Framing Break stream of bits up into discrete chunks Error handling Detect and/or correct errors in received frames Media access Arbitrate which nodes can send frames at any point in time Not always necessary; e.g. point-to-point duplex links Multiplexing Determine appropriate destination for a given frame Also not always required; again, point-to-point CSE 123: Lecture 17: Final Review 8 Framing Header Payload Trailer Framing determines when payload starts/stops Lots of different ways to do it, various efficiencies Sentinel-based framing requires stuffing Increases the size of the packet Alternatives include fixed size frames CSE 123: Lecture 17: Final Review 9 3
Error Detection Error handling through redundancy Adding extra bits to the frame Hamming Distance When we can detect When we can correct Checksum Cyclic Remainder Check (CRC) CSE 123: Lecture 17: Final Review 10 Reliable Transmission Automatic Repeat Request (ARQ) Acknowledgements (ACKs) and timeouts Stop-and-Wait Sliding Window Forward Error Correction CSE 123: Lecture 17: Final Review 11 Sliding Window Single mechanism that supports: Multiple outstanding packets Reliable delivery In-order delivery Flow control At the core of all modern ARQ protocols Go-Back-N is a special case Receive window size of one CSE 123: Lecture 17: Final Review 12 4
Media Access Control Methods to share physical media: multiple access Fixed partitioning Random access Channelizing mechanisms Contention-based mechanisms Aloha Ethernet CSE 123: Lecture 17: Final Review 13 Partitioning Visualization FDMA power TDMA power CDMA power Courtesy Takashi Inoue CSE 123: Lecture 17: Final Review 14 Carrier Sense (CSMA) + CD Aloha transmits even if another host is transmitting Thus guaranteeing a collision Instead, listen first to make sure channel is idle Useful only if channel is frequently idle Why? If nodes can detect collisions, abort! Requires a minimum frame size (“acquiring the medium” ) Requires a full duplex channel Binary exponential back-off balances delay w/load CSE 123: Lecture 17: Final Review 15 5
Transport Layer Provides process naming/demultiplexing Port numbers Two main protocols in use on the Internet User Datagram Protocol (UDP) » Unreliable, datagram service Transport Control Protocol (TCP) » Reliable byte-stream » Requires connection establishment/three-way handshake CSE 123: Lecture 17: Final Review 16 Transmission Control Protocol Reliable bi-directional bytestream between processes Uses a sliding window protocol for efficient transfer Connection-oriented Conversation between two endpoints with beginning and end Flow control Prevents sender from over-running receiver buffers Congestion control Prevents sender from over-running network capacity CSE 123: Lecture 17: Final Review 17 Congestion Control How fast should a sending host transmit data? Not to fast, not to slow, just right… Should not be faster than the sender ’ s share Bandwidth allocation Should not be faster than the network can process Congestion control Congestion control & bandwidth allocation are separate ideas, but frequently combined CSE 123: Lecture 17: Final Review 18 6
TCP’s Algorithm Window-based congestion control Unified congestion control and flow control mechanism rwin : advertised flow control window from receiver cwnd : congestion control window » Estimate of how much outstanding data network can deliver in a round-trip time Sender can only send MIN( rwin,cwnd ) at any time Complicated with slow start and fast recovery Ramp up quickly Avoid backing all the way down on isolated loss events CSE 123: Lecture 17: Final Review 19 Hubs/Repeaters Physical layer device One “port” for each LAN Repeat received bits on one port out all other ports Hub LAN1 LAN2 LAN3 CSE 123: Lecture 17: Final Review 20 Bridges Store and forward device Data-link layer device Buffers entire packet and then rebroadcasts it on other ports Creates separate collision domains Uses CSMA/CD for access to each LAN (acts like a host) Improves throughput Some bridges can learn topology Spanning Tree Algorithm CSE 123: Lecture 17: Final Review 21 7
internetworking Switching still only moves frames on common link layer MAC addresses are unique but flat Routers forward packets from source to destination May cross many separate networks along the way All packets use a common Internet Protocol Any underlying data link protocol Any higher layer transport protocol CSE 123: Lecture 17: Final Review 22 Routers A router is a store-and-forward device Routers are connected to multiple networks On each network, looks just like another host A lot like a switch, except at the network layer Must be explicitly addressed by incoming frames Not at all like a switch, which is transparent Removes link-layer header, parses IP header Looks up next hop, forwards on appropriate network Each router need only get one step closer to destination CSE 123: Lecture 17: Final Review 23 IP Addresses 32-bits in an IPv4 address Dotted decimal format a.b.c.d Each represent 8 bits of address Hierarchical: Network part and host part E.g. IP address 128.54.70.238 128.54 refers to the UCSD campus network 70.238 refers to the host ieng6.ucsd.edu Subnetting/CIDR aggregation Network mask/prefix CSE 123: Lecture 17: Final Review 24 8
Layers of Identifiers Host name (e.g., www.ucsd.edu) Used by humans to specify host of interest Unique, selected by host administrator Hierarchical, variable-length string of alphanumeric carachters IP address (e.g., 128.54.70.238) Used by routers to forward packets Unique, topologically meaningful locator Hierarchical namespace of 32 bits MAC address (e.g., 58:B0:35:F2:3C:D9) Used by network adaptors to identify interesting frames Unique, hard-coded identifier burned into network adaptor Flat name space (of 48 bits in Ethernet) CSE 123: Lecture 17: Final Review 25 Naming Protocols Domain Name System Distributed, hierarchical database Distributed collection of servers Caching to improve performance IP to MAC Address mapping Dynamic Host Configuration Protocol (DHCP) Address Resolution Protocol (ARP) CSE 123: Lecture 17: Final Review 26 Routing How to choose best path? Defining “ best ” can be slippery How to scale to millions of users? Minimize control messages and routing table size How to adapt to failures or changes? Node and link failures, plus message loss CSE 123: Lecture 17: Final Review 27 9
Recommend
More recommend