Lecture Topics

• History and motivation • Network architecture – Layered models – Definitions and abstractions Introduction to Networks – OSI Reference Model • Network design issues – Definitions – Components – Message, packet, and cell switching – Resource sharing – Functionality – Performance

Networks are Important!!! Internet Hosts

WWWWWW EmailEmail WorldWorld WideWide WebWeb ElectronicElectronic MailMail TelnetTelnet TerminalTerminal EmulationEmulation FTPFTP Multimedia FileFile TransferTransfer ProtocolProtocol Multimedia

C/SC/S Client-ServerClient-Server ApplicationsApplications

… and many others … http://www.isoc.org/guest/zakon/Internet/History/HIT.html

NET.WORK.VIRGINIA World Wide Web Sites vBNS ESnet Internet2  ATM network with Internet access  Over 400 sites with OC3, Internet DS3, or DS1 service  SprintLink DS3 Service through Sprint and Router Vision Alliance (consortium OC3 led by Bell Atlantic) Sprint WTN

OC3 OC3

Sprint RIC OC3 Sprint ROA

http://www.isoc.org/guest/zakon/Internet/History/HIT.html Backbone/Internet Gateway

1 Network Architecture A Simple Layered Model

• Network architecture Application Programs – Guides the design and implementation of the network – Assists in coping with complexity Process-to-Process Channels • Networks are typically modeled as a set of

layered, cooperating processes Layers Host-to-Host Connectivity • The International Organization for Standards Networking Hardware (ISO) has developed the seven-layer Open Systems Interconnect (OSI) model • Decomposes system into simpler, manageable – The OSI model is not strictly adhered to in actual components implementations. It is used more as guidelines. • Provides a modular design

Multiple Abstractions for One Layer Functions Are Not Always “Layer-able”

Application Programs Application Programs Request/Reply Message Stream Channel Channel Process-to-Process Channels

Host-to-Host Connectivity Host-to-Host Connectivity Network

Networking Hardware Networking Hardware Management

• Process-to-process channel – Request/reply interaction • Some functions may need to interact with – Stream of messages multiple layers

Layered Models … Generalized (1) Layered Models … Generalized (2)

•Layer N services provided to upper layers – Provides services to layers N+1 and above – Uses services offered by layers N-1 and below service interface – May ONLY interact with peer layer N entities via protocols peer-to-peer • Distinction between service, interface, and Node A interface Node B implementation Layer N protocol

Layer N+1 Layer N+1 service interface Layer N Layer N services provided by lower layers Layer N-1 Layer N-1

2 Layered Models … Generalized (3) Interfaces and Protocols

• Protocols are rules for cooperation between peers • Three components of an interface – Peer-to-peer interfaces, e.g. Protocol X defines the – Set of visible abstract objects, and for each, a set of interfaces allowed operations with parameters – “Protocol” sometimes used to refer to the layer itself, – Set of rules governing sequences of operations e.g. the entity that realizes Protocol X – Encoding and formatting conventions required for • Service access points (SAPs) adhering to an operations and parameters interface definition are needed between layers – Service or layer-to-layer interface • Protocols are operationally equivalent, but are – The services implemented by a protocol at layer X are usually restricted to peer layers (interfaces are accessed through its SAP. Think of SAP as a functional between adjacent layers) interface.

OSI Terminology for Layering OSI Reference Model

IDU Layer N+1 ICI SDU Application Application Presentation Presentation SAP PDU Session Session Layer N header SDU ICI SDU Transport Transport Network Network Network SAP Service Access Point (where N+1 accesses N) IDU Interface Data Unit (passed from N+1 to N) Data Link Data Link Data Link SDU Service Data Unit (data from N+1) Physical Physical Physical ICI Interface Control Information (service type, etc.) PDU Protocol Data Unit (exchanged by peer N entities)

Deviation from Strict Layering Layered Model Example

• Example: Fiber Distributed Data Interface (FDDI) • Typical protocol “stack” in a UNIX-based TCP/IP environment LLC X FTP Telnet Data Link Application MAC HTTP SMTP NFS PHY SMT Physical Presentation XDR PMD Session RPC LLC Logical Link Control Transport TCP UDP MAC Media Access Control Network IP PHY Physical Data Link Ethernet FDDI PMD Physical Media Dependent Physical SMT Station Management

3 Internet Protocol Graph Advantages of Layering (1)

• Internet protocols (“TCP/IP”) really uses a • Data hiding and encapsulation -- data structures, four-layer architecture algorithms, etc. in a layer are not visible to other layers HTTP FTP HTTP FTP • Decomposition -- complex systems can be decomposed into more easily understood pieces TCP UDP • System can evolve since layers can be changed (as long as service and interface does not change) IP • Alternate services can be offered at layer N+1 that share the services of layer N

Net 1 Net 2 ... Net n

Advantages of Layering (2) Disadvantages of Layering

• Alternate implementations of a layer can • Some functions (like FDDI station management) co-exist really need to access and operate at multiple layers • Poorly conceived layers can lead to awkward and • A layer or sublayer can be simplified or complex interfaces omitted if some or all of its services are not • There may be performance penalties due to extra needed overhead of layers, for example memory-to-memory copies • Confidence in correct operation enhanced • Design of (an older) layer N+1 may be by testing each layer independently sub-optimal given the properties of (a new) layer N

Physical Layer

• The provides a virtual link for • The data link layer is responsible for the transmitting a sequence of bits between any pair of error-free transmission of packets between nodes joined by a physical communication “adjacent” or directly-connected nodes (OSI defn) channel -- “virtual bit pipe” • The media access control (MAC) function is a • Synchronous or asynchronous sub-layer of the data link layer • Defines physical interface, signaling, cabling, – Allows multiple nodes to share a common transmission connectors, etc. media • May be variations at the physical level for a basic – Supports addressing of nodes data link protocol (PMD specs) • The logical link control (LLC) function is another – IEEE 802.3 (Ethernet): 10Base5 (thick wire), 10Base2 sub-layer (thin wire), 10BaseT (twisted pair) – Functions such as error recovery

4 Network Layer Transport Layer (1)

• The network layer is responsible for getting a • The transport layer provides packet through the network from the source node network-independent, end-to-end message transfer to the destination node between pairs of ports or sockets – Routing to select network path • Ports are destination points for communication – Flow control or congestion control that are defined by software – Internetworking to allow transmission between – Ports are identified by a transport address that identifies different types of networks the host computer and the port identifier • In a WAN or internetwork, the network layer – Used to distinguish between multiple applications on one host requires cooperation among peers at intermediate – Established services, like FTP and HTTP, have “well- nodes known” default port identifiers that can be obtained • Network layer function is minimal in a LAN through a name service (RFC 1700) • Key: Network layer provides host-to-host • Key: Transport layer provides process-to- communication process communication.

Transport Layer (2) Transport Layer (3)

• Transport layers typically provide one of Network two basic types of service: Process Process A B – Virtual circuit or connection-oriented service • Transmission Control Protocol (TCP) – Datagram or connection-less service Ports (Sockets) • User Datagram Protocol (UDP)

Transport Layer: Virtual Circuits Transport Layer: Datagrams

• Virtual circuits are logical channels between a • Datagram communication is connectionless source and destination • New connection is established and released for each • Connections are maintained for multiple packet or packet or message transmitted message transmissions until they are explicitly – Packet itself establishes and releases the “connection” released • Functions – Network layer may still use dynamic routing – Translate transport address to network address • Functions – Pass messages to network layer for delivery – Translate transport address to network address – Each message sent as a single packet – Segment messages into packets for transmission – Upper layer responsible for re-ordering and error detection – Pass packets to network layer for delivery – Reassemble packets at receiving end

5 Session Layer Presentation Layer (1)

• The session layer is responsible for • The presentation layer represents information to establishing and maintaining virtual applications so as to preserve semantics (meanings connections between pairs of processes in or values) while resolving syntactic different hosts, possibly including service (representation) differences location and access rights • In open systems, heterogeneous computers result in heterogeneous representations – Characters: ASCII, EBCDIC, Unicode • Multiple sessions may be multiplexed over a – Integers: lengths, 1’s versus 2’s complement single connection (provided by a lower layer) – Reals: fixed or floats, different float points – Byte order: 01234567... or 67452301 – Structured data

Presentation Layer (2) Application Layer

• Presentation layer may provide encryption • Network applications make up the application and/or compression may be used layer • Protocol specific to each particular application • Comments on security • Certain applications, like HTTP, NFS, FTP, and – Information security (INFOSEC): security at Telnet have been standardized this layer • Standards do not provide a fixed model for – Communications security (COMSEC): security applications, but models do exist at the physical or data link layer – Client-server versus peer-to-peer – Remote procedure call (RPC) versus message passing

Network Requirements Connectivity (1)

• Multiple view points: • Network building blocks – Network users – Nodes -- Workstations, PCs – Direct links -- twisted pair, coaxial cable, optical fiber, radio • Performance that a user’s applications need, e.g., latency frequency link, … (delay) and loss rate • Point-to-point – Network designers • Multiple access (multiaccess) • Cost-effective design e.g., network resources are efficiently utilized and fairly allocated Point-to-Point – Network service providers • System that is easy to administer and manage e.g., faults can be easily isolated and it is easy to account for use ...

Multiple Access

6 Connectivity (2) Connectivity (3) • An internetwork or internet is a network of • Indirect connectivity networks – Switched or routed networks allow indirectly connected – Need internetworking devices: Routers nodes to communication – The Internet is a specific example of an internet. – Switches, routers, hubs, etc. are specialized nodes in the network – Switching network is the “cloud”

Internetwork Switched Network

Message versus Packet Switching (1) Message versus Packet Switching (2)

• Networks may be classified by how they segment • Packets data for transmission and switching – Messages may be decomposed into one or more packets – Message-switched versus packet-switched for transmission, reconstructed at receiver – Most networks use packet switching (or cell switching) – Lower layer entities may further decompose packets, for example: Ethernet frames, ATM cells • Messages – Have some higher level meaning, e.g. as a request for service or a reply Message – Encoded as a string of bits

Packets with headers

Circuit vs. Store-and-Forward Sessions Switching • Messages usually occur as part of a longer transaction called a session • Two forms of switching for the messages or • Session properties packets in a session are widely used – Message or packet arrival process (rate, variability) – Circuit switching – Session holding time – Store-and-forward or, simply, “packet – Message or packet length distribution switching” – Acceptable delay – Required reliability and security – Acceptable ordering of messages or packets

7 Circuit Switching Efficiency of Circuit Switching • Session s initiated with a request for a fixed • Most data traffic is “bursty,” so links are not well transmission rate (bandwidth requirement) of rs utilized bits/sec time • Path created through the network – Each link in path allocates capacity of rs bits/sec to s, • Circuit switching not widely used in data networks e.g. using time-division multiplexing (TDM) or (except, inefficiently, for access) frequency division multiplexing (FDM) – Links are expensive – Request is blocked if no path can be established – Sessions require significant portion of link capacity • Bandwidth dedicated to s for the life of the session (only a few sessions can be supported) – Traffic is bursty, so utilization is low

Store-and-Forward Switching (1) Store-and-Forward Switching (2) • Advantages: • No transmission rate allocation is dedicated – Link fully utilized if there is any data to transmit at set-up – Delay can be significantly reduced – Differs from circuit switching – Utilization can be significantly increased • Disadvantages: • Data transmitted at full link capacity, but – Greater variance in delay due to queuing delays links can be shared by multiple sessions on – Flow control needed to prevent buffer overflows a demand basis

Store-and-Forward Switching (3) Store-and-Forward Switching (4)

• How is information switched? • How are messages or packets routed – Message Switching: messages are sent intact through the network? without being broken into packets – Virtual Circuit Routing: a path is established – Packet Switching: messages are broken into and used for the duration of the session packets for transmission • Connection-oriented or virtual circuit service – Cell Switching: messages (or packets) are – Dynamic Routing: each packet or message may broken into fixed-size packets called cells traverse a different path through the network • Connection-less or datagram service

8 Geographic Extent (1) Geographic Extent (2)

• Networks may be classified by their geographic • Local Area Networks (LANs) extent – Limited extent (10’s of meters to a few kilometers) – DANs, LANs, MANs, and WANs – High data rates (megabits to gigabits per second) – Useful classification for lower level protocols – Built-in interfaces in workstations, PCs – Should be transparent to upper layer protocols –Low cost • DAN: Desk Area Network – Low delay – Connects PC and peripherals – Examples: Ethernet, Token Ring, FDDI, ATM – USB, Firewire – Medium to high data rates – Low-cost, high-volume, built-in interfaces

Geographic Extent (3) Resource Sharing (1)

• Metropolitan Area Networks (MANs) • Economics dictates that network resources – Medium extent (10’s of kilometers) must be shared or multiplexed among – Medium data rates (kilobits to 100’s of megabits per second) multiple users – Special access equipment, often expensive – Shared links – Example: FDDI, ATM, DQDB – Shared network nodes (switches, hubs, etc.) • Wide Area Networks (WANs) – Large extent (global) Host Host – Low speed (kilobits to 100’s of megabits per second) – Special access equipment, usually expensive Host Switch Switch Host – High latency Host – Examples: T1, T3, SMDS, ATM, OC-XXX links Host

Resource Sharing (2) Statistical Multiplexing

• Multiplexing schemes • Packets from all traffic streams are merged into a single queue and transmitted –Fixed on-demand • Time-division multiplexing (TDM) or synchronous – Scheduling is typically first-come first-served (FCFS), time-division multiplexing (STDM) but priority schemes are also used • Frequency division multiplexing (FDM) – TSM=L/C seconds needed to transmit L-bit packet – On-demand – May also maintain a separate queue for each traffic stream and service in a “round-robin” manner (skipping • Statistical multiplexing, including asynchronous over an empty queue with no loss of transmission time-division multiplexing capacity)

9 Synchronous Time-Division Frequency Division Multiplexing Multiplexing • Time on the channel is divided into m slots and • Channel bandwidth W is subdivided into m each of m traffic streams is given one slot -- channels and each of m traffic streams is unused slots are wasted given one channel –Create m channels, each with capacity C/m –Create m channels, each with bandwidth W/m, – L-bit packet takes TSTDM=Lm/C seconds to transmit if packets are long compared to the length of a slot or capacity C/m (ignoring guard bands between channels) – L-bit packet takes TSTDM=L/C seconds to transmit if slots are of packet length, but must wait (m-1) slots – L-bit packet takes TFDM=Lm/C seconds to between transmissions transmit

FDM, STDM vs. Statistical Functionality (1) Multiplexing • Statistical multiplexing has smaller average delay • Network must support common services or than either STDM or FDM process-to-process channels, for example – Channel capacity is wasted with STDM (wasted time slot) and FDM (wasted bandwidth) when a traffic – Request/reply channel for file access, digital stream is idle libraries, etc. – Transmission time greater for STDM and FDM – Message stream channel for video and audio • Advantages of STDM or FDM applications – Statistical multiplexing has lower average delay, but higher variance of delay – STDM and FDM eliminate the need to identify traffic stream associated with each packet

Functionality (2) Functionality (3)

• What can corrupt this functionality? What • The key problem is to bridge can go wrong? – What the application expects and – Link or node failures – What the underlying technology can provide – Errors at the bit or packet level • Carries over to a layered model -- Layer N – Arbitrary delays needs to provide – Buffer overflows -- lost packets – Out of order delivery – What Layer N+1 expects using – Security -- eavesdropping, spoofing, etc. – What Layer N-1 can provide

10 Distributed Algorithms (1) Distributed Algorithms (2)

• Peers must cooperate to perform network • These algorithms are complex because underlying functions services may be unreliable • A distributed algorithm is decomposed into one or • Data may … more local algorithms – Never arrive (due to transmission error, overflow, etc.) – Arrive late (due to arbitrary network delay) • Each local algorithm proceeds based on the data – Arrive out of order (due to differing network paths) received from other layers or peers, and the order • It may be impossible to ensure correct operation in which the data is received 100% of the time – Maximize probability of success Network Network Network Network – Detect errors

Data Link Data Link Data Link Data Link Physical Physical Physical Physical

Maroon and Orange Armies (1) Maroon and Orange Armies (2)

• The messenger must go through enemy Orange territory (an unreliable communication Maroon Army Maroon channel) Army #1  Army #2  • Problems … • Maroon Armies #1 and #2 must attack – May be delayed -- until after the attack time simultaneously to defeat the Orange Army – May be captured -- so that message is never • Maroon Army #1 wants to send a messenger () delivered to Maroon Army #2 to set a time for the attack

Maroon and Orange Armies (3) Maroon and Orange Armies (4)

• Possible solution: require Maroon Army #2 to • The attack can be synchronized with high send another messenger to acknowledge that the probability first messenger arrived with the message – For example, send many messengers to increase – Acknowledgment messenger may be delayed or likelihood of one reaching Maroon Army #2? captured – Maroon Army #2 would think that the attack is on, but Maroon Army #1 cannot know if it is on or not • There is no possible solution to the problem with probability 1 of success

11 Performance Bandwidth

• Protocols and services define functionality, but not • Bandwidth is commonly used to indicate the performance amount of data that can be transferred in some unit – Bandwidth, throughput, data rate, capacity, … of time – Latency, delay, … • Example: 10 megabits per second – Variability in latency and data rate important for some –107 bits per second applications –10-7 seconds per bit (100 ns) -- the “bit width” – Loss is sometimes a performance measure -7 • Performance is determined by 10 s = 100 ns – Underlying technologies 101 – Protocol design – Protocol implementation • Link versus end-to-end bandwidth may vary – Use by the application or upper layer

Latency (1) Latency (2)

• Latency is delay, i.e. the time it takes for a • Example message to get from one point to another – Processing overhead -- assume 1 µs • Round-trip time (RTT) is the time it takes to get to – Transmission time one point and receive a return back • Assume L = 1,000 bit message • Assume C = 10 Mbps link • End-to-end versus link delay • Transmission time: T = L/C = 100 µs • Components – Propagation delay – Processing overhead -- e.g., software overhead • Speed of light is c = 2×108 m/s in optical fiber – Transmission time -- depends on bandwidth and length • Assume D = 1 km (1000 m) of message • Propagation delay = D/c = 5 µs – Propagation delay -- time for a bit to travel from one – Queueing delay -- assume 0 end of a link to another – Latency is 1 + 100 + 5 = 106 µs (transmission time – Queueing delay -- time waiting for a shared link dominates in this example)

Latency (3) Delay × Bandwidth Product

• Dominating factors • The delay×bandwidth product is an important – Processing overhead can dominate for high data factor in protocol design rate links over short distances with short – Determines the “size of the pipe” messages – Transmission time can dominate for slower B links or longer messages D – Propagation delay is important with long links – Made large by – Queuing delay can dominate in a congested • High delay, e.g. long propagation time network • High bandwidth, e.g. a fast link – Large product means that a large amount of data must be sent to “fill the pipe” before the receiver can respond

12 You should now be able to … (1) You should now be able to … (2)

• Define protocol, service access point, protocol • Define the basic components of a network data unit, service data unit including links, nodes, and switches • Describe the structure and role of a layers in a • Describe the construction of an internet (with a network architecture lower case i) • Cite advantages and disadvantages of a layered • Distinguish between message, packet, and cell model for a network architecture switching • List the seven layers in OSI reference model and • Distinguish between store-and-forward and circuit describe the basic functions of each layer switching and cite advantages and disadvantages • Describe the three different perspectives on of each network design • Define DAN, LAN, MAN, and WAN and describe their general characteristics

You should now be able to … (3)

• Describe how STDM, FDM, and statistical multiplexing enable resource sharing and cite advantages and disadvantages of STDM and FDM versus statistical multiplexing • Define bandwidth and latency • Calculate bandwidth given the time needed to transmit one bit • Define the components of latency and describe factors that can increase latency • Calculate latency given information about the components

13