CSE331: Introduction to Networks and Security Lecture 2 Fall 2002
CSE331 Fall Announcements HW1 is due Friday –Homework and lectures are available only inside upenn.edu domain CSE331 newsgroup: upenn.cis.cse331
CSE331 Fall Recap General network concepts –Nodes and links Design goals –Connectivity –Resource sharing –Functionality –Performance Direct link networks –Bandwidth (bits/sec) –Latency = prop. delay + transmit + queue
CSE331 Fall Bandwidth vs. Latency Which is the better deal: –Improve your bandwidth from 1 Mbps to 100 Mbps, or –Improve your RTT from 100 ms to 1 ms? The answer depends on what you need to send.
CSE331 Fall Latency Bound Send 1 byte Perceived Latency 100 ms1 ms 1 Mbps ms1.008 ms 100 Mbps ms ms Transmit Time 1 Mbps8 s 100 Mbps.08 s 99%.008%.8%
CSE331 Fall Bandwidth Bound Send 25 MB Transmit Time 1 Mbps3.5 min 100 Mbps21 sec Perceived Latency 100 ms1 ms 1 Mbps210.1 sec sec 100 Mbps 21.1 sec sec.05%.5%90%
CSE331 Fall Tradeoffs RTT from Penn to Stanford is approx. 100ms 800 MHz workstation –80 million cycles elapsed in that time Data compression –Trades machine cycles for bandwidth (Question: Why is RTT important?)
CSE331 Fall Network Architecture Need a way to deal with the complex requirements of a network Use abstraction to separate concerns –Decompose problem –Modular changes Protocol Layers
CSE331 Fall Protocols A protocol is a specification of an interface between modules (often on different machines) Sometimes “protocol” is used to mean the implementation of the specification. Examples?
CSE331 Fall Interprocess communication Zeta Central Saul Eniac Application
CSE331 Fall Example Protocol Stack Process-to-Process Channels Host-to-Host Connectivity Hardware Application Programs Request / Reply ChannelMessage Stream Channel
CSE331 Fall Protocol Interfaces Service Interfaces –Communicate up and down the stack Peer Interfaces –Communicate to counterpart on another host Protocol High-level Object High-level Object Peer-to-peer interface Service interface Service Interface Host #1 Host #2
CSE331 Fall Example Protocol Graph File App RRP HHP Host 1Host 2 Video App MSP File App RRP HHP Video App MSP
CSE331 Fall Encapsulation File App RRP HHP Host 1Host 2 Video App MSP File App RRP HHP Video App MSP DATA RRPDATARRP HHP DATARRP DATA
CSE331 Fall Open Systems Interconnection (OSI) Application Presentation Session Transport Network Data Link Physical End Host Reference model – not actual implementation. Transmits messages (e.g. FTP or HTTP) Data format issues (e.g. big- vs. little-endian) Manages multiple streams of data Process to process protocols Routes packets among nodes in network Packages bit streams into frames Transmits raw bits over link
CSE331 Fall Open Systems Interconnection (OSI) Application Presentation Session Transport Network Data Link Physical Network Data Link Physical Network Data Link Physical Application Presentation Session Transport Network Data Link Physical Nodes in network End Host
CSE331 Fall Internet Protocol Graph FTPHTTPNVTFTP TCP UDP IP EthernetATMFDDI
CSE331 Fall Problem: Physical connection Transmitting signals Encoding & decoding bits Error detection and correction Reliable transmission
CSE331 Fall Signaling Components Network Adapter Network Adapter Host signal Signaling Components Network adapters encode streams of bits into signals. Simplification: Assume two discrete signals—high and low. Practice: Two different voltages on copper link.
CSE331 Fall Bit Encodings Bits: NRZ Non-return to zero 1 = high, 0 = low Problem: Can lead to long sequences of high or low signals.
CSE331 Fall NRZ Problem 1: baseline wander Receivers keeps average signal seen so far –Significantly higher than average = 1 –Significantly lower than average = 0 Long periods of high/low changes average –Makes it harder to detect significant changes Bits: NRZ
CSE331 Fall NRZ Problem 2: clock recovery Sender & Receiver are driven by clocks –Must keep clocks synchronized to recover bits –When signal changes, can resynchronize clocks Long periods of high/low lead to clock drift Bits: NRZ
CSE331 Fall NRZI: Non-return Transition from current signal to encode “1” Stay at current signal to encode “0” Does not help for consecutive 0’s Bits: NRZ NRZI
CSE331 Fall Manchester Encoding Exclusive-OR of clock and NRZ encoding Doubles rate at which signal transitions are made – less time for receiver to detect changes Bits: NRZ Manchester Clock
CSE331 Fall Efficiency Bit rate vs. Baud rate NRZ and NRZI: bit rate = baud rate = 100% –Suffer from baseline wander and clock drift Manchester: bit rate = ½ baud rate = 50% –Prevents baseline wander and clock drift Can you do better? (Question: can bit rate exceed baud rate?)
CSE331 Fall B/5B Encode 4 bits of data using 5 bits Choose codes to avoid long sequences of 0’s Send 5 bit sequences using NRZI 80% efficiency Encoding –No more than one leading 0 –No more than two trailing 0’s ……