880 likes | 894 Views
This lecture provides an overview of fundamental computer networking technologies and data center technologies. Topics covered include network socket programming, data center network emulation, and SDN programming.
E N D
Data Center (and Network)Lecture 1 Seungwon shin CNS group, ee, kaist
Course objective • Learn fundamental computer networking technologies and data center technologies • Lecturer • Seungwon Shin (EE Professor) • claude@kaist.ac.kr, • Office: #910 N1 • TA (#919, N1) • Jinwoo Kim • Hyeonseong Jo • Seungsoo Lee Course Overview
Assignment • #1: network socket programming • #2: data center network emulation • #3: SDN programming Course Overview
You need to implement a client-server communication program • It should be written in one of the following three languages • C, C++, JAVA #1 Network socket programming
Mininet • A simple network emulation platform • Emulate multiple hosts, switches, and links • Enforce network flow rules to forward/drop network packets #2 data center network emulation
You need to implement network flow handling applications on an SDN environment #3 SDN programming
Network of networks Standardized format and protocols for connecting multiple heterogeneous networks Internet
Internet map Internet - now
The monolithic view THE INTERNET !!!! 4 3 5 2 6 7 1 Web server Client Browser
Protocols • Language for communication • Layering • Standing on the shoulder of a giant • Naming • What (how) to call • Resource management • Share resources with many users • Security(?) Key Features in Networking
Concept • Speak same languages • How do you communicate with your friends? • Korean? English? Mandarin? Japanese? Klingon? • Communication in people • Same spoken language • Communication in machine (hosts, switches, routers) • Same message format Protocols
An agreement between parties on how communication should take place • Module in layered structure • Protocols define • Interface to higher layers (API) • Interface to peer (syntax & semantics) • Actions taken on receipt of a messages • Format and order of messages • Error handling, termination, ordering of requests, etc. • Example: Buying airline ticket Protocol Friendly greeting Want an airline ticket Destination? Seoul Credit card..
Design • How should hosts and routers communicate? • Standard protocol • Fast: Machine readable in hardware at line rates • Browsers, web servers, and proxies? • Can be slower: software readable • Human readable • Extensible and forward-compatible • Not everybody might be familiar with extensions Protocol
UDP TCP Protocol Applications FTP HTTP NV TFTP TCP UDP Waist IP Data Link NET1 NET2 … NETn Physical The Hourglass Model
IPv4 header 4-bit Header Length 8-bit Type of Service (TOS) 4-bit Version 16-bit Total Length (Bytes) 3-bit Flags 16-bit Identification 13-bit Fragment Offset 20-byte header 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload
HTTP header GET /courses/archive/spr09/cos461/ HTTP/1.1 Host: www.cs.princeton.edu User-Agent: Mozilla/4.03 CRLF Request HTTP/1.1 200 OK Date: Mon, 2 Feb 2009 13:09:03 GMT Server: Netscape-Enterprise/3.5.1 Last-Modified: Mon, 42 Feb 2009 11:12:23 GMT Content-Length: 21 CRLF Site under construction Response
Physical: how to transmit bits Data link: how to transmit frames Network: how to route packets Transport: how to send packets end2end Session: how to tie flows together Presentation: byte ordering, security Application: everything else TCP/IP has been amazingly successful, and it’s not based on a rigid OSI model. The OSI model has been very successful at shaping thought Protocol: OSI 7 layer
Sub-divide the problem • Each layer relies on services from layer below • Each layer exports services to layer above • Interface between layers defines interaction • Hides implementation details • Layers can change without disturbing other layers Layering Application Application-to-application channels Host-to-host connectivity Link hardware
Layering Peer Layer Peer Layer User A User B Application Transport Network Link Host Host Modular approach to network functionality
Protocol + Layering Application Presentation Session Transport Network Data Link Physical Bridge/Switch Host Router/Gateway Host
Layering – message delivery Application Transport Network Link Physical Host Bridge/Switch Router/Gateway Host
Layering - encapsulation User A User B Get index.html Connection ID Source/Destination Link Address
IP IP IP Ethernet interface host host HTTP message HTTP HTTP TCP segment TCP TCP router router IP packet IP packet IP packet IP Ethernet interface SONET interface Ethernet interface Ethernet interface SONET interface
Concept of • Networking • Internet • Key features in Networking • Protocol • Layering • Naming - later • Resource management – later Summary
IP IP IP host host HTTP message HTTP HTTP TCP segment TCP TCP router router IP packet IP packet IP packet IP Ethernet interface Ethernet interface SONET interface Ethernet interface Ethernet interface SONET interface
Data Transmission • Different devices switch different things • Network layer: packets (routers) • Link layer: frames (bridges and switches) • Physical layer: electrical signals (repeaters and hubs) Application gateway Transport gateway Frameheader Packetheader TCPheader User data Router Bridge, switch Repeater, hub
Link Transmissions in 1858 On August 16, 1858: "Glory to God in the highest; on earth, peace and good will toward men.” 17 hours to transmit, 2 min per character, 0.1 words per minute
Link Transmissions in 1866 1866 cable: 8 words / minute Great Eastern – cable laying ship
IP Transmissions in 1969 First message on Internet: $ lo >system crash<
Signals sent over physical links • Source node: bits -> signal • Receiving node: signal -> bits • Encoding in telegraph • Morse code: “long” and “short” signals Digital -> Analog Encoding
Signals sent over physical links • Source node: bits -> signal • Receiving node: signal -> bits • Simplify some electrical engineering details • Assume two discrete signals, high and low • E.g., could correspond to two different voltages • Simple approach: Non-return to zero • High for a 1, low for a 0 Digital -> Analog Encoding
Long strings of 0s or 1s introduce problems • No transitions from low-to-high, or high-to-low • Receiver keeps average of signal it has received • Uses the average to distinguish between high and low • Long flat strings make receiver sensitive to small change • Transitions also necessary for clock recovery • Receiver uses transitions to derive its own clock • Long flat strings do not produce any transitions • Can lead to clock drift at the receiver Problem With NRZ
Manchester encoding (basic Ethernet) • clock XOR NRZ: 802.3: HL (0), LH (1) : self-clocking • Efficiency? • Manchester: 2 clock transitions per bit: 50% efficient Protocols with clock-recovery
frame frame Digital adaptors Communicating datagram link layer protocol adapter receiving node adapter sending node • Link layer implemented in adaptor (network interface card) • Ethernet card, PCMCIA card, 802.11 card • Sending side: • Encapsulates datagram in a frame • Adds error checking bits, flow control, etc. • Receiving side • Looks for errors, flow control, etc. • Extracts datagram and passes to receiving node
Encoding • Representing the 0s and 1s • Framing • Encapsulating packet into frame, adding header, trailer • Using MAC addresses, rather than IP addresses • Error detection • Errors caused by signal attenuation, noise. • Receiver detecting presence of errors • Error correction • Receiver correcting errors without retransmission • Flow control • Pacing between adjacent sending and receiving nodes Link-Layer Services
Break sequence of bits into a frame • Typically implemented by the network adaptor • Sentinel-based • Delineate frame with special pattern (e.g., 01111110) • Problem: what if special patterns occurs within frame? • Solution: escaping the special characters • E.g., sender always inserts a 0 after five 1s • … and receiver always removes a 0 appearing after five 1s • Similar to escaping special characters in C programs Framing 01111110 Frame contents 01111110
Counter-based • Include the payload length in the header • … instead of putting a sentinel at the end • Problem: what if the count field gets corrupted? • Causes receiver to think the frame ends at a different place • Solution: catch later when doing error detection • And wait for the next sentinel for the start of a new frame • Clock-based • Make each frame a fixed size • No ambiguity about start and end of frame • But, may be wasteful Framing (Continued)
Errors are unavoidable • Electrical interference, thermal noise, etc. • Error detection • Transmit extra (redundant) information • Use redundant information to detect errors • Extreme case: send two copies of the data • Trade-off: accuracy vs. overhead Error Detection
Parity check • Add an extra bit to a 7-bit code • Odd parity: ensure an odd number of 1s • E.g., 0101011 becomes 01010111 • Even parity: ensure an even number of 1s • E.g., 0101011 becomes 01010110 • Checksum • Treat data as a sequence of 16-bit words • Compute a sum of all 16-bit words, with no carries • Transmit the sum along with the packet • Cyclic Redundancy Check (CRC) Error Detection Techniques