Вы находитесь на странице: 1из 33

SEG 3255 Communication and Networking

Winter 2008 course notes

A. Williams

What is a Network?
A set of processing nodes connected by communication links. Many topologies possible:





Many types of communication media: twisted (copper) pair coaxial (copper) cable radio infrared fiber optic cable satellites

Types of Communication Links


Shared / broadcast

Circuit Switching
All resources (e.g. communication links) needed by a call are dedicated to that call for its duration. Example: a voice telephone call A B C D F E

Call from A to F blocks calling from B to E. Resource reservation: resources are always available when needed by a call, providing a guaranteed quality of service.

Packet Switching
Data entering network is divided into small chunks called packets. Packets traversing the network share network resources with other packets. 1 F A 1 E 2 1 2 2

1 2

Demand for resources may exceed resources available: Contention: two packets arrive simultaneously at D destined for E or F Queuing (waiting) for resources. Statistical sharing of resources.

Why resource sharing?

To save/make money! Example: 1 Mbit/sec link; each user requires 100 Kbits/sec when transmitting; each user has data to send only 10% of the time. Circuit switching: give each caller 100 Kbits/sec capacity. 10 callers can be supported. Packet switching: with 35 calls in progress, the probability that 10 or more callers are simultaneously active is less than 0.0004. Many more callers can be supported with only a small probability of contention. If users are bursty, then packet switching is advantageous.

Elements of a Network
Three networks forming an internetwork C D B A
internal view of C Communication links Buffers: to hold packets when contention for communications link. Network: set of nodes (hosts, routers, gateways) within a single administrative domain (e.g. university department, company).

Elements of a network (2)


Internetwork: a collection of interconnected networks Active network elements: hardware running protocols: Host: hardware running applications which use network (e.g. A). Router: hardware (often without application level functions) routing packets from input line to output line (e.g. C). Gateway: a router connected directly to two or more networks (e.g. B and D).

Rules by which active network elements communicate with each other is a protocol Protocols define the formats and timing of messages exchanged, and actions taken on receipt of messages for peer entities Protocols in everyday life: Rules by which two or more people communicate to provide a service, or to get something done Example: traffic lights guiding traffic flow Example: military precedence for entering a vehicle

Layered Architecture
Architecture of a complex system can be simplified by layering. Layer N relies on services of layer N 1 to provide a service to layer N+1 Service required from lower layer is independent of how that service is implemented Interfaces define how services are requested Benefits: Information/complexity hiding Layer N change doesnt affect other layers

1 2 3 4 interface


Layering and Protocols

The network consists of geographically distributed hardware and software components A distributed, layered view:

7 6 5 4 3 2 1

7 6 5 4 3 2 1

7 6 5 4 3 2 1

Principal challenge: how to provide services when: resources and information needed are distributed communication via unreliable medium

Layering and Protocols

Peer entities (processes) in layer N provide service by communicating (via messages) with each other using the communication service provided by layer N 1 logical versus physical communication:

7 6 5 4 3 2 1

7 6 5 4 3 2 1

Logical communication: Layer 4 to Layer 4

3 2 1

Actual communication path

Generic Layer Issues (1)

Error control: making a channel more reliable, and handling lost or out of sequence messages. Flow control: avoid flooding a slower peer entity. Resource allocation: mediating contention for physical (e.g. buffers) or logical (e.g. data structures) resources Fragmentation: dividing chunks of data into smaller pieces, and subsequent reassembly Multiplexing: combining several higher layer sessions


Generic Layer Issues (2)

Connection setup: initiating logical communication with peer entity Addressing / naming: managing identifiers Compression: reducing data rate Encryption: provide data security Timer management: bookkeeping and error recovery


OSI Reference Model

OSI (Open Systems Interconnect) reference model adopted in 1984 Model consists of a 7 layer stack:

Application Presentation Session Transport Network Data Link Physical


Functions of the OSI Layers

Physical The bits that are transmitted over the communication media. Deals with network hardware, bit encoding. Examples: copper, fibre, radio, satellite. Data Link Activates, maintains, and deactivates the physical link between two adjacent nodes. Deals with framing, windowing, flow control, error detection and recovery.

Functions of OSI Layers (2)

Network Determines how best to route packets of data from source to destination via intermediate network nodes. Deals with addressing, routing, fragmentation, and congestion. Transport Ensures that data is transmitted reliably between source and destination. Deals with end to end integrity and quality of service.

Functions of OSI Layers (3)

Session (often omitted) Controls the dialogue between two host applications. Provides check points and error recovery. Reports exceptions to upper layers. Presentation (often done by application) Resolves data representation differences. Performs data compression and encryption. Application Perform functions to implement network applications. Examples: e-mail, teleconferencing.


Data Transmission in the OSI model

Send side layer N takes a protocol data unit (PDU) from layer N + 1, adds its own fields to form a new PDU, and passes it to layer N 1 Receive side layer N takes the PDU from layer N 1, strips the layer N fields, and passes it to layer N + 1

A S A T S A N T S A L1 N T S A L2

Application Presentation Session Transport Network Data Link Physical


T: transport header: e.g. sequence numbers, error correction bits, time stamp info N: network header: e.g. source and destination addresses L: link header: e.g. error detection bits, acknowledgment field

The Internet Reference Model

De facto model that was defined after ARPANET was up and running.
OSI Application Presentation Session Transport Network Data Link Physical TCP/IP

Application Transport Internet Data Link Physical


Disadvantages of layering
Layering has many conceptual advantages, but fanatical adherence to layering is problematic. Layer N may duplicate lower layer functionality: Example: error recovery on both a hop by hop and end to end basis. Different layers may need the same information. Example: time stamps Layer N may need to know non-adjacent layer information. Example: choosing packets to drop if congested OSI session layer has not proven to be particularly useful.


Standards Bodies
Formal accredited standards bodies produce national and international standards. National standards bodies Industry Canada National Research Council (Canada) (NRC-CNRC) Canadian Standards Association (CSA) American National Standards Institute (ANSI) US National Institute of Standards and Technology (NIST) International standards bodies International Organization for Standardization (ISO) International Telecommunications Union (ITU) Non-governmental organizations

Standards Bodies
ISO (www.iso.ch) Non-treaty agency of the United Nations. Collaborates standards development for information technology. ITU (www.itu.int) ITU-T: telecom sector of ITU UN treaty agency that sets telecommunications standards. ANSI (www.ansi.org) The US national standards body. Coordinates and accredits standards development across the US. IEEE (www.ieee.org) US based international professional organization. Develops standards and submits to ANSI for approval.


Standards Bodies
Telcordia (www.telcordia.com) Coordinates and develops standards for US telephone service ETSI (www.etsi.org) European Telecomunication Standards Institute Similar to Telcordia, but for Europe IAB / IETF / IRTF Internet Architecture Board (www.iab.org) Internet Engineering Task Force (www.ietf.org) Internet Research Task Force (www.irtf.org) Object Management Group (OMG) (www.omg.org) Consists of many companies Develops/co-ordinates CORBA/IDL, UML standards WWW consortium (www.w3.org) Develops/co-ordinates standards such as HTTP, HTML, XML,

Protocol Description Techniques

In order to ensure that protocol implementations are interoperable, there should be an unambiguous definition for a protocol. The protocol operation is typically described using one or more of the following techniques: State diagram State transition table Standardized communications formal description technique (FDT) Specification and Description Language (SDL) Message sequence charts (MSCs) Unified Modelling Language (UML) OSI Service primitives

Message Sequence Charts (MSCs)

An exchange of messages over time is illustrated in order to describe an aspect of the protocol operation (a scenario). Since there are typically an infinite set of allowable message sequences, a set of MSCs cannot completely describe a protocol. MSC format has been standardized by ITU-T (standard Z.120, revised 2000)
Phone time lift receiver dial tone hang up dial tone off


OSI Service Primitives

Four classes defined in the OSI model: Request: An entity wants the service to do some work Indication: An entity is informed about an event Response: An entity wants to respond to an event Confirm: An entity receives confirmation of a previous request

Layer N+1 1 request 4 confirm Layer N peer protocol 2 indication

Layer N+1 3 response Layer N


OSI Service Primitives (2)

A set of service primitives that could describe a simple connection-based protocol:

CONNECT.request CONNECT.indication CONNECT.response CONNECT.confirm

Request a connection to be established Signal the called party of an incoming request Used by the called party to accept or reject a call Tells the caller whether the call was accepted.

DATA.request DATA.indication

Request that data be sent Signal the arrival of data


Request that the connection be released

DISCONNECT.indication Signal that the connection has been released


The Internet
Grew out of the US defense department Advanced Projects Research Agency network (ARPANET) As other networks were connected to the ARPANET, notably the National Science Foundation network (NSFNET), the resulting internetwork has become known as the Internet Foundation is the TCP/IP (1983) protocols for communication


The Internet
What does it mean to be on the Internet? machine runs TCP/IP protocol stack machine has IP address machine can send IP packets to other internet hosts (connected to IP router) Four classic (1980s) Internet applications: electronic mail Usenet news remote login file transfer

TCP/IP layers (2)

Internet Layer: Official packet format and protocol: Internet Protocol (IP). Layer function is to deliver IP packets to their destination.

IP Version 4 in use, version 6 is being phased in (slowly)


TCP/IP layers (2)

Transport Layer: Designed to allow source to destination conversation. Transmission Control Protocol (TCP) provides a reliable, connection-oriented service User Datagram Protocol (UDP) is an unreliable, connectionless protocol, used where prompt delivery is the chief concern


TCP/IP layers (3)

Application Layer: file transfer (FTP) e-mail (SMTP) virtual terminal (TELNET) news (NNTP) World Wide Web (HTTP)