CN

Published on August 2017 | Categories: Documents | Downloads: 38 | Comments: 0 | Views: 567
of 165
Download PDF   Embed   Report

Comments

Content

LECTURE NOTES ON

CS1302 – COMPUTER NETWORKS

MR.Sundara Vadivazhagan, M.E ASST. PROFESSOR / HOD DEPT OF INFORMATION TECHNOLOGY NPRCET

CS1302 – COMPUTER NETWORKS SYLLABUS UNIT I DATA COMMUNICATIONS 8 Components − Direction of data flow − Networks − Components and categories − Types of connections − Topologies − Protocols and standards − ISO/OSI model − Transmission media − Coaxial cable − Fiber optics − Line coding − Modems − RS232 Interfacing sequences. UNIT II DATA LINK LAYER 10 Error detection and correction − Parity − LRC − CRC − Hamming code − Flow control and error control − Stop and wait − Go back − N ARQ − Selective repeat ARQ - Sliding window − HDLC − LAN − Ethernet IEEE 802.3 − IEEE 802.4 − IEEE 802.5 − IEEE 802.11 − FDDI − SONET − Bridges. UNIT III NETWORK LAYER 10 Internetworks − Packet switching and datagram approach − IP addressing methods − Subnetting − Routing − Distance vector routing − Link state routing − Routers. UNIT IV TRANSPORT LAYER

9

Duties of transport layer − Multiplexing − Demultiplexing − Sockets − User Datagram Protocol (UDP) − Transmission Control Protocol (TCP) − Congestion Control − Quality of Services (QOS) − Integrated services. UNIT V APPLICATION LAYER 8 Domain Name Space (DNS) − SMTP − FTP − HTTP − WWW − Security − cryptography. Total: 45 TEXT BOOKS 1. Behrouz A. Forouzan, ―Data communication and Networking‖, Tata McGraw Hill, 2004. 2. James F. Kurose and Keith W. Ross, ―Computer Networking: A Top - Down Approach Featuring the Internet‖, Pearson Education, 2003. REFERENCES 1. Larry L. Peterson and Peter S. Davie, ―Computer Networks‖, 2nd Edition, Harcourt Asia Pvt. Ltd.,1996. 2. Andrew S. Tanenbaum, ―Computer Networks‖, 4th Edition, Prentice Hall of India, 2003. 3. William Stallings, ―Data and Computer Communication‖, 6th Edition, Pearson Education, 2000. 4. Peterson, ―Computer Networks: A System Approach‖,4th Edition, Elsevier India Private Limited, 2007.

UNIT -I Data Communications  Data – Information presented in whatever form is agreed upon by the parties creating and using the data  Data Communications – exchange of data between two devices via some form of transmission medium such as a wire cable Effectiveness of Data Communications



Effectiveness of a data communications system depends on three fundamental characteristics  Delivery: The system must deliver data to the correct destination. Data must be received by the

intended device or user and only by that device or user  Accuracy: The system must deliver the data accurately. Data that have been altered in transmission and

left uncorrected are unusable  Timeliness: The system must deliver data in a timely manner. Data delivered late are useless.

Delivering the data in the same order that they are produced and without significant delay (real time transmission) Data Representation (1) Information Today comes in different forms such as text, numbers, images, audio and video.



Text: Represented as a bit pattern, a sequence of bits 0s or 1s. Different codes are used

 ASCII (7 bits per symbol)  Extended ASCII (8 bits per symbol)  Unicode (16 bits – supports different languages)  ISO (32 bits)

Data Representation (2)



Numbers  Converted to a binary number – to simplify the mathematical operations



Images  Represented by bit patterns  Each pixel is assigned a bit pattern  Black and White Image – 1 bit per pixel  Gray scale images – depends on number of levels in gray scale  Color images: Each pixel has 3 bit patterns (RGB)



Audio / Video  Converted in to Analog/Digital



Networks  Set of devices (nodes) connected by media  Distributed processing

 Advantages

Applications (1)



End systems (hosts):  Run application programs  E.g. Web, email  At ―edge of network‖



Client/server model  Client host requests, receives service from always-on server  E.g. Web browser/server; email client/server



Client/server model is applicable in an intranet.

Applications (2)



Peer-Peer model:  No fixed clients or servers  Each host can act as both client & server



Examples: Napster, Gnutella, KaZaA

Applications (3)  WWW  Instant Messaging (Internet chat, text messaging on cellular phones)  Peer-to-Peer  Internet Phone  Video-on-demand  Distributed Games  Remote Login (Telnet)  File Transfer

Network Criteria  Performance – can be measured by transit time and response time. Affected by number of users, type of

medium, connected HW/SW  Reliability – measured by frequency of failure, recovery time, robustness in a catastrophe  Security – protection from unauthorized access, viruses / worms

Type of Connections Topology  Physical or logical arrangement  Topology of a network is the geometric representation of the relationship of all the links and linking

devices to one another  4 basic types: mesh, star, bus, ring  May often see hybrid

Mesh Topology



Dedicated point-to-point links to every other device



n (n-1)/2 links an each device will have n-1 I/O ports



Advantages





Dedicated links – no traffic problems



Robust



Privacy/Security



Easy fault identification and isolation

Disadvantages 

More amount of cabling and I/O ports requirement



Installation and reconnection is difficult



Expensive

Star Topology



Dedicated point-to-point links to central controller (hub)



Controller acts as exchange



Advantages  Less expensive  Robustness



Disadvantages  More cabling requirement than ring and bus topologies

Bus Topology

   

Multipoint configuration One cable acts as a backbone to link all devices Advantages: Ease of installation, less cabling Disadvantages: Difficult reconnection and fault isolation, a fault/break in the bus cable stops all transmission

Ring Topology

    

Dedicated point-to-point configuration to neighbors Signal is passed from device to device until it reaches destination Each device functions as a repeater Advantages: easy to install and reconfigure Disadvantages: limited ring length and no: of devices; break in a ring can disable entire network

Categories of Networks



Based on size, ownership, distance covered, and physical architecture



Local Area Network (LAN) – smaller geographical area



Metropolitan Area Network (MAN) – network extended over an entire city



Wide Area Network (WAN) – large geographical area

Metropolitan Area Network (MAN) Cable Network Architecture: Overview Protocols and Standards



Protocols



Set of rules that governs data communications



Defines what is communicated, how it is communicated, and when it is communicated



Key elements



Syntax: Structure/ format of data –order in which it is presented



Semantics: meaning of each section of bits- how pattern to be interpreted – What action to be taken



Timing: When data to be sent and how fast they can be sent

Protocols and Standards



Standards



Essential in creating and maintaining an open and competitive market for equipment manufacturers and in guaranteeing national and international interoperability of data and telecommunications technology and processes



De facto: Standards that have not been approved by an organized body but have been adopted as standards through widespread use



De jure: legislated by an officially recognized body

Protocols and Standards



Standards Organizations



International organization for Standardization (ISO)



International Telecommunication Union –Telecommunication Standards Sector (ITU-T)



American National Standards Institute (ANSI)



Institute of Electrical and Electronics Engineers (IEEE)



Electronic Industries Association (EIA)

Protocols and Standards



Regulatory Agencies



Federal Communication Commission (FCC)



Internet Standards



Internet Draft



Request for Comment (RFC)

THE OSI REFERENCE MODEL Open Systems Interconnection (OSI) International Organization for Standardization (ISO) OVERVIEW  The need for standards  Osi - organisation for standardisation  The osi reference model  A layered network model  The seven osi reference model layers  Summary  TCP/IP and osi similarities  TCP/IP and osi differences

The need for standards  Over the past couple of decades many of the networks that were built used different hardware and

software implementations, as a result they were incompatible and it became difficult for networks using different specifications to communicate with each other.  To address the problem of networks being incompatible and unable to communicate with each other,

the International Organisation for Standardisation (ISO) researched various network schemes.  The ISO recognised there was a need to create a NETWORK MODEL that would help vendors create

interoperable network implementations. Iso - organization for standardization  The International Organisation for Standardisation (ISO) is an International standards organisation

responsible for a wide range of standards, including many that are relevant to networking.  In 1984 in order to aid network interconnection without necessarily requiring complete redesign, the

Open Systems Interconnection (OSI) reference model was approved as an international standard for communications architecture. The osi reference model  The model was developed by the International Organisation for Standardisation (ISO) in 1984. It is now

considered the primary Architectural model for inter-computer communications.  The Open Systems Interconnection (OSI) reference model is a descriptive network scheme. It ensures

greater compatibility and interoperability between various types of network technologies.

 The OSI model describes how information or data makes its way from application programmes (such as

spread sheets) through a network medium (such as wire) to another application programme located on another network.  The OSI reference model divides the problem of moving information between computers over a

network medium into SEVEN smaller and more manageable problems.  This separation into smaller more manageable functions is known as layering.

A layered network model  The OSI Reference Model is composed of seven layers, each specifying particular network functions.  The process of breaking up the functions or tasks of networking into layers reduces complexity.  Each layer provides a service to the layer above it in the protocol specification. 

Each layer communicates with the same layer‘s software or hardware on other computers.

 The lower 4 layers (transport, network, data link and physical —Layers 4, 3, 2, and 1) are concerned

with the flow of data from end to end through the network.  The upper four layers of the OSI model (application, presentation and session—Layers 7, 6 and 5) are

orientated more toward services to the applications.  Data is encapsulated with the necessary protocol information as it moves down the layers before

network transit. The seven osi reference model layers

Layer 7: application  The application layer is the OSI layer that is closest to the user.  It provides network services to the user‘s applications.  It differs from the other layers in that it does not provide services to any other OSI layer, but rather,

only to applications outside the OSI model.  Examples of such applications are spreadsheet programs, word processing programs, and bank terminal

programs.  The application layer establishes the availability of intended communication partners synchronizes and

establishes agreement on procedures for error recovery and control of data integrity. Layer 6: presentation  The presentation layer ensures that the information that the application layer of one system sends out is

readable by the application layer of another system. 

If necessary, the presentation layer translates between multiple data formats by using a common format.

 Provides encryption and compression of data.  Examples: - JPEG, MPEG, ASCII, EBCDIC, HTML.

Layer 5: session  The session layer defines how to start, control and end conversations (called sessions) between

applications.  This includes the control and management of multiple bi-directional messages using dialogue control.  It also synchronizes dialogue between two hosts' presentation layers and manages their data exchange.  The session layer offers provisions for efficient data transfer.  Examples: - SQL, ASP (AppleTalk Session Protocol).

Layer 4: transport  The transport layer regulates information flow to ensure end-to-end connectivity between host

applications reliably and accurately.  The transport layer segments data from the sending host's system and reassembles the data into a data

stream on the receiving host's system.  The boundary between the transport layer and the session layer can be thought of as the boundary

between application protocols and data-flow protocols. Whereas the application, presentation, and session layers are concerned with application issues, the lower four layers are concerned with data transport issues.  Layer 4 protocols include TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

Layer 3: network  Defines end-to-end delivery of packets.  Defines logical addressing so that any endpoint can be identified.  Defines how routing works and how routes are learned so that the packets can be delivered.  The network layer also defines how to fragment a packet into smaller packets to accommodate different

media.  Routers operate at Layer 3.  Examples: - IP, IPX, AppleTalk.

Layer 2: data link  The data link layer provides access to the networking media and physical transmission across the media

and this enables the data to locate its intended destination on a network.  The data link layer provides reliable transit of data across a physical link by using the Media Access

Control (MAC) addresses.  The data link layer uses the MAC address to define a hardware or data link address in order for multiple

stations to share the same medium and still uniquely identify each other.

 Concerned with network topology, network access, error notification, ordered delivery of frames, and

flow control.  Examples: - Ethernet, Frame Relay, FDDI.

Layer 1: physical  The physical layer deals with the physical characteristics of the transmission medium.  It defines the electrical, mechanical, procedural, and functional specifications for activating,

maintaining, and deactivating the physical link between end systems.  Such characteristics as voltage levels, timing of voltage changes, physical data rates, maximum

transmission distances, physical connectors, and other similar attributes are defined by physical layer specifications.  Examples: - EIA/TIA-232, RJ45, NRZ.

Summary  There was no standard for networks in the early days and as a result it was difficult for networks to

communicate with each other.  The International Organisation for Standardisation (ISO) recognised this. And researched various

network schemes, and in 1984 introduced the Open Systems Interconnection (OSI) reference model.  The OSI reference model has standards which ensure vendors greater compatibility and interoperability

between various types of network technologies.  The OSI reference model organizes network functions into seven numbered layers.  Each layer provides a service to the layer above it in the protocol specification and communicates with

the same layer‘s software or hardware on other computers.  Layers 1-4 are concerned with the flow of data from end to end through the network and Layers 5-7 are

concerned with services to the applications. TCP/IP and OSI Similarities  Both have Layers  Both have Application Layers  Have Comparable Transport and Network Layers  Packet switching (not-circuit switched) technology is used  You need to understand both of them.

TCP/IP and OSI Differences  TCP/IP combines the Presentation and Application Layers  TCP/IP combines the OSI Data Link and Physical Layers into 1 Layer  TCP/IP appears simpler with fewer layers.  TCP/IP Protocols are standards for the Internet  No Networks are really built around OSI…it serves as a guide.

Summary  Network model / TCP/IP model

 OSI model

Comparison and Contrast between the OSI and TCP/IP Model Introduction  This presentation would discuss some comparison and contrast between the 2 main reference models which use the concept of protocol layering.  Open System Interconnection Model (OSI)  Transport Control Protocol /Internet Protocol (TCP/IP)  The topics that will be discussing would be based on the diagram below.

Outline  Compare the protocol layers that correspond to each other.  General Comparison 

Focus of Reliability Control



Roles of Host system



OSI vs. TCP/IP-Summary

The Upper Layers

 Session  Presentation  Application The Session Layer

 The Session layer permits two parties to hold ongoing communications called a session across a network.  Not found in TCP/IP model  In TCP/IP, its characteristics are provided by the TCP protocol.(Transport Layer) The Presentation Layer The Presentation Layer handles data format information for networked communications. This is done by converting data into a generic format that could be understood by both sides.  Not found in TCP/IP model  In TCP/IP, this function is provided by the Application Layer. E.g. External Data Representation Standard (XDR) Multipurpose Internet Mail Extensions (MIME) The Application Layer The Application Layer is the top layer of the reference model. It provides a set of interfaces for applications to obtain access to networked services as well as access to the kinds of network services that support applications directly.  OSI- FTAM, VT, MHS, DS, CMIP TCP/IP- FTP, SMTP, TELNET, DNS, SNMP  Although the notion of an application process is common to both their approaches to constructing application entities are different. Approaches use in constructing application entities  The diagram below provides an overall view on the methods use by both the OSI and TCP/IP model.

ISO Approach  Sometimes called Horizontal Approach  OSI asserts that distributed applications operate over a strict hierarchy of layers and are constructed from a common tool kit of standardized application service elements.  In OSI, each distributed application service selects functions from a large common ―toolbox‖ of application service element (ASEs) and complements these with application service elements that perform functions specific to given end-user service. TCP/IP Approach  Sometime called Vertical Approach  In TCP/IP, each application entity is composed of whatever set of function it needs beyond end to end transport to support a distributed communications service.  Most of these application processes builds on what it needs and assumes only that an underlying transport mechanism (datagram or connection) will be provided. Transport Layer

 The functionality of the transport layer is to provide ―transparent transfer of data from a source end open system to a destination end open system‖ (ISO / IEC 7498: 1984).

 Transport is responsible for creating and maintaining the basic end-to-end connection between communicating open systems, ensuring that the bits delivered to the receiver are the same as the bits transmitted by the sender; in the same order and without modification, loss or duplication OSI Transport Layer  It takes the information to be sent and breaks it into individual packets that are sent and reassembled into a complete message by the Transport Layer at the receiving node

 Also provide a signaling service for the remote node so that the sending node is notified when its data is received successfully by the receiving node  Transport Layer protocols include the capability to acknowledge the receipt of a packet; if no acknowledgement is received, the Transport Layer protocol can retransmit the packet or time-out the connection and signal an error  Transport protocols can also mark packets with sequencing information so that the destination system can properly order the packets if they‘re received out-of-sequence  In addition, Transport protocols provide facilities for insuring the integrity of packets.  Transport protocols provide the capability for multiple application processes to access the network by using individual local addresses to determine the destination process for each data stream TCP/IP Transport Layer  Defines two standard transport protocols: TCP and UDP  TCP implements a reliable data-stream protocol o Connection oriented  UDP implements an unreliable data-stream o Connectionless  TCP provides reliable data transmission  UDP is useful in many applications o e.g. Where data needs to be broadcasted or multicasted  Primary difference is that UDP does not necessarily provide reliable data transmission  Many programs will use a separate TCP connection as well as a UDP connection

 TCP is responsible for data recovery o By providing a sequence number with each packet that it sends o TCP requires ACK (acknowledgement) to ensure correct data is received  Packet can be retransmitted if error detected  Use of ACK

 Flow control with Window o Via specifying an acceptable range of sequence numbers

 TCP and UDP introduce the concept of ports  Common ports and the services that run on them:



FTP



telnet 23



SMTP 25



http



POP3 110

21 and 20

80

 By specifying ports and including port numbers with TCP/UDP data, multiplexing is achieved  Multiplexing allows multiple network connections to take place simultaneously  The port numbers, along with the source and destination addresses for the data, determine a socket

Comparing Transport for both Models  The features of UDP and TCP defined at TCP/IP Transport Layer correspond to many of the requirements of the OSI Transport Layer.  There is a bit of bleed over for requirements in the session layer of OSI since sequence numbers, and port values can help to allow the Operating System to keep track of sessions, but most of the TCP and UDP functions and specifications map to the OSI Transport Layer.  The TCP/IP and OSI architecture models both employ all connection and connectionless models at transport layer.  However, the internet architecture refers to the two models in TCP/IP as simply ―connections‖ and datagrams.  But the OSI reference model, with its penchant for ―precise‖ terminology, uses the terms connection-mode and connection-oriented for the connection model and the term connectionless-mode for the connectionless model. Network vs. Internet

 Like all the other OSI Layers, the network layer provides both connectionless and connection-oriented services. As for the TCP/IP architecture, the internet layer is exclusively connectionless.  X.25 Packet Level Protocol – OSI‘s Connection-oriented Network Protocol

o The CCITT standard for X.25 defines the DTE/DCE interface standard to provide access to a packet-switched network. It is the network level interface, which specifies a virtual circuit (VC) service. A source host must establish a connection (a VC) with the destination host before data transfer can take place. The network attempts to deliver packets flowing over a VC in sequence.  Connectionless Network Service o Both OSI and TCP/IP support a connectionless network service: OSI as an alternative to network connections and TCP/IP as the only way in use  Internetworking Protocols o OSI‘s CLNP (ISO/IEC 8473: 1993) is functionally identical to the Internet‘s IP (RPC 791). Both CLNP and IP are best-effort-delivery network protocols. Bit niggling aside, they are virtually identical. The major difference between the two is that CLNP accommodates variable-length addresses, whereas IP supports fixed, 32-bit address.  Internet (IP) Addresses o The internet network address is more commonly called the ―IP address.‖ It consists of 32 bits, some of which are allocated to a high-order network-number part and the remainder of which are allocated to a low-order host-number part. o The distribution of bits - how many form the network number, and how many are therefore left for the host number - can be done in one of three different ways, giving three different classes of IP address  OSI Network Layer Addressing o ISO/IEC and CCITT jointly administer the global network addressing domain. The initial hierarchical decomposition of the address is defined by (ISO/IEC 8348). o The standard specifies the syntax and the allowable values for the high-order part of the address the Initial Domain Part (IDP), which consists of the Authority and Format Identifier (AFI) and the Initial Domain Identifier (IDI) - but specifically eschews constraints on or recommendations concerning the syntax or semantics of the domain specific part (DSP).  OSI Routing Architecture o End systems (ESs) and intermediate systems (ISs) use routing protocols to distribute (―advertise‖) some or all of the information stored in their locally maintained routing information base.

o ESs and ISs send and receive these routing updates and use the information that they contain (and information that may be available from the local environment, such as information entered manually by an operator) to modify their routing information base.  TCP/IP Routing Architecture o The TCP/IP routing architecture looks very much like the OSI routing architecture. o Hosts use a discovery protocol to obtain the identification of gateways and other hosts attached to the same network (sub network). o Gateways within autonomous systems (routing domains) operate an interior gateway protocol (intradomain IS-IS routing protocol), and between autonomous systems, they operate exterior or border gateway protocols (interdomain routing protocols). The details are different but the principles are the same. Data link / Physical vs. Subnet

 Data link layer o The function of the Data Link Layer is ―provides for the control of the physical layer, and detects and possibly corrects errors which may occur‖ (IOS/IEC 7498:1984). In another words, the Data Link Layer transforms a stream of raw bits (0s and 1s) from the physical into a data frame and provides an error-free transfer from one node to another, allowing the layers above it to assume virtually error-free transmission  Physical layer o The function of the Physical Layer is to provide ―mechanical, electrical, functional, and procedural means to activate a physical connection for bit transmission‖ (ISO/IEC 7498:1984). Basically, this means that the typical role of the physical layer is to transform bits in a computer system into electromagnetic (or equivalent) signals for a particular transmission medium (wire, fiber, etc.)  Comparing to TCP/IP o These 2 layers of the OSI correspond directly to the subnet layer of the TCP/IP model. o Majority of the time, the lower layers below the Interface or Network layer of the TCP/IP model are seldom or rarely discussed. The TCP/IP model does nothing but to highlight the fact the host has to

connect to the network using some protocol so it can send IP packets over it. Because the protocol used is not defined, it will vary from host to host and network to network o After much deliberation by organizations, it was decided that the Network Interface Layer in the TCP/IP model corresponds to a combination of the OSI Data Link Layer and network specific functions of the OSI network layer (e.g. IEEE 203.3). o Since these two layers deal with functions that are so inherently specific to each individual networking technology, the layering principle of grouping them together related functions is largely irrelevant. General Comparison  Focus of Reliability Control  Roles of Host System  De-jure vs. De-facto Focus of Reliability Control  Implementation of the OSI model places emphasis on providing a reliable data transfer service, while the TCP/IP model treats reliability as an end-to-end problem.  Each layer of the OSI model detects and handles errors, all data transmitted includes checksums. The transport layer of the OSI model checks source-to-destination reliability.  In the TCP/IP model, reliability control is concentrated at the transport layer. The transport layer handles all error detection and recovery. The TCP/IP transport layer uses checksums, acknowledgments, and timeouts to control transmissions and provides end-to-end verification. Roles of Host System  Hosts on OSI implementations do not handle network operations (simple terminal), but TCP/IP hosts participate in most network protocols. TCP/IP hosts carry out such functions as end-to-end verification, routing, and network control. The TCP/IP internet can be viewed as a data stream delivery system involving intelligent hosts. OSI  Standard legislated by official recognized body. (ISO)  The OSI reference model was devised before the protocols were invented. This ordering means that the model was not biased toward one particular set of protocols, which made it quite general. The down side of this ordering is that the designers did not have much experience with the subject and did not have a good idea of which functionality to put in which layer.  Being general, the protocols in the OSI model are better hidden than in the TCP/IP model and can be replaced relatively easily as the technology changes.

 Not so widespread as compared with TCP/IP. (Complex, costly) o More commonly used as teaching aids. TCP/IP  Standards adopted due to widespread use. (Internet)  The protocols came first, and the model was really just a description of the existing protocols. There was no problem with the protocols fitting the model, but it is hardly possible to be used to describe other models.  ―Get the job done" orientation.  Over the years it has handled most challenges by growing to meet the needs.  More popular standard for internetworking for several reasons: o Relatively simple and robust compared to alternatives such as OSI o Available on virtually every hardware and operating system platform (often free) the protocol suite on which the Internet depends. Network Models Layered Tasks  Sender, Receiver, and Carrier  Hierarchy  Services

Figure 2.1 sending a letter

Internet Model  Peer-to-Peer Processes  Functions of Layers  Summary of Layers Figure 2.2 Internet layers

Figure 2.3

Peer-to-peer processes

Figure 2.4 an exchange using the Internet model

Figure 2.5 Physical layer

Note: The physical layer is responsible for transmitting individual bits from one node to the next.

Physical Layer Responsibilities  Physical characteristics of interfaces and media  Representation of bits without interpretation  Data rate: number of bits per second  Synchronization of bits

Figure 2.6 Data link layer

Note: The

data

link

layer

is

one node to the next. Data Link Layer Responsibilities  Defines frames into manageable data units  Physical addressing  Flow control  Error control  Access control

Figure 2.7 Node-to-node delivery

Figure 2.8

Example 1

responsible

for

transmitting

frames

from

Figure 2.9

Network layer

Note: The network layer is responsible for the delivery of packets from the original source to the final destination. Network Layer Responsibilities  Source-to-destination delivery, possibly across multiple networks  Logical addressing  Routing

Figure 2.10 Source-to-destination delivery

Figure 2.11

Example 2

Figure 2.12

Transport layer

Note: The transport layer is responsible for delivery of a message from one process to another. Transport Layer Responsibilities  Process-to-process delivery of entire message  Port addressing  Segmentation and reassembly  Connection control: connectionless or connection-oriented  End-to-end flow control  End-to-end error control Figure 2.12

Reliable process-to-process delivery of a message

Figure 2.14

Example 3

Figure 2.15

Application layer

Note: The application layer is responsible for providing services to the user.

Application Layer Responsibilities  Enables user access to the network

 User interfaces and support for services such as o E-Mail o File transfer and access o Remote log-in o WWW Figure 2.16

Summary of duties

Transmission Media Relation to Internet Model

 Actually located below the physical layer  Directly controlled by the physical layer Introduction

 Data must be converted into electromagnetic signals to be transmitted from device to device  Signals can travel through a vacuum, air, or other media  May be in the form of power, voice, radio waves, infrared light, and gamma rays  Each of these forms constitutes a portion of the electromagnetic spectrum

Categories of Media

 Broad categories:



Guided Media – media with a physical boundary

 Twisted pair, coaxial, and fiber-optic



Unguided Media – no physical boundaries

 Radio waves, infrared light, visible light and gamma rays  Sent by microwave, satellite, and cellular transmission Classes of Transmission Media

Guided Media

 Provides a conduit from one device to another  Signal is directed and contained by physical limits of medium  Twisted-pair and coaxial use copper conductors to accept and transport signals in form of electrical current  Optical fiber is glass cable that accepts and transports signals in form of light Twisted-Pair Cable

 Two conductors surrounded by insulating material  One wire used to carry signals; other used as a ground reference  Twisting wires reduces the effect of noise interference or crosstalk since both wires will likely be equally affected

 More twists = better quality  Limits inferences  No. of twists / unit length determines the quality of the cable

Unshielded Twisted Pair (UTP)

 Most common type; suitable for both voice and data transmission  Categories are determined by cable quality  Cat 3 commonly used for telephone systems (up to 10 Mbps - 10 Base T)  Cat 5 usually used for data networks (up to 100 Mbps – 100 Base T)  Performance is measured by attenuation versus frequency and distance  Adv.: cheaper, flexible, easy to install  UTP connectors - RJ45 Categories of UTP cables

UTP example

Shielded Twisted Pair (STP)

 A metal foil or braided-mesh covering encases each pair of insulated conductors to prevent electromagnetic noise called crosstalk

 Crosstalk occurs when one line picks up some of the signals traveling over another line  Uses RJ-45 connectors  More expensive but less susceptible to noise  Supports high Bandwidth over long distances

Coaxial Cable

 

Has a central core conductor enclosed in an insulating sheath, encased in an outer conductor of metal foil RG numbers denote physical specs such as wire gauge, thickness and type of insulator, construction of shield and size/type of outer casing

 RG-8, RG-9, and RG-11 used in thick Ethernet  RG-58 used in thin Ethernet  RG-59 used for TV

Coaxial Cable Connectors

 Most common is barrel connector (BNC)  T-connectors are used to branch off to secondary cables  Terminators are required for bus topologies to prevent echoing of signals

Coaxial Applications & Performance

 Analog and digital phone networks  Cable TV networks  Traditional Ethernet LANs  Home Networks-phone line, power line.  Higher bandwidth than twisted-pair  Attenuation is higher and requires frequent use of repeaters  Single coax carries 10000 voice signals & digital data up to 600 Mbps. Fiber-Optic Cable

 Made of glass; signals are transmitted as light pulses from an LED or laser  Light is also a form of electromagnetic energy  Speed depends on density of medium it is traveling through; fastest when in a vacuum, 186,000 miles/second

Refraction and Reflection

 Refraction often occurs when light bends as it passes from one medium to another less dense medium  When this angle results in a refraction great enough, reflection occurs and the light no longer passes into the

less dense medium

Reflection

 Optical fibers use reflection to guide light through a channel  Information is encoded onto a beam of light as a series of on-off pulses representing 1s and 0s

Propagation Modes

 Method for transmitting optical signals: o Multimode 

Multimode step-index fiber



Multimode graded-index fiber

o Single Mode Multimode

 Multiple beams from light source move through core at different paths  Multimode step-index fiber o Density remains constant from center to edges o Light moves in a straight line until it reaches the cladding o Some beams penetrate the cladding and are lost, while others are reflected down the channel to the destination

 As a result, beams reach the destination at different times and the signal may not be the same as that which was transmitted

 To address this problem and to allow for more precise transmissions, multimode graded-index fiber may be used

 Index refers to the index of refraction  Graded-index refers to varying densities of the fiber; highest at center and decreases at edge

Multimode Graded-Index Fiber

 Since the core density decreases with distance from the center, the light beams refract into a curve  Eliminates problem with some of the signals penetrating the cladding and being lost  Also signals intersect at regular intervals Single Mode

 Only one beam from a light source is transmitted using a smaller range of angles  Smaller diameter and lower density  Makes propagation of beams almost horizontal; delays are negligible  All beams arrive together and can be recombined without signal distortion  Uses stepped index fiber Propagation Modes

Light Sources & Connectors

 Light source is light-emitting diode (LED) or a laser  LEDs are cheaper but not as precise (unfocused); limited to short-distance use  Lasers can have a narrow range, better control over angle  Receiving device needs a photosensitive cell (photodiode) capable of receiving the signal  Uses SC- Subscriber channel & ST-straight tip connectors Applications of Fiber Optics

 Backbone networks due to wide bandwidth and cost effectiveness  Cable TV  LANS  100Base-FX (Fast Ethernet)

 1000Base-X Advantages of Fiber Optics

 Higher bandwidth than twisted-pair and coaxial cable; not limited by medium, but by equipment used to generate and receive signals

 Noise resistance  Less signal attenuation  More resistant to corrosive materials  Lightweight  Greater security Disadvantages of Fiber Optics

 Installation/maintenance  Unidirectional  Cost 7.2 Unguided Media: Wireless

 Wireless communication; transporting electromagnetic waves without a physical conductor

Wireless Propagation Methods

 Ground – radio waves travel through lowest portion of atmosphere, hugging the Earth  Distance depends on power of signal  Sky – higher-frequency radio waves radiate upward into ionosphere and then reflect back to Earth  Line-of-sight – high-frequency signals transmitted in straight lines directly from antenna to antenna Propagation Methods

Wireless Transmission Waves

 Radio Waves

 Microwave  Infrared Radio Waves

 Frequency ranges: 3 KHz to 1 GHz  Omni directional  Susceptible to interference by other antennas using same frequency or band  Ideal for long-distance broadcasting  May penetrate walls  Propagate in SKY mode  Used for multicast communication such as radio, TV etc Bands

Microwaves

 Frequencies between 1 and 300 GHz  Unidirectional  Narrow focus requires sending and receiving antennas to be aligned  Issues:  Line-of-sight (curvature of the Earth; obstacles)  Cannot penetrate walls Parabolic Dish Antenna

 Incoming signals - Signal bounces off of dish and is directed to focus  Outgoing signals – transmission is broadcast through horn aimed at dish and are deflected outward

Horn Antenna

 Outgoing transmissions broadcast through a stem and deflected outward  Received transmissions collected by a scooped part of the horn and deflected downward into the stem

Microwave Applications

 Unicasting – one-to-one communication between sender and receiver  Cellular phones  Satellite networks  Wireless LANs Infrared

 Frequencies between 300 GHz and 400 THz  Short-range communication  High frequencies cannot penetrate walls  Requires line-of-sight propagation  Adv.: prevents interference between systems in adjacent rooms  Disadv: cannot use for long-range communication or outside a building due to sun‘s rays

Infrared Applications

 Wide bandwidth available for data transmission  Communication between keyboards, mice, PCs, and printers Media selection

 Each media has advantages and disadvantages. Some of the advantage or disadvantage comparisons concern the following:

 Cable length  Cost  Ease of installation  Susceptibility to interference Ethernet Media standard

 The cables and connector specifications used to support Ethernet implementations are derived from the Electronic Industries Association and the Telecommunications Industry Association (EIA/TIA) standards body.

 The categories of cabling defined for Ethernet are derived from the EIA/TIA-568 (SP-2840) Commercial Building Telecommunications Wiring Standards. Lab on Cable connection

Straight through Cable

 Maintain the pin connection all the way through the cable.  Wire connected to pin 1 is the same on both ends.  Used to connect such devices as PCs or routers to other devices such as hubs or switches.

Cross over cable

 Cross the critical pair to properly align, transmit, and receive signals on devices with like connections.  Pin 1 connected to pin 3, pin 2 connected to pin 6.  Used to connect similar devices: switch to switch, switch to hub, hub to hub, router to router, and PC to PC. Connectorization

Line Coding, Modem, and RS232 interfacing sequences. Line Coding 

Process of converting binary data to a digital signal

DC Components 

Residual direct-current (dc) components or zero frequencies are undesirable o Some systems do not allow passage of a dc component; may distort the signal and create output errors o DC component is extra energy and is useless

Self-Synchronization



Includes timing information in the data being transmitted to prevent misinterpretation

Line Coding 

Unipolar



Polar



Bipolar

Unipolar 

Simplest method; inexpensive



Uses only one voltage level



Polarity is usually assigned to binary 1; a 0 is represented by zero voltage



Potential problems: o DC component o Lack of synchronization

Polar 

Uses two voltage levels, one positive and one negative



Alleviates DC component



Variations o Nonreturn to zero (NRZ) o Return to zero (RZ) o Manchester o Differential Manchester

Nonreturn to Zero (NRZ) 

Value of signal is always positive or negative



NRZ-L o Signal level depends on bit represented; positive usually means 0, negative usually means 1 o Problem: synchronization of long streams of 0s or 1s



NRZ-I (NRZ-Invert) o Inversion of voltage represents a 1 bit o 0 bit represented by no change o Allows for synchronization

NRZ-L and NRZ-I Encoding

Return to Zero (RZ) 

In NRZ-I, long strings of 0s may still be a problem



May include synchronization as part of the signal for both 1s and 0s



How? o Must include a signal change during each bit o Uses three values: positive, negative, and zero o 1 bit represented by positive-to-zero o 0 bit represented by negative-to-zero

RZ Encoding



Disadvantage o Requires two signal changes to encode each bit; more bandwidth necessary

Manchester 

Uses an inversion at the middle of each bit interval for both synchronization and bit representation



Negative-to-positive represents binary 1



Positive-to-negative represents binary 0



Achieves same level of synchronization with only 2 levels of amplitude

Differential Manchester 

Inversion at middle of bit interval is used for synchronization



Presence or absence of additional transition at beginning of interval identifies the bit



Transition means binary 0; no transition means 1



Requires two signal changes to represent binary 0; only one to represent 1

Bipolar Encoding 

Uses three voltage levels: positive, negative, and zero



Zero level represents binary 0; 1s are represented with alternating positive and negative voltages, even when not consecutive



Alternate mark inversion (AMI)

Bipolar AMI 

Neutral, zero voltage represents binary 0



Binary 1s represented by alternating positive and negative voltages

Modems Telephone Modems 

A telephone line has a bandwidth of almost 2400 Hz for data transmission

Modem stands for modulator/demodulator. 

Modulator: creates an analog signal from binary data



Demodulator: recovers the binary data from the modulated signal

V.32 

ITU-T's V.32 standard was issued in 1989 for asynchronous, full-duplex operation at 9600 bps.



Although designed for asynchronous DTEs, two V.32 modems actually communicate synchronously.



A circuit converts the asynchronous data stream into synchronous blocks, invisible to the application.



V.32 supports modulation rates of 2400, 4800, and 9600 bps.

V.32bis 

ITU-T's V.32 standard was issued in 1991 for asynchronous, full-duplex operation at 14.4 Kbps. V.32bis



Is an extension of the V.32 technology? V.32bis supports modulation rates of 2400, 4800, 9600 bps and



14.4 Kbps. Data compression and error correction can increase the throughput rates.

Traditional Modems 

After modulation by the modem, an analog signal reaches the telephone company switching station where it sampled and digitized to be passed through the digital network.



Bit rate is 56,000ps.



Uploading: 33.6kbps.



Downloading 56kbps.

RS232 Interface Introduction 

Specifies the interface between DTE and DCE:

o V.28: mechanical and electrical characteristics o V.24: functional and procedural characteristics 

Even used in applications where there is no DCE o E.g. connecting computer to printer, magnetic card reader, robot, … etc.



Introduced in 1962 but is still widely used

DTE, DCE and RS232

Vocabulary 

DTE o data terminal equipment o e.g. computer, terminal



DCE o data communication equipment o connects DTE to communication lines o e.g. modem

Mechanical Characteristics 

9-pin connector o 9-pin connector is more commonly found in IBM-PC but it covers signals for asynchronous serial communication only



Use male connector on DTE and female connector on DCE



N.B.: all signal names are viewed from DTE

9-Pin RS232 Connector

Electrical Characteristics 

Single-ended o One wire per signal, voltage levels are with respect to system common (i.e. signal ground)



Mark: –3V to –15V o



Represent Logic 1, Idle State (OFF)

Space: +3 to +15V o Represent Logic 0, Active State (ON)



Usually swing between –12V to +12V



Recommended maximum cable length is 15m, at 20kbps

RS232 Logic Waveform

RS-232 Interface

RS-232 is the Serial interface on the PC Three major wires for the Serial interface: • Transmit - Pin 2 • Receive - Pin 3 • Ground - Pin 7 (25 pin connector) - Pin 5 (9 pin connector)

Function of Signals 

TD: transmitted data



RD: received data



DSR: data set ready o Indicate whether DCE is powered on



DTR: data terminal ready o Indicate whether DTR is powered on o Turning off DTR causes modem to hang up the line



RI: ring indicator o ON when modem detects phone call



DCD: data carrier detect o ON when two modems have negotiated successfully and the carrier signal is established on the phone line



RTS: request to send o ON when DTE wants to send data o Used to turn on and off modem‘s carrier signal in multi-point (i.e. multi-drop) lines o Normally constantly ON in point-to-point lines



CTS: clear to send o ON when DCE is ready to receive data



SG: signal ground

Flow Control 

Means to ask the transmitter to stop/resume sending in data



Required when: o DTE to DCE speed > DCE to DCE speed 

(e.g. terminal speed = 115.2kbps and line speed = 33.6kbps, in order to benefit from modem‘s data compression protocol)

o Without flow control, the buffer within modem will overflow – sooner or later 

The receiving end takes time to process the data and thus cannot be always ready to receive UNIT-II Error Detection &Correction

Introduction Data can be corrupted during transmission due to… Storms, accidents, sudden increase in electricity and voltage / decrease in signal power over distance For reliable communication, errors must be detected and corrected What is an Error? Whenever bits flow from one point to another, they are subject to unpredictable changes because of

interference The interference can change the shape of the signal, thus the bit value either from ―1‖ to ―0‖ or from ―0‖ to ―1‖ Two Types of Errors Single-Bit Errors: only one bit in the data unit has changed Burst Errors of length ‘n’: 2 or more bits in the data unit have changed (‗n‘ is the distance between the FIRST and LAST errors in the data block) Single-Bit Errors

Burst Errors

Error Detection Error Detection-General Sender transmits every data unit twice Receiver performs bit-by-bit comparison between that two versions of data Any mismatch would indicate an error, which needs error correction Advantage: very accurate Disadvantage: time consuming: requires [2 x Transmission Time + Comparison Time] Error Detection-Redundancy Instead of repeating the entire data stream, a shorter group of bits may be appended to the end of each unit Called as ―redundancy‖ because the extra bits are redundant to the information Redundant information will be discarded as soon as the accuracy of the information has been determined

Types of Redundancy Checks Parity Check o Simple Parity Check o Two Dimensional Parity Check / Longitudinal Redundancy Check (LRC) Cyclic Redundancy Check (CRC) Check Sum Error Detection-Simple Parity Check A redundant bit called ―Parity Bit‖ is added to every data unit Even Parity: total number of 1‘s in the data unit becomes even Odd Parity: total number of 1‘s in the data unit becomes odd

Example of Using Parity Bits

Simple Parity Check-An Example

Parity Check - Performance Can detect all single-bit errors Can also detect burst errors if the total number of bits changed is odd (1, 3, 5,) Cannot detect errors where the total number of bits changed is even Detects about 50% of errors Error Detection- 2D/LRC Adds an additional character (instead of a bit) A block of bits is organized in a table The Parity Bit for each data unit is calculated Then Parity Bit for each column is calculated Parity Bits are attached to the data unit

Error Detection- LRC

LRC - Performance Detects all burst errors up to length n (number of columns) If two bits in one data unit are damaged and two bits in exactly same positions in another data unit are also damaged, the checker will not detect an error Error Detection- CRC Powerful error detection scheme Rather than addition, binary division is used A sequence of redundant bits, called ―CRC‖ or ―CRC remainder‖ is appended to the data unit, so that the resulting data unit becomes divisible by a predetermined binary number At the receiver side, the incoming data unit is divided by the same predetermined number. If there is no remainder, the data unit is accepted If there is a remainder, the receiver indicates that the data unit has been damaged during transmission

Error Detection- CRC Generator

Error Detection- CRC Checker

Error Detection- CRC Polynomials The divisor in the CRC generator is most often represented as an algebraic Polynomial. Reasons: o It is short o It can be used to prove the concept mathematically

CRC-Performance CRC can detect all burst errors that affect an odd number of bits CRC can detect all burst errors of length less than or equal to the degree of the polynomial Error Detection- Check Sum The Check Sum generator subdivides the data unit into equal segments of ―n‖ bits (usually 16) These segments are added using one‘s complement arithmetic in such a way that the total is also ―n‖ bits long Total is complemented and appended to the end of the original data unit as redundancy bits, called the check sum field The sender follows these steps: o The data unit is divided into ―k‖ sections, each of ―n‖ bits o All sections are added using one‘s complement to get the sum o The sum is complemented and becomes the checksum. o The checksum is appended and sent with the data.

The receiver follows these steps:

o The unit is divided into ―k‖ sections, each of ―n‖ bits o All sections are added using one‘s complement to get the sum. o The sum is complemented. o If the result is zero, the data are accepted; otherwise, rejected

Check Sum-An Example

Data: 10101001 00111001 Computing Checksum: 10101001 00111001 --------------Sum 11100010 CheckSum 00011101 Data Sent : 10101001 00111001 00011101

Receiver Side: 10101001 00111001 00011101 --------------Sum 11111111 Complement 00000000 Error Correction Error Correction Techniques Retransmission Forward Error Correction Burst Error Correction Error Correction-Retransmission When an error is discovered, the receiver can ask the sender to retransmit the entire data unit Error Correction-Forward Error Correction A receiver can use an error-correcting code, which automatically corrects certain errors Single-bit errors: o Can be detected by the addition of parity bit which helps to find ―error‖ or ―no error‖ which is sufficient to detect errors o To correct errors the receiver can simply invert 0 to 1 or 1 to 0, but the problem is ―locating‖ the position of error o To do so requires enough redundancy bits o Condition: 2r >= m + r + 1 Error Correction

Error Correction-Hamming Code Hamming Code can be applied to data units of any length and uses the relationship between data and redundancy bits For example: a 7-bit ASCII code requires 4 redundancy bits that can be added to the end of the data unit or mixed with the original data bits, which are placed in positions 1, 2, 4 and 8 i.e. x0,x1,x2,x3 and so on.

In the Hamming Code, each ―r‖ bit for one combination of data bits as below: o r1:

bits 1, 3, 5, 7, 9, 11

o r2:

bits 2, 3, 6, 7, 10, 11

o r3:

bits 4, 5, 6, 7

o r4:

bits 8, 9, 10, 11

Error Correction-Burst Error Correction Instead of sending all the bits in a data unit together, we can organize ―N‖ units in a column and then send the first bit of each, followed by the second bit of each and so on In this way, if a burst error of M bits occurs (M<N), then the error does not corrupt M bits of one single unit; it corrupts only 1 bit of a unit. Burst Error Correction - Example

Data Link Control  Flow Control  Error Control Flow Control:  How much data sender can transmit before receiving the ack  Why flow control?  Limitation with receiver 1. Processing speed 2. Limited memory to store incoming data

Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for ackControl: nowledgment. Error  Error Detection + Error Correction  Otherwise o Error Detection + Retransmission  ARQ o Any time, an error is discovered in an exchange, specified frames are retransmitted

Error control in the data link layer is based on automatic repeat request, which is the retransmission of data. Flow and Error Control Mechanisms  Stop and Wait ARQ  Go-Back ARQ  Selective Repeat ARQ Stop-and-Wait Automatic Repeat request  Simplest flow and error control mechanism  The sending device keeps a copy of the last frame transmitted until it receives an acknowledgement  Frames - alternately numbered as 0 and 1  Ack for frame0 = ACK 1 and for frame1= ACK0  Out of order frames and erroneous frames are discarded and no ack is sent  Timers  Control Variables o Sender – S (no of recently sent frame) o Receiver – R (no of next frame expected) A simplex Stop and Wait ARQ  Normal Operation  Frame lost  Acknowledgement lost  Acknowledgement delayed

Why numbering frames?

In Stop-and-Wait ARQ, 1. Numbering frames prevents the retaining of duplicate frames. 2. Numbered acknowledgements are needed in case of delayed ack and next frame lost.

Drawbacks of stop and wait  Only one frame can be in transit at a time  After each frame sent the host must wait for an ACK



Inefficient use of bandwidth

 To improve efficiency, multiple frames can be sent before receiving acknowledgement  Alternatives: Sliding Window protocols - One task begins before the other one ends

(concept of pipelining)

-increases efficiency in transmission Sliding Window Protocols  Sliding window



Holds the unacknowledged outstanding frames in sender



Holds the expected frames in receiver

 Sequence numbers



Sent frames are numbered sequentially



If the number of bits in the header is m then

 Protocols



Go back – N



Selective Repeat

Go Back - N  Sender window size < 2m

sequence number goes from 0 to 2m - 1

 Receiver window size = 1  Why the names go back- N?



When the frame is damaged the sender goes back and sends a set of frames starting from the last one ACKn‘d



The number of retransmitted frames is N

Example: The window size is 4. A sender has sent frame 6 and the timer expires for frame 3 (frame 3 not ACKn‘d). The sender goes back and resends the frames 3, 4, 5 and 6.

Go-back-N: Control Variables    

S- holds the sequence number of the recently sent frame SF – holds sequence number of the first frame in the window SL – holds the sequence number of the last frame R – sequence number of the frame expected to be received

Try for (go back N)  Damaged or lost ACK Case 1: next ack arrives before timer Expires Case 2: Next ack arrives after timer expires  Delayed Ack Note:

In Go-Back-N ARQ, the size of the sender window must be m

less than 2 ; the size of the receiver window is always 1.

Drawbacks of Go-back-N  Inefficient



All out of order received packets are discarded (receiver side is simplified)

 This is a problem in a noisy link



Many frames must be retransmitted -> bandwidth consuming

 Solution



Re-send only the damaged frames

 Selective Repeat ARQ



Avoid unnecessary retransmissions

Selective Repeat ARQ  Processing at the receiver more complex  The window size is reduced to 2(m-1) (2m/2 at most)  Both the transmitter and the receiver have the same window size  Receiver expects frames within the range of the sequence numbers  Negative acknowledgement

Try for – selective repeat  Lost and delayed ACKs  Bidirectional transmission (both side requires both sending and receiving windows) Note:

In Selective Repeat ARQ, the size of the sender and receiver m

window must be at most one-half of 2 .

Bandwidth – delay product  A measure of efficiency of ARQ system = bandwidth (bits per second) * round-trip delay (in seconds)  It is the measure of number of bits we can send out of our system while waiting for news from the receiver. Example1:  System: Stop and wait ARQ  Bandwidth: 1Mbps  Round trip for one bit: 20ms  Frame length: 1000 bits Utilization percentage of the link =?

Soln Bandwidth – delay product = 1 * 106 * 20 * 10 -3 = 20, 000 bits So, the sender can send 20000 bits before it receives the ack. But the system is stop and waits. So Only one frame (1000 bits) is sent at a time. Hence, the link utilization = 20000 / 1000 = 5% Exercise System: Go Back N with 15 frame sequence Bandwidth: 1Mbps Round trip for one bit: 20ms Frame length: 1000 bits Utilization percentage of the link =? Sliding Window Protocols 

A One-Bit Sliding Window Protocol



A Protocol Using Go Back N



A Protocol Using Selective Repeat

Full Duplex data transmission  Have two separate Communication channels and use each one for simplex Data traffic (in different directions).  If this is done, we have two separate physical circuits, each with a ‗‗forward‘‘ channel (for data) and a ‗‗reverse‘‘ channel (for acknowledgements).  In both cases the bandwidth of the reverse channel is almost entirely wasted. In effect, the user is paying for two circuits but using only the capacity of one.  A better idea is to use the same circuit for data in both directions. In this model the data frames from A to B are intermixed with the Acknowledgement frames from A to B.  By looking at the kind field in the header of an incoming frame, the receiver can tell whether the frame is data or acknowledgement. Piggybacking When a data frame arrives, instead of immediately sending a separate control frame, the receiver restrains itself and waits until the network layer passes it the next packet. The acknowledgement is attached to the outgoing data frame (using the ack field in the frame header). In effect, the acknowledgement gets a free ride on the next outgoing data frame. The technique of temporarily delaying outgoing acknowledgements so that they can be hooked onto the next outgoing data frame is known as piggybacking.

A sliding window of size 1, with a 3-bit sequence number. (a) Initially. (b) After the first frame has been sent. (c) After the first frame has been received. (d) After the first acknowledgement has been received. A One-Bit Sliding Window Protocol

Two scenarios for protocol 4. (a) Normal case. (b) Abnormal case. The notation is (seq, ack, packet number). An asterisk indicates where a network layer accepts a packet. A Protocol Using Go Back N

Pipelining and error recovery. Effect on an error when (a) Receiver‘s window size is 1. (b) Receiver‘s window size is large. Sliding Window Protocol Using Go Back N

Simulation of multiple timers in software.

A Sliding Window Protocol Using Selective Repeat

a) Initial situation with a window size seven. b) After seven frames sent and received, but not acknowledged. c) Initial situation with a window size of four. d) After four frames sent and received, but not acknowledged. IEEE 802.3(Ethernet), IEEE 802.4(Token Bus), IEEE 802.5(Token Ring) IEEE 802.3-Ethernet Introduction



Local Area Network (LAN) – network connecting devices in a limited geographic area, usually privately owned and limited to a single office, building, or campus



Three typical architectures used: o Ethernet, Token Bus and Token Ring. o Ethernet most dominant

• •

Each protocol is based on HDLC Data link layer is further subdivided into two sub layers: o Logical Link Control (LLC) o Medium Access Control (MAC)

Project 802 and OSI Model

Data Link Layer Sub layers

• • •

Logical Link Control (LLC) – upper layer Handles logical addressing, control information and data Medium Access Control (MAC) – lower layer o Proprietary to specific LAN product (e.g. Ethernet, Token Ring, Token Bus, etc.) o Resolves contention for the medium, provides synchronization, flow control, physical addressing, and error control specifications

Normal Ethernet Operation

Ethernet Collisions

CSMA/CD CSMA/CD - A Simple Definition



A network station wishing to transmit will first check the cable plant to ensure that no other station is currently transmitting (CARRIER SENSE).



The communications medium is one cable, therefore, it does allow multiple stations access to it with all being able to transmit and receive on the same cable (MULTIPLE ACCESS).



Error detection is implemented throughout the use of a station "listening" while it is transmitting its data. o A jam signal is transmitted to network by the transmitting stations that detected the collision, to ensure that all stations know of the collision. All stations will "back off" for a random time. o Detection and retransmission is accomplished in microseconds. o Two or more stations transmitting causes a collision (COLLISION DETECTION)

Traditional Ethernet (802.3) • Overlapping signals are referred to as collisions – Increased stations  Increased traffic  more collisions •

Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is used to coordinate traffic, minimize collisions, and maximize number of frames delivered successfully

Ethernet Frame Format

• •

Consists of seven fields No mechanism for acknowledging received frames; considered an unreliable medium

Ethernet Frame Fields



Preamble – seven bytes of alternating 0s and 1s to notify receiver of incoming frame and to provide synchronization

• •

Start frame delimiter (SFD) – one byte signaling the beginning of the frame Destination address (DA) – six bytes containing the physical address of the next destination; if packet must reach another LAN, this field contains the physical address of the router; upon reaching the target network, field then contains the physical address of the destination device



Source address (SA) – six byte field containing physical address of last station to forward packet, sending station or most recent router



Length/type – two bytes indicating number of bytes in coming PDU; if fixed length, can indicate type

• •

Data – 46 to 1500 bytes CRC – CRC-32 error detection information

Ethernet Addressing

• • •

Each station on the network must have a unique physical address Provided by a six-byte physical address encoded on the network interface card (NIC) Normally written in hexadecimal notation

Categories of traditional Ethernet

• • •

Baseband – digital signals using Manchester encoding o 10Base5, 10Base2, 10-Base-T, 10Base-FL o First number indicates data rate in Mbps o Last number indicates maximum cable length or type Broadband – analog signals using digital/analog conversion (differential PSK) Only specification: 10Broad36

10Base5 - Thicknet

• •

A rigid coaxial cable (RG-8) approx. 0.4 in. thick used in the original Ethernet networks Bus topology LAN using base signaling with a maximum segment distance of 500 meters

Thicknet Characteristics



Supports transmission rates up to 10 Mbps in Baseband mode



Less expensive than fiber-optic cable, but more expensive than other types of coax



Wide diameter and excellent shielding make it more resistant to noise than other types of wiring



Physical connectors and cables include coaxial cable, NIC cards, transceivers, and attachment unit interface (AUI) cables

10Base5 Connectors



Transceiver – intermediary device; also called a medium attachment unit (MAU) o Performs CSMA/CD function; may contain small buffer



Attachment Unit Interface (AUI) – also called a transceiver cable o 15-wire cable which performs physical layer interface functions between station and transceiver o Plugs into NIC and transceiver



Transceiver tap – allows connection to a line at any point o Often called a vampire tap since it pierces the cable

10Base5 Topology

10Base5 Connectors

10Base2 - Thinnet

• • • • • •

Cable diameter is approximately 0.64 cm (RG-58) More flexible and easier to handle and install than Thicknet ―2‖ represents a maximum segment length of 185m (~200m) Less expensive than Thicknet and fiber-optic cable; more expensive than Twisted Pair wiring More resistant to noise than Twisted Pair; not as resistant as Thicknet Major advantages are its very low cost and relative ease of use

Thinnet Characteristics

• • • •

Shorter range (185 meters) and smaller capacity Bus topology LAN Connectors and cables include: NICs, thin coaxial cable, and BNC-T connectors Transceiver is moved into NIC; tap replaced by connector splicing directly into the cable, eliminating need for AUI cables



BNC-T connector – T-shaped device with 3 ports: one for the NIC and one each for input/output ends of cable

ThinNet Cabling & Connectors

10Base-T: Twisted Pair Ethernet

• • • • •

Most popular standard; easiest to install and reconfigure Star topology LAN using UTP cable; no need for AUI Supports data rage of 10 Mbps with a max hub to station length of 100 meters Transceiver operations are carried out in an intelligent hub NIC reads destination address of frame and only opens if it matches that address

10Base-T

10Base-FL: Fiber Link Ethernet

• •

Uses star topology to connect stations to a hub External transceiver called a fiber-optic MAU connects processing device to fiber-optic cables via a 15wire transceiver

Bridged Ethernet

• •

Increases bandwidth by dividing the network into smaller networks, allowing concurrent communications Separates collision domains since traffic is lower with segmentation

Switched Ethernet



In switched networks, a switch device recognizes the destination address and routes the frame to the specific port to which the destination station is connected (enables point-to-point connection; no collisions)



Also helps to improve security

Full-Duplex Ethernet

• • •

10Base5 and 10Base2 are half-duplex Full-duplex increases capacity of each domain No need for CSMA/CD

Fast Ethernet

• • • •

Operates at 100 Mbps; faster speeds needed for CAD, image processing, real-time audio and video No change in frame format, addressing, or access method Data rate and collision domain are changed Physical implementation is star topology o 100Base-X (100Base-TX and 100Base-FX) o 100Base-T4

100Base-TX

• •

Uses two category 5 UTP cable pairs or two STP cable pairs to connect stations to a hub (star) One pair carries frames from station to hub; one pair from hub to station



Uses 4B/5B and MLT-3 encoding (2 step process)

100Base-FX

• • • •

Uses two identical optical fibers in star topology One fiber carries frames from the station to hub; one from hub to station Encoding is 4B/5B Signaling is NRZ-I

100Base-T4

• • •

Uses four pairs of category 3 (voice grade) UTP to transmit 100 Mbps Two pairs are bidirectional; other two are unidirectional 8B/6T (eight binary/six ternary) encoding used to transform into six bauds of three voltage levels

Gigabit Ethernet

• • •

Data rate of 1000 Mbps or 1 Gbps Usually implemented as full-duplex with no CSMA/CD

1000Base-X uses shortwave optical fiber (1000Base-SX), long-wave optical fiber (1000Base-LX), or twisted-pair cables (1000Base-T) Summary

• •

Ethernet – most widely used LAN protocol Specific implementations discussed: o Traditional (10Mbps)

o Fast Ethernet (100 Mbps) o Gigabit (1 Gbps) o Ten-Gigabit (10 Gbps)



Bridging and switching techniques

IEEE 802.4-Token bus 802.4 - Token Bus

Physical line or tree, but logical ring. Stations know “left” and “right” stations. One token “passed” from station to station. Only station with token can transmit. Token Bus

• • • • • •

Physical order of stations does not matter Line is broadcast medium ―Send‖ token by addressing neighbor Provisions for adding, deleting stations Physical layer is not at all compatible with 802.3 A very complicated standard

Token Bus Sublayer Protocol

• • • •

Send for some time, then pass token If no data, then pass token right away Traffic classes: 0, 2, 4 and 6 (highest) o Internal substations for each station Set timer for how long to transmit o Ex: 50 stations and 10 Mbps o Want priority 6 to have 1/3 bandwidth o Then 67 Kbps each, enough for voice + control

Token Bus Frame Format

• • •

No length field Data can be much larger (timers prevent hogs) Frame control o Ack required? o Data vs. Control frame - how is ring managed?

Token Bus Control Frame Summary

Control Frame: solicit_successor



Periodically ask for any station to join by sending solicit_successor o token with sender‘s addr and successor‘s addr o wait 2 (as in 802.3)

• • •

If 0, then continue If 1, then add to ring as successor If 2+, then collision o Resolve contention via binary countdown



Timer determines how often ask for join o No limit on how long a station will wait to enter

Control Frame: set_successor

• • • •

Station X wants to leave o Successor S o Predecessor P X sends set_successor frame to P o With S as data field P changes its successor

X stops transmitting Control Frame: claim_token



Consider first station turned on

• • • •

Station notices no tokens o Sends claim_token No competitors, so makes a ring of just itself Periodically sends solicit_successor If two stations send claim_token o Arbitrate as in solicit_successor

Control Frames for Lost Tokens

• • • • • •

If station goes down … token lost Predecessor listens for data frame or token Noticing none, retransmits token Sends whofollows o Successor to failed station responds o Becomes new successor If 2 stations in a row down o Send solicit_successor_2 o Arbitrate among all alive to join ring If token holder goes down, timers to restart as in claim_token

IEEE 802.5-Token Ring Token Ring

Token Ring Implementation

• • • •

Series of 150-ohm shielded twisted-pairs sections Output port on each station connected to input port on the next Frame is passed to each station in sequence Station function as a repeater

Token Passing

• • • •

Station can send only when it receives a special frame called a token Token circulates around the ring If station wishes to send, it captures the token and sends one or more frames Token is then released so next station can transmit Token Passing

Token Passing – Token Ring (IEEE 802.5)

• • • • • • • • • •

Requires that stations take turns sending data Token passing coordinates process Token is a specially formatted three-byte frame that circulates; station wishing to transmit must first have possession Token passes from NIC to NIC in sequence; if station has data to send, station takes token and sends data frame; if not, passes to neighbor Each station receives the frame one by one and examines the destination address If it matches, frame is copied; station checks the frame for errors; changes bits to indicate the frame was received and copied Packet continues around the ring and is passed back to originating station Once the sender receives the frame and recognizes its address in the sender field, it examines the addressrecognized bits If they are set, it knows the frame was received and copied Sender then discards the frame and releases the token back to the ring

Priority and Reservation

• • • •

Higher priority stations may access the token sooner, Every station has a priority code As token passes by, station waiting to transmit can place its priority code in the access control (AC) field of the token or data frame Higher priority stations may remove a lower priority reservation; if stations have equal priority, it‘s firstcome, first-served

Monitor Stations

• •

Lost tokens - timer is issued each time a frame or token is generated If no frame is received within time period, new token is generated by a monitor station

• •

Orphan frames result if a sending station neglects to remove a used data frame from the ring Monitor sets a bit in the AC field in each frame; as frame passes, bit is set; if the frame passes again, the monitor discards, will remove it, and generate a new token Token Ring Frame

Data Frame Fields

Switch

• • •

In a physical ring configuration, any disabled or disconnected node can disable the entire network Use of a switch can allow the ring to bypass an inactive station A nine-wire cable connects each NIC to the switch; four used for data, five used to control the switch

Token Ring Physical Topology

Multistation Access Unit (MAU)

• •

Combines individual automatic switches May daisy chain to support more stations

Wireless LANs  Wireless Ethernet (802.11) Wireless Ethernet (802.11)  Operates on physical and data link layers  Basic service set (BSS) – stationary or mobile wireless stations and a central base station known as an access point (AP)  Without an AP is an ad hoc architecture

802.11 Architecture (cont)  Extended service set (ESS) – two or more BSSs with APs connected through a distribution system (wired LAN) in an infrastructure network Station Types  No-transition mobility – either stationary or moving only inside a BSS  BSS-transition mobility – can move from one BSS to another, but confined inside one ESS  ESS-transition mobility – can move from one ESS to another

802.11 FHSS  Frequency-hopping spread spectrum in a 2.4 GHz band  Carrier sends on one frequency for short duration then hops to another frequency for same duration, hops again to another for same amount of time and so on  Spreading adds security since only sender and receiver agree on sequence of allocated bands

  

Contention is handled by MAC sub layer since all stations use the same sub bands Pseudorandom number generator selects the hopping sequence Data rate is of 1 or 2 Mbps 802.11 DSSS  Direct sequence spread spectrum in a 2.4 GHz band  Each bit is replaced by a sequence of bits called a chip code, implemented at the physical layer  Sender splits each byte of data into several parts and sends them concurrently on different frequencies  Data rate is 1 or 2 Mbps

802.11a OFDM  Orthogonal frequency-division multiplexing using a 5-GHz band  Same as FDM except all sub bands are used by only one source at a given time  Security increased by assigning sub bands randomly  Data rates of 18 Mbps and 54 Mbps  Often used in power-line networking 802.11b HR DSSS  High-rate DSSS using a 2.4 GHz band  Similar to DSSS except for encoding method  Uses complementary code keying (CCK), encoding 4 or 8 bits to one CCK symbol  Defines four data rates: 1, 2, 5.5, and 11 Mbps 802.11g OFDM  Uses OFDM with same 2.4 GHz band  Achieves a 54-Mbps data rate  Works with same 802.11b equipment 802.11 CSMA/CA  Wait a DIFS time to avoid collision  Send RTS and wait for CTS reply to obtain the use of the Medium (air)  Use of SIFS time for control information

CSMA/CA  Necessary since wireless LANs cannot implement CSMA/CD

  

Collision detection requires increased bandwidth requirements Collisions might not be detected due to obstacles

Distance between stations may prevent collisions from being heard  Collision avoidance is accomplished through network allocation vector (NAV) Network Allocation Vector  Timer which shows how much time must pass before a station is allowed to check the channel

Fragmentation  Wireless environment is very noisy  Corrupt frames must be retransmitted  Large frames must be divided into smaller ones to increase efficiency IEEE 802.11 Frame Structure

Addressing  Complicated addressing scheme since there may be intermediate stations (APs), identified by flags

Wireless LAN Use Case 1 Communications within a Basic Service Set

Wireless LAN Use Cases 2 and 3

Case 2: From Distribution System to BSS

We need to identify the frame is from outside the BSS • B will receive the frame and sends an ACK to the AP (an 802.11 requirement) • The originator address is placed in field 3, which is used by B in replies Case 3: To Distribution System from BSS

We need to identify the AP as the first hop to the destination (B) • A will receive an ACK from the AP – indicates frame successfully on its way • The ultimate destination is placed in address field 3, which is used by the AP The Extended Service Set ESS

Case 4: Intra BSS through Wireless ESS

Used between Access Points. All four address fields are used. See IEEE 802.11f standard if you want the details. FDDI -(Fiber Distributed Data Interface) FDDI Basics: Fiber Distributed Data Interface (FDDI) came about because system managers became concerned with network reliability issues as mission-critical applications were implemented on high-speed networks. FDDI is frequently used as a backbone technology and to connect high-speed computers in a LAN.

FDDI has four specifications: 1. Media Access is accessed

Control

-

defines

how

2. Physical Layer Protocol—defines data encoding/decoding procedures 3. Physical Layer Medium—defines the characteristics of the transmission medium 4. Station Management—defines the FDDI station configuration

the

medium

FDDI has four specifications: 1. Media Access is accessed

Control

-

defines

how

the

medium

2. Physical Layer Protocol—defines data encoding/decoding procedures 3. Physical Layer Medium—defines the characteristics of the transmission medium 4. Station Management—defines the FDDI station configuration

FDDI Media Access Control Unlike CSMA/CD networks, such as Ethernet, token-passing networks are deterministic--you can calculate the maximum time that will pass before any end station will be able to transmit. FDDI's dual ring makes FDDI very reliable. FDDI supports real-time allocation of network bandwidth, making it ideal for a variety of different application types. FDDI provides this support by defining two types of traffic – synchronous and asynchronous.

Synchronous Synchronous traffic can consume a portion of the 100 Mbps total bandwidth of an FDDI network, while asynchronous traffic can consume the rest. Synchronous bandwidth is allocated to those stations requiring continuous transmission capability. This is useful for transmitting voice and video information. The remaining bandwidth is used for asynchronous transmissions. Asynchronous Asynchronous bandwidth is allocated using an eight-level priority scheme. Each station is assigned an asynchronous priority level. FDDI also permits extended dialogues, in which stations may temporarily use all asynchronous bandwidth.

The FDDI priority mechanism can lock out stations that cannot use synchronous bandwidth FDDI Media FDDI specifies a 100 Mbps, token-passing, dual-ring LAN that uses a fiber-optic transmission medium. Although it operates at faster speeds, FDDI is similar to Token Ring. The two networks share a few features, such as topology (ring) and media access technique (tokenpassing). A characteristic of FDDI is its use of optical fiber as a transmission medium. Optical fiber is exploding in popularity as a networking medium, being installed at a rate of 4000 miles per day in the United States. Single-mode fiber is capable of higher bandwidth and greater cable run distances than multi-mode fiber. Because of these characteristics, single-mode fiber is often used for inter-building connectivity while multimode fiber is often used for intra-building connectivity. Multi-mode fiber uses LEDs as the light-generating devices while single-mode fiber generally uses lasers. FDDI specifies the use of dual rings for physical connections. Traffic on each ring travels in opposite directions. Physically, the rings consist of two or more point-to-point connections between adjacent stations. One of the two FDDI rings is called the primary ring; the other is called the secondary ring. The primary ring is used for data transmission; the secondary ring is generally used as a backup.

FDDI Fault Tolerance

FDDI Optical Bypass Switch

FDDI Media Class B, or single-attachment stations (SAS), attach to one ring; Class A, or dual attachment stations (DAS), attach to both rings.

SASs is attached to the primary ring through a concentrator, which provides connections for multiple SASs. The concentrator ensures that a failure, or power down, of any given SAS, does not interrupt the ring. This is particularly useful when PCs, or similar devices that frequently power on and off, connect to the ring. Each FDDI DAS has two ports, designated A and B. These ports connect the station to the dual FDDI ring; therefore, each port provides a connection for both the primary and the secondary ring. SONET Synchronous Optical Network – fiber optic technology that can transmit high-speed data; used for text, audio, and video. Single clock handles timing of transmissions and equipment; enables predictability and ability to multiplex using TDM. The bandwidth of the fiber is considered as one channel divided into timeslots to define sub channels. Standard recommendations for equipment. Can handle signals from incompatible tributary systems SONET

SONET Devices STS Mux/DMux: either multiplexes signals from multiple sources into an STS or demultiplexes an STS into different destination signals. Regenerator: is a repeater that takes a received optical signal and regenerates it. This devices function at the data link layer. Add/drop multiplexer: can add signals from different sources into a given path or remove a desired signal from a path and redirect it without demultiplexing the entire signal. SONET Frame Can be viewed as a matrix of nine rows of 90 octets each, for a total of 810 octets. Some used for control; they are not positioned at the beginning or end of the frame. First 3 cols. – administration overhead. The rest of the frame is called Synchronous Payload Envelope (SPE) SPE contains transmission overhead and user data. Payload can start anywhere in the frame. A pointer from 1 to 3 of row 4 can determine the beginning address of the SPE.

SONET Frame Transaction Transmitted one after another without any gap in between. First 2 bytes – alignment bytes. F628 in Hex. – define the beginning of each frame. Third byte is the frame identification. SONET STS SONET defines a hierarchy of signaling levels called Synchronous Transport Signals (STSs). Each STS level supports a certain data rate specified in megabits per second. The physical links defined to carry each level of STS are called Optical Carriers (OCs). SONET Rates STS

OC

Raw (Mbps)

SPE (Mbps)

User (Mbps)

STS -1

OC -1

51.87

50.12

49.536

STS -3

OC -3

155.52

150.336

148.608

STS -9

OC -9

466.56

451.008

445.824

STS -12

OC -12

622.08

601.344

594.432

STS -18

OC -18

933.12

902.016

891.648

STS -24

OC -24

1244.16

1202.688

1188.864

STS -36

OC -36

1866.23

1804.032

1783.296

STS -48

OC -48

2488.32

2405.376

2377.728

STS -192

OC -192

9953.28

9621.604

9510.912

BRIDGES

Introduction  LAN may need to cover more distance than the media can handle effectively, or  Number of stations may be too great for efficient frame delivery or management of the network  An internetwork or internet is two or more networks connected for exchanging resources  Common devices used: repeaters, bridges, routers and gateways 16.1 Connecting Devices  Five types:

   

Repeaters Hubs Bridges

Two- and three-layer switches  Repeaters and hubs – layer one of Internet model  Bridges and two-layer switches – first two layers  Routers and three-layer switches – first three layers Connecting Devices

Repeaters  Operate only in physical layer  Connects two segments of the same LAN  Both segments must be of the same protocol  Only forwards frames; does not filter

   

Solves attenuation issues by extending the physical length of the network Receives signal before too weak or corrupted, regenerates the original pattern, sends a refreshed copy Positioned so signal reaches it before any noise changes the meaning of the bits Does not amplify; creates a copy, bit for bit, at the original strength Hubs  Actually a multiport repeater  Connects stations in a physical star topology  Also may create multiple levels of hierarchy to remove length limitation of 10Base-T

Bridges  Operate in both physical and data link layers  Used to divide a network into smaller segments  May also relay frames between separate LANs  Keeps traffic from each segment separate; useful for controlling congestion and provides isolation, as well as security  Checks address of frame and only forwards to segment to which address belongs Bridges

Function of a Bridge

Transparent Bridges & Learning Bridges  Builds table by examining destination and source address of each packet it receives  Learning bridges

 

If address not recognized, packet is relayed to all stations Stations respond and bridge updates routing table with segment and station ID info



Changes on the network are updated as they occur Learning Bridges

Spanning Tree  Redundant bridges may be installed to provide reliability  To prevent infinite looping of packets between bridges, a spanning tree algorithm is used to identify any redundant paths  Path with lowest cost will be identified and used as the primary route that communications will be routed through; in the event of blocking or bridge failure, secondary routes may be used Source Routing  Sender of packet defines bridges and routes that packet should take  Complete path of bridge IDs and destination address is defined within the frame  Bridge routing table is not used  Designed to be used with Token Ring LANs



Not as common today

Issues with Bridges Connecting Different LANs  Frame format – differences in frame structure, fields used (e.g. Ethernet to Token Ring)  Payload size – size of data encapsulated in the frame may differ  Data rates – differences in data rates supported by different protocols; buffering may be necessary  Address bit order – differs between protocols  Other – differences in handling ACKs, collisions, priority, security, multimedia support, etc. Two-Layer Switch  Performs at the physical and data link layer  A bridge with many ports designed for faster performance  Allocates unique port to each station  No competing traffic  Routers and three-layer switches covered later 19.2 Backbone Networks  Allows several LANs to be connected  No station is directly connected to the backbone  Stations are part of a LAN and the backbone is a LAN itself Bus Backbone

  

Topology is a bus Used in networks such as 10Base5 or 10Base2 Normally used to connect different buildings or to connect multiple floors within a single building

Star Backbone  Collapsed or switched backbone  Backbone is just one switch that connects LANs  Used as distribution backbone inside a building

Connecting Remote LANs  Remote bridges acting as connecting devices to connect LANs and point-to-point networks, such as leased telephone lines or ADSL lines

16.3 Virtual LANs  Local area network configured by software, not by physical wiring

Virtual LANs  Divides a LAN into logical, instead of physical, segments  No need to change a physical configuration if changes in workgroups are necessary  Even allows grouping of stations connected to different switches in a VLAN  Supports broadcast domains, just as if stations belong to the same physical segment Switches in a VLAN Backbone

VLAN Membership  May be classified by

    

Switch port numbers MAC addresses IP addresses IP multicast addresses

Combination of two or more VLAN Configuration  Manual – network admin manually assigns stations to VLANs at setup and in migration  Automatic – stations are automatically connected and disconnected based on criteria defined by admin  Semiautomatic – initialization may be done manually, with migrations automatically Communication between Switches  Must know which station belongs to which VLAN as well as membership of stations connected to other switches  Tables may be updated by broadcast frames and may be periodically sent amongst switches  Frame tagging may be used to define the destination VLAN  TDM may be used to segment channels for each VLAN Advantages of VLANs  Cost and time reduction in moving stations from one group to another  Creation of virtual workgroups



Security

UNIT -III Network Layer Position of Network layer

Network layer duties Figure 1

Internetwork

 Physical and Data link layers are jointly responsible for data delivery on the network from node to node  How can data to be exchanged between Networks? - Internetwork Figure 2

Links in an internetwork

Difficulties?

    

Data arrive at interface f1 of s1 How does s1 know that they should be sent out from interface f3? There is no provision in the data link (or Physical) layer to help s1 to select correct decision. Because the frame contains the MAC Address of A (Source) and

The MAC Address of S1 (destination) For LAN (or) WAN - Delivery means carrying the frame through one link, not beyond Need for Network Layer

  

To solve the problem of delivery of data through several links. Responsible for Host to Host delivery and Routing the packets through Router / Switch

Figure 3

Network layer in an internetwork

Figure 4

Network layer at the source

 Receives data from Transport layer  Responsible for creating Packet  Each packet contains  Universal Address of Source  Universal Address of Destination  Makes sure the pkt is correct size.  If the packet is too large,  Then it will be fragmented  Also add fields for error control Figure 5

Network layer at a Router

 Responsible for routing the packet  When packet arrives, router finds the interface from which the pkt must be sent.  This is done by using routing Table.  If necessary, perform fragmentation. Figure 6

Network layer at the destination

 Responsible for Address Verification.  Make sure the destination is correct.  Also checks to see the packet has been corrupted during transmission.  If corrupted, discards the packet.  If the packet is fragment, it waits all fragments have arrived.

Figure 7

Switching

Packet Switching

    

Data are transmitted in discrete units  Called Packet Packets are variable length blocks The max length of packet is established by network layer. Packet contains  Data and  Header with control info. According to the header info, packets are routed between nodes.

Virtual Circuit Switching

    

All packets belong to a message (or) session is preserved. Single route is chosen between source/destination. All packets take that route to reach destination. It needs a call setup to establish a virtual circuit. (Either permanent or switched type) Uses virtual circuit identifier for routing.

Virtual Circuit Switching

 

Switched Virtual Circuit Permanent Virtual Circuit

Source-to-Destination Data Transfer

Figure 8

Datagram approach

 Each packet is treated independently.  Each pkt will take its own path to reach the destination.  There is no sequence orders are followed.  The Arrangement of packets will be done by the Transport layer at destination.  No need for call setup.  The packets have source and destination address, so it will reach the destination.  But there is a possibility, the data may lost. Addressing Need to uniquely and universally identify every device to allow global communication Internet address or IP address is used in the network layer of the Internet model Consists of a 32-bit binary address IP Addressing

IP Address Representation Binary notation – IP address is displayed as 32 bits Dotted-decimal notation – more compact and easier to read form of an IP address o Each number is between 0 and 255

Network Address First address in the block, assigned to the organization Defines the network itself and cannot be assigned to a host Has both netid and hostid, with 0s for the hostid Defines the network to the rest of the Internet

IP Addressing

IP Address Classes Class A: Class B: Class C: Class D: Multicast Class E: Research Class Ranges of Internet Addresses

Unicast, Multicast, and Reserved Addresses Unicast address – identifies a specific device Multicast address – identifies a host belongs to a group or groups (used only as a destination address) Reserved addresses – class E addresses; only used in special cases

Class A Addresses Numerically the lowest Use only one byte to identify the class type and netid Three bytes are available for hostid numbers 127 possible class A networks with a maximum of 16,777,214 computers on each network Designed for large organizations with a large number of hosts or routers Many addresses are wasted Class B Addresses First two octets are the network number and the last two octets are the host number 16,382 possible blocks for assignment to organizations with a maximum of 65,534 computers on each network Designed for mid-size organizations that may have tens of thousands of hosts or routers Many addresses are wasted Class C Addresses The first three octets are the network number and the last octet is the host number 2,096,896 blocks for assignment to organizations First three bytes (netid) are the same Each block only contains 256 addresses, which may be smaller than what many organizations need Blocks in Class C

Class D and Class E Addresses Class D – reserved for multicast addresses o Multicasting – transmission method which allows copies of a single packet to be sent to a selected group of receivers Class E – reserved for future use IP Address Classes Exercise

Subnetting

IP addressing is hierarchical First reach a device through its network id (netid) Then reach the host itself using the second portion (hostid) Since an organization may not have enough address, subnetting may be used to divide the network into smaller networks or sub networks Addressing without Subnets

Network 172.16.0.0

Addressing with Subnets

Network 172.16.0.0 Network Hierarchies

Subnetting (cont) Subnetting creates an intermediate level of hierarchy IP datagram routing then involves three steps: delivery to the site, delivery to the subnet work, and delivery to the host

Masking Extracts the address of the physical network from an IP address Used by routers inside the organization

Boundary Level Masking If mask numbers are either 255 or 0: o Bytes in the IP address that correspond to 255 in the mask will be repeated in the subnet mask o Bytes in the address that correspond to 0 in the mask will change to 0 in the subnet address IP address Mask

45 255

23 255

21 0

Subnet 45

23

0

0

8 0

Nonboundary-Level Masking If masking is not at the boundary level (mask numbers are not just 255 or 0) o Bytes in the IP address that correspond to 255 in the mask will be repeated in the subnet address o Bytes in the IP address that correspond to 0 in the mask will change to 0 in the subnet address o For other bytes, use the bit-wise AND operator Nonboundary-Level Masking Example IP address Mask 255

45 192

123 0

21 0

Subnet 45

64

0

0

123

01111011

8

192 64

11000000 01000000

Routing Routing Techniques Static versus Dynamic Routing Routing Table for classful Addressing Routing Table for Classes Addressing

Next-hop routing

Network-specific routing

Host-specific routing

Figure 19.31

Default routing

Figure 19.32

Classful addressing routing table

Routing Protocols Unicasting

Note:

In unicast routing, the router forwards the received packet through only one of its ports. Distance Vector Routing Each router periodically shares its knowledge about the entire internet with its neighbors o Sharing the knowledge about the entire autonomous system o Sharing only with neighbors o Sharing at regular intervals Routing Table Every router keeps a routing table that has one entry for each destination network of which the router is aware

Link State Routing

Destination

Hop Count

Next Router

163.5.0.0

7

172.6.23.4

197.5.13.0

5

176.3.6.17

189.45.0.0

4

200.5.1.6

115.0.0.0

6

131.4.7.19

Other information

Process by which each router shares its knowledge about its neighborhood with every router in the area o Sharing knowledge about the neighborhood o Sharing with every other router – flooding o Sharing when there is a change – results in lower internet traffic than that required by distance vector routing

Types of links

Point-to-point link

Transient link

Stub link

Example of an internet

Graphical representation of an internet

Types of LSAs Link State Advertisements: To share information about their neighbor each entity distributes link state advertisements (LSAs) LSA announces the states of entity links

Router link

Network link

Summary link to network

Summary link to AS boundary router

External link

Link State Database Every router in an area receives the router link and network link LSAs from every other router and forms a link state database Every router in the same area has the same link state database Link state database – tabular representation of the topology of the internet inside an area – shows relationship between each router and its neighbors including the metrics Note:

In OSPF, all routers have the same link state database. Dijkstra Algorithm To calculate routing table each router applies Dijkstra algorithm to its link state database Dijkstra algorithm calculates the shortest path between two points on a network using a graph made up of nodes and edges Algorithm divides the nodes into two sets: tentative and permanent. It chooses nodes, makes them tentative, examines them and if they pass the criteria, makes them permanent Algorithm 1. Start with the local node (router): the root of the tree. 2. Assign a cost of 0 to this node and make it the first permanent node. 3. Examine each neighbor node of the node that was the last permanent node. 4. Assign a cumulative cost to each node and make it tentative. 5. Among the list of tentative 1. Find the node with the smallest cumulative cost and make it permanent. 2. If a node can be reached from more than one direction 1. Select the direction with the shortest cumulative 6. Repeat steps 3 to 5 until every node becomes permanent.

Shortest-path calculation

nodes

cost.

Routing Table Each router uses the shortest-path tree method to construct its routing table Routing table shows cost of reaching each network in the area To find the cost of reaching networks outside of the area, routers use the summary link to network, the summary link to boundary router and the external link advertisements

Link state routing table for router A

UNIT -IV Transport Layer Position of transport layer

Transport layer duties

Process-to-process delivery: UDP and TCP Process-to-process delivery  Client server paradigm

 Addressing  Multiplexing and Demultiplexing  Connectionless/Connection-oriented  Reliable/Unreliable

Note:

The transport layer is responsible for process-to-process delivery. Figure 22.1 Types of data deliveries

Figure 22.2

Port numbers

Figure 22.3

IP addresses versus port numbers

Figure 22.4

IANA ranges

Figure 22.5

Socket address

Figure 22.6

Multiplexing and demultiplexing

Figure 22.7

Connection establishment

Figure 22.8

Connection termination

Figure 22.9

Error control

Note: UDP is a connectionless, unreliable protocol that has no flow and error control. It uses port numbers to multiplex data from the application layer. Table 22.1 Well-known ports used by UDP

Figure 22.10

User datagram format

Note: The calculation of checksum and its inclusion in the user datagram are optional. Note:

UDP is a convenient transport-layer protocol for applications that provide flow and error control. It is also used by multimedia applications. Checksum calculation  Suppose that we have the following three 16-bit words:  0110011001100110 0101010101010101 0000111100001111  The sum of first of these 16-bit words is:  0110011001100110 0101010101010101 --------------------1011101110111011  Adding the third word to the above sum gives  1011101110111011 0000111100001111 --------------------1100101011001010

 

The 1's complement of the sum 1100101011001010 is 0011010100110101 At the receiver

 

all four 16-bit words are added, including the checksum



Otherwise  Error

If no errors sum will be  1111111111111111

Transmission Control Protocol TCP adds connection-oriented and reliability features to the services of IP Communication abstraction:

– –

Reliable Ordered

– – – –

Point-to-point Byte-stream Full duplex

Flow and congestion controlled Protocol implemented entirely at the ends Evolution of TCP

TCP through the 1990s

Transmission Control Protocol



Port numbers Port 7

Protocol

Description

Echo

Echoes a received datagram back to the sender

9

Discard

Discards any datagram that is received

11

Users

Active users

13

Daytime

Returns the date and the time

17

Quote

Returns a quote of the day

19

Charger

Returns a string of characters

20

FTP, Data

File Transfer Protocol (data connection)

21

FTP, Control

File Transfer Protocol (control connection)

23

TELNET

Terminal Network

25

SMTP

Simple Mail Transfer Protocol

53

DNS

Domain Name Server

67

BOOTP

Bootstrap Protocol

79

Finger

Finger

80

HTTP

Hypertext Transfer Protocol

111

RPC

Remote Procedure Call

Transmission Control Protocol TCP Services - Stream delivery service Allows the sending process to deliver data as a stream of bytes and the receiving process to obtain data a stream of bytes TCP creates an environment in which the two processes seem to be connected by an imaginary tube that carries their data across the internet

TCP - buffers Sending & receiving buffers



Processes do not consume data at the same speed Sending site:

– – –

White section: empty locations to be filled by sending process Blue section: bytes sent but not yet acknowledged

Red section: bytes to be sent by sending TCP Receiving site:

– –

White section: empty locations to be filled by bytes from the networks Red section: received bytes to be consumed by the receiving process

TCP – bytes & segments TCP at the sending site gathers bytes into a packet called a segment TCP adds a header to each segment and delivers it to IP for transmission Segments can arrive out of order Size of the segment varies

TCP – Services Full Duplex Service Connection Oriented Service Reliable Service

TCP – numbering bytes Numbering is used for flow & error control Segments are not numbered, only bytes Full-duplex connection – numbering is independent in each direction Numbers generated randomly from 0 to 2^32-1 Sequence number



The number of the first byte carried in the segment Acknowledgement number

– – –

To confirm received bytes Defines the number of the next byte the party expects to receive

Cumulative TCP numbering – an example Imagine a TCP connection is transferring a file of 6000 bytes. The first byte is numbered 10010. What are the sequence numbers for each segment if data are sent in five segments with the first four segments carrying 1000 bytes and the last segment carrying 2000 bytes?

The following shows the sequence number for each segment: Segment 1 ==> Segment 2 ==> Segment 3 ==> Segment 4 ==> Segment 5 ==>

sequence number: 10 010 (range: 10,010 to 11,009) sequence number: 11 010 (range: 11,010 to 12,009) sequence number: 12 010 (range: 12,010 to 13,009) sequence number: 13 010 (range: 13,010 to 14,009) sequence number: 14 010 (range: 14,010 to 16,009)

TCP segment format

TCP - connections Connection establishment o Three-way handshake Why is two-way handshake not enough? Connection termination o Four steps Connection reset

TCP – a state transition diagram

Flow control The amount of data a source can send before receiving an ACK from the destination Whether to send 1 byte of data and wait for ACK or send all the bytes and wait for the ACK for the complete message? TCP gives a solution in between Sliding window protocol



byte oriented

If no window, a sender can send all bytes without regarding the condition of the receiver

– –

if data are consumed too slowly then receiver buffer becomes full

-> drop the packet (retransmit)

the sender must adjust itself to the number of the free locations in the receiver buffer Receiver window

Sender window

Silly window syndrome When either sending application sends data slowly or receiving application consumes data slowly



Example: when 1 byte sent, 40 bytes overhead – not efficient Syndrome created by the sender



Nagle‘s algorithm o to prevent TCP from sending the data byte by byte  send the 1st byte  wait for either the received ACK or the maximum-size segment full  repeat #2 Syndrome created by the receiver



Clark‘s solution



send ACK a.s.a data arrive, but advertise 0 size window



Delayed ACK Error control in TCP Detect corrupted segments; lost segments; out-of-order segments & duplicated segments Three tools: o checksum o acknowledgment

– o time-out

no NACKs



one time-out counter for each segment sent Error control in TCP-lost or corrupted segment –

Error control in TCP-duplicate & out-of-order segmentDuplicate segment



the destination TCP simply discards the segment Out-of-order segment



not acknowledged until it receives all the segments that precede it Error control in TCP-lost ACK-

TCP timers

Retransmission timer if an ACK is received before the timer goes off – destroy the timer if the timer goes off before ACK arrives – retransmit the segment & reset the timer Retransmission time = 2* RTT



not fixed since paths that IP packets take may differ

– –

if too short – retransmissions -> waste of bandwidth if too large – delay for the application program

RTT = * previous RTT + (1- )*current RTT,

usually 90 %

Karn‘s algorithm:



do not consider the RTT of a retransmitted segment in the calculation of the new RTT Persistence timer to deal with the zero-size windows What if the receiver advertises that the window size is 0 (by sending ACK) and this ACK is lost?



ACK are not acknowledged in TCP Start persistence timer

– –

when this goes off send a probe (1 byte of data)

it is set to the retransmission time & doubled every time a response is not received (until 60 s, then sent every 60 s) Keep alive timer to prevent a long idle connection between two TCPs



either client or server crash usually set to 2h Time-Waited Timer used during connection termination to allow duplicate FIN segments to be discarded at the destination usually 2 times the expected lifetime of a segment Congestion control and QoS Topics to be covered Data Traffic Congestion Congestion Control Example o Congestion control in TCP Quality of Service Techniques to Improve QoS Integrated Services The main focus Applicable for all layers Congestion control



try to avoid traffic congestion Quality of Service



create an appropriate environment for the traffic

Data traffic

peak data rate : max data rate of the traffic average data rate = (amount of data)/time Maximum Burst size: max. length of time the traffic is generated at peak rate effective bandwidth – the bandwidth the network needs to allocate for the flow of traffic; F(ADR,PDR or MBS) Traffic profiles Constant-bit-rate traffic



ADR=PDR No MBS

Variable-bit-rate traffic



ADR! =PDR Small MBS

Bursty traffic

– – –

ADR&PDR are very different MBS significant Main cause of congestion

Congestion Appears if the load on the network is greater than the capacity of the network

– –

load: the number of packets sent to the network

capacity: the number of packets a network can handle Why congestion occurs?



Because routers and switches have queues that hold the packets before and after processing Congestion control: keep the load below capacity

the packet is put at the end of the input queue the processing module moves the packet from the queue and forwards the packet the packet is put in an appropriate output queue Network performance (measured by delay and throughput) delay versus load

delay is composed of? Throughput versus network load

Congestion control Open-loop congestion control



prevent congestion before it happens

• • • •

retransmission policy



retransmission timers must optimize efficiency & prevent congestion

window policy



Selective Repeat window is better than Go-back-N

acknowledgement policy



if not every packet is ACKed the sender may slow down

discarding policy



Example: in audio transmission – discard less sensitive packets (quality of sound still preserved)



admission policy



QoS mechanism; switches (routers) first check resource requirements of a flow before admitting it to the network Closed-loop congestion control

– – – –

back pressure



congested router informs previous upstream router to reduce the outgoing traffic

choke point



a packet sent by a router to the source (similar to ICMP source quench) to inform it of congestion

implicit signaling



the delay in receiving an ACK can be a signal that a network is congested

explicit signaling



a router can explicitly send a special bit (flag) in the packet to the source or the destination

Congestion control in TCP TCP assumes that the cause of lost segment is due to congestion in the network Retransmission of the lost packets does not solve congestion problem – it aggravates it In flow control, sender window size determined by the receiver window – no information about the network congestion If the network cannot deliver data to the receiver due to congestion, it has to inform the sender to slow down Congestion window: min (receiver window size, congestion window size) Congestion avoidance in TCP Slow Start (SS) & Additive Increase (AI) (AI=Congestion Avoidance) o start with the congestion window (cwnd) = max segment size o for each successfully received ACK increase the cwnd size by 1 until the cwnd = threshold value; (exponential increase) o after that, for each successfully received ACK, increase the window size by 1/n segments up to a size of the receiver window. n=current congestion window (cwnd) size Multiplicative Decrease (MD) o if a time-out occurs the threshold is set to one maximum segment size (TCP Tahoe, TCP Reno). o if 3 duplicated ACKs received the threshold is set to a half of the cwnd size(TCP Reno)

Slow Start w=1 for (each new ACK received) w = w+1 until (loss detected or w >= ssthresh)

Not so slow

– Exponential increase in transmission rate. Continues until: – –

Loss detected or…

w > ssthresh At first, we don‘t know what ssthresh is.

– – –

Will continue until a loss is detected. ssthresh = w / 2 Restart slowstart.



Hopefully makes it to ssthresh before another loss. Congestion Avoidance When w >= ssthresh.

w=1 for (each new ACK received) w = w+1 until (loss detected or w >= ssthresh) w=1 for (each new ACK received) w = w+1 until (loss detected or w >= ssthresh)

Fairness Assume that the transmission rate in each of the links is R bps. A congestion-control mechanism is said to be fair if the average transmission rate of each of the N connections is approximately R/N.

Quality of Service ―The collective effect of service performance which determines the degree of satisfaction of a user of the service.‖ (ITU-T)

– –

service: A set of functions offered to a user by an organization. user: Any entity external to the network which utilizes connections through the network for communication.

Flow characteristics

Reliability – if lacking means that packets or ACKs are lost

– more important with FTP, SMTP than with audio conferencing Delay – source to destination delay –

telephony, audio & video conferencing more prone to delay Jitter – variation in delay for packets belonging to the same flow

– real-time audio & video cannot tolerate high jitter Bandwidth QoS requirements

Techniques to improve QoS Scheduling Traffic shaping Resource reservation Admission control Scheduling

Traffic shaping ―Mechanism to control the amount and the rate of the traffic sent to the network.‖ Leaky bucket

Token bucket – to speed up transmission when large bursts arrive



future credits accumulated in the form of tokens

Resource reservation ―A flow of data needs resources such as buffer, bandwidth, CPU time..‖ The quality can be improved by reserving these resources in beforehand



The flow doesn‘t need to compete with other flows Admission control mechanism used by a router or a switch to accept or reject a flow based on flow specifications

UNIT-V Domain Name System (DNS) Introduction

  

In the past, mapping of IP addresses was static using a host file Impossible in today‘s dynamic environment Domain Name System (DNS) was created to divide mapping information to be stored on multiple computers to be accessed when needed Name Space

   

All names assigned to machines on an internet Must be unique; either flat or hierarchical Flat name space – name is assigned to an address; no structure Hierarchical name space – made of several parts; each succeeding part is more specific; central authority assigns part that defines the nature of the organization and the name (e.g. southalabama.edu) Domain Name Space

 

Structure for organizing the name space in which names are defined in an inverted-tree structure with the root at the top Each level of the tree defines a hierarchical level

Domain Names

   

Full domain name is a sequence of labels separated by dots (.) Fully qualified domain name (FQDN) contains the full name of a host cis.usouthal.edu. Partially qualified domain name (PQDN) does not include all the levels between host and root node

 Resolver supplies the suffix to create an FQDN Domains may be divided into subdomains

Distribution of Name Space

  

Information for domain name space must be stored on multiple servers (DNS servers) to be efficient Stored in a hierarchy of servers Zone defines the domain a server is responsible for

DNS in the Internet

   

Domain name space is divided into three sections: generic, country and inverse Generic domains define hosts by generic behavior Country domains are also used to identify national designations Inverse domain is used to map an address to a name (address-to-name resolution) Resolution

    

Mapping a name to an address or an address to a name Resolver is a DNS client used by an address to provide mapping In recursive resolution, the client sends its request to a server that eventually returns a response In iterative resolution, the client may send its request to multiple servers Caching may be used to store information in memory to speed up resolution DDNS

 

Dynamic Domain Name System automatically updates the DNS master file Sent by DHCP to a primary DNS server; secondary servers are notified Encapsulation



DNS uses either UDP or TCP to send request, response messages using a well-known port

 

UDP for messages less than 512 bytes

Otherwise uses TCP Electronic Mail (SMTP) and File Transfer (FTP) Electronic Mail

   

Simple Mail Transfer Protocol (SMTP) is used to support email on the Internet Addressing consists of two parts: a local part and a domain name, separated by an @ sign Local part defines the user mailbox Domain name defines the mail exchanger for the organization

User Agent (UA) Services

     

Provide template for user to compose a message Reads incoming messages Allows a user to reply to messages Allows a receiver to forward messages Handles user‘s inbox and outbox May be command-driven (e.g. mail, pine) or GUI-Based (Outlook, Netscape) MIME



Multipurpose Internet Mail Extensions is an extension of SMTP that allows the transfer of multimedia and other non-ASCII messages Mail Transfer Agent (MTA)

  

Handles mail transfer across the Internet SMTP commands and responses are used to transfer messages between an MTA client and MTA server Occurs in three phases: connection establishment, message transfer, and connection termination Mail Delivery

   

Consists of three stages First stage – email goes from user agent to local server, where it is stored until it may be sent Second stage – email is relayed by the local server, acting as the SMTP client, to the remote server Third stage – remote user agent uses mail access protocol such as POP3 or IMAP4 to access the mailbox and obtain mail Email Delivery

Mail Access Protocols

 

Used by receiver to retrieve mail when desired Post Office Protocol, version 3 (POP3) is a simple limited protocol to access mail



Assumes entire mailbox is transferred when accessed  Internet Mail Access Protocol, version 4 (IMAP4) has more features and functions File Transfer

 

File Transfer Protocol (FTP) is a TCP/IP client-server application for copying files from one host to another Establishes two connections between client and server for efficiency; one for data transfer, the other for control information (commands and responses)  Control connection is maintained during entire process; data connection is only opened during data transfer Network Security The Opportunity of Internet The Internet and Web technology presents enormous promise for e-commerce Web now is used to handle important business assets that became the target of criminal attack Attract attack due to publicity, commerce and money, proprietary information, and network access

The Importance of Security The Internet presents enormous business opportunities The Internet is open to public, vulnerable to various attacks One of the major hurdles that we face in achieving the full potential of Internet-based electronic commerce is security New threats from terrorism and cyber warfare Vulnerability of the Internet More vulnerable than private network Wide inter-network connection Easy access by mass public world-wide Lack of build in monitoring and security control with TCP/IP Extensibility of web technology creates many security flaws Attacks can be automated, anonymous, worldwide, and difficult to detect The Risk Direct financial loss resulting from fraud Theft of valuable confidential information Loss of business opportunities through disruption of service Unauthorized use of resources Loss of customer confidence or respect Cost resulting from uncertainties Communication Channel Threats Secrecy Threat

– – – –

Secrecy is the prevention of unauthorized information disclosure Privacy is the protection of individual rights to nondisclosure Theft of sensitive or personal information is a significant danger Your IP address and browser you use are continually revealed while on the web

Integrity Threats

– Also known as active wiretapping – Unauthorized party can alter data •

Change the amount of a deposit or withdrawal Necessity Threats

– Also known as delay or denial threats – Deny Disrupt normal computer processing processing entirely Slow processing to intolerably slow speeds Remove file entirely, or delete information from a transmission or file Divert money from one bank account to another Dollar amount loss by type

Security Timeline

Security Tools

Security Technology used

Security Policy and Integrated Security Security policy is a written statement describing what assets are to be protected and why, who is responsible, which behaviors are acceptable or not

– Physical security – Network security – Access authorizations – Virus protection – Disaster recovery

Security policy

Security Policy – This is a written statement describing the following:

– Assets to be protected; – Reasons for their protection; – Who is responsible for their protection; – Which behaviors are acceptable; and – Which behaviors are not acceptable? Network Security Network Reliability Issues



Viruses, E-Vandals, Hackers, Information Security

– – – –

IT Security Principles Security Aspects Types of Security Services Types of Security Threats

– –

Security Goal

Security Attack, Model of Network Security, n/w Access Security Digital Information Issues

– – – –

Confidentiality Authentication Integrity Access Control

Network vs. Internetworking Network Security - Layers 5-7

– Securing the localized private domain. Network Administration, File Permissions, Password Protections, User Authorization Database security Internetwork Security, Layers 1-3

– Securing information from ―untrusted‖ users on the public Internet or Virtual Private Networks. Encryption, Packet Filters, Firewalls Local Network Security Issues Password Protection



Encrypted username & password Group/Owner ID‘s

– File Permissions File Encryption

– Digital Encryption Standard (DES) – RSA Database Security Three Aspects of Security

  

Security Attack: Any action that compromises the security of information owned by an organization. Security Mechanism: A mechanism that is designed to detect, prevent or recover from a security attack.

Security Service: A service that enhances the security of [information] systems and the information transfers of an organization. The services are intended to counter security attacks, and they make use of one or more security mechanisms to provide the service. Security Goal

Types of Security Service Security Services fall into one of the following categories:

  

Confidentiality: Ensures that the info in a system and transmitted info are accessible only for reading by authorized parties. (Data Privacy) Integrity: Ensures that only authorized parties are able to modify computer systems assets and transmitted information. (Data has not been altered) Authentication: Ensures that the origin of a message or electronic doc is correctly identified, with an assurance that the identity is not false. (Who created or sent the data)

Types of Security Threats

(a) Normal Flow (b) Interruption: An asset of a system becomes unavailable or unusable. (c) Interception: Some unauthorized party which has gained access to an asset. (d) Modification: Some unauthorized party not only gains access to, but also tampers with, an asset. (e) Fabrication: Some unauthorized party fabricates objects on a system.

Types of Security Attacks

Passive Threats:  Release of Message Contents  Traffic Analysis

Active Threats:  Masquerade  Replay  Modification of Mess. Contents  Denial of Service

Model for Network Security

 A message is transferred from one party (Principal) to another.  A logical information channel is established between the two Principals by the cooperative use of some protocol, e.g. TCP/IP.  Goal is to provide the secure transmission of information from Opponents.  A trusted third-party may be needed for secure transmissions. Model for Network Access Security

(1) Gatekeeper functions include Password-based login authentications. (2) Various internal controls that monitor activity and analyze stored information in an attempt to detect the presence of unwanted intruders. Security at Different Layers

LAYERED SECURITY Security Levels & Applicable Measures

Tools - Cryptography VPN -remote access PGP -email Dedicated Circuits -‗tunnels‘ -IPSec Tools - Web Security Firewalls -denial of services vs threats Remote Access Human Element -keeping info in is harder than keeping people out Tools - Virus Protection Email Intruders Human Element Building a Defense When building a defense, you should use a layered approach that includes securing

– – –

the network infrastructure, the communications protocols, servers,

applications that run on the server, and the file system, and Require some form of user authentication.

When you configure a strong, layered defense, an intruder has to break through several layers to reach his or her objective.



For instance, to compromise a file on a server that is part of your internal network, a hacker would have to breach your network security, break the server's security, break an application's security, and break the local file system's security.

Layered Defense

Trends in Network Security Increased vigilance for virus infections Continued maturation of firewall technologies Increased use of strong encryption algorithms Enhanced authentication/authorization controls Nonrepudiation mechanisms Denial-of-service attacks Intellectual property protection Protecting the privacy of customer data

Increased need for network security specialists Development of comprehensive security policies and architectures Orange Book certified networking products Increased prevalence of CIRTs Continued Internet impacts The Ideal Campus Network

Cryptography Security

   

Cryptography – encryption/decryption Authentication Message Integrity Authentication

   

Key management Internet Security Firewalls VPNs Security and the Internet Model

   

Application layer – provide for each application protocol (other layers may be left vulnerable) Transport layer – difficult to change existing protocols Network layer – IPsec (additional security for IP) Data Link layer – does not provide end-to-end security Cryptography

  

Some media cannot be protected from unauthorized reception (or interception) Encryption involves transforming the original information into an unintelligible form Decryption is the process of reversing the encryption process in order to transform the message back into its original form  Plaintext - original message  Ciphertext – encrypted form Encryption/Decryption

Categories of Encryption/Decryption  Symmetric-key – encryption key (Ke) and the decryption key (Kd) are the same and secret

 



Character-level

Bit-level Public Key – encryption key is publicly known; decryption key is kept private



RSA Character-level Encryption



Substitutional



Monoalphabetic – simplest form; also called Caesar cipher

 Each character is replaced with another character in the set  Ke and Kd are the same and define the added or subtracted value  Can be broken easily; does not hide repetition 

Polyalphabetic – each occurrence can have a different substitute (ex. Vigenere)

 Based also on position of character in the text  Frequencies are not preserved; more difficult to break than monoalphabetic Substitutional Ciphers

Monoalphabetic Substitution

Polyalphabetic Substitution 

Transpositional – characters retain their plaintext form but change their positions to create ciphertext

 

Text is organized into a two-dimensional table and columns are interchanged according to a key

Character frequencies are still preserved, however Transpositional Encryption

Bit-Level Encryption



Data is divided into blocks of bits then altered by encoding/decoding, permutation, substitution, exclusive OR, rotation, and so on  Encoding/decoding – decoder changes an input of n bits into an output of 2n bits; encoder has 2n outputs and only n outputs



Permutation – transposition at the bit level

 Straight permutation – number of bits in input and output are preserved  Compressed permutation – number of bits is reduced  Expanded permutation – number of bits is increased  May be implemented in hardware circuitry to be performed very quickly (referred to as P-boxes)

Permutation

 Substitution – substitutes n bits by another n bits  Achieved using a combination of P-boxes, encoders and decoders

 Product – P-boxes and S-boxes are combined

 Exclusive OR – bit-level manipulation using exclusive-OR operations; reciprocal – same key is used with ciphertext at the receiver to recreate the original plaintext

 Rotation – rotate bits to right or left

Data Encryption Standard

   

Bit-level encryption method designed by IBM Adopted as standard for nonmilitary and nonclassified use Encrypts 64-bit plaintext using a 56-bit key Uses 19 different and complex procedures of transpositions, substitutions, swapping, exclusive ORs, and rotations to create a 64-bit ciphertext

DES

One Step in DES

Public-Key Cryptography

  

Every user has the same encryption algorithm and key Decryption algorithm and key are kept secret Anyone can encrypt using the public key, however only the intended receiver can decrypt using a private key Public Key Encryption

RSA Encryption

 

Public key encryption technique Encryption steps:

  

Encode data to be encrypted as a number to create the plaintext P Calculate the ciphertext C as C = PKp modulo N (Divide PKp by N and keep only the remainder)

Send C as the ciphertext  Decryption steps:  Receive C the ciphertext  Calculate plaintext P = CKs modulo N  Decode P to the original data  Choosing Kp, Ks, and N  Choose 2 prime numbers p and q (large # of digits – 200 or more)  Calculate N = p * q  Select Kp so that it is not a factor of (p -1)*(q -1)  Select Ks so that (Kp * Ks) modulo (p – 1)*(q -1) = 1 RSA Encryption and Decryption

Security & Reciprocity of RSA  Kp and N are issued publicly  Ks is kept secret  Since the snooper does not know p and q, they would first need to use N to first find p and q and then guess Ks  Since N is a few hundred digits long, it is very time consuming and difficult to deduce  Same secret key may be used to send a reply and the receiver may decrypt using its own private key

Security of RSA

Authentication

  

Verification of sender‘s identity Accomplished through a digital signature, which is based on public key encryption/decryption Uses reciprocity of RSA, however secret key is kept by the sender to ―sign‖ the transmission

UNIT I PART A (2 Marks) 1. What is mean by data communication? 2. What are the three criteria necessary for an effective and efficient network? 3. What are the three fundamental characteristics determine the effectiveness of the data communication system? 4. What are the advantages of distributed processing? 5. Why are protocols needed? 6. Why are standards needed? 7. For n devices in a network, what is the number of cable links required for a mesh and ring topology? 8. What is the difference between a passive and an active hub? 9. Distinguish between peer-to-peer relationship and a primary-secondary relationship. 10. Assume 6 devices are arranged in a mesh topology. How many cables are needed? How many ports are needed for each device? 11. Group the OSI layers by function. 12. What are header and trailers and how do they get added and removed? PART B 1. Explain ISO/OSI reference model. (16) 2. Explain the topologies of the network. (16) 3. Explain the categories of networks. (16) 4. Explain coaxial cable & fiber optics. (16) 5. Explain line coding (digital to digital conversion). (16) UNIT III NETWORK LAYER PART A (2 Marks) 1. What are the network support layers and the user support layers? 2. With a neat diagram explain the relationship of IEEE Project to the OSI model? 3. What are the functions of LLC? 4. What are the functions of MAC? 5. What is protocol data unit? 6. What are headers and trailers and how do they get added and removed? 7. What are the responsibilities of network layer? 8. What is a virtual circuit? 9. What are datagrams? 11. What is meant by switched virtual circuit? 12. What is meant by Permanent virtual circuit? 13. Define Routers. 14.What is meant by hop count? 15. How can the routing be classified? 16.What is time-to-live or packet lifetime? 17.What is meant by brouter? 18. Write the keys for understanding the distance vector routing. 19. Write the keys for understanding the link state routing.

20. How the packet cost referred in distance vector and link state routing? PART B 1. Explain the two approaches of packet switching techniques. (16) 2. Explain IP addressing method. (16) 3. Define routing & explain distance vector routing and link state routing. (16) 4. Define bridge and explain the type of bridges. (16) 5. Explain subnetting. (16) UNIT IV TRANSPORT LAYER PART A (2 Marks) 1. What is function of transport layer? 2. What are the duties of the transport layer? 3. What is the difference between network layer delivery and the transport layer delivery? 4. What are the four aspects related to the reliable delivery of data? 5. What is meant by segment? 6. What is meant by segmentation? 7. What is meant by Concatenation? 8. What are the types of multiplexing? 9. What are the two possible transport services? 10. The transport layer creates the connection between source and destination. What are the three events involved in the connection? 11. What is meant by congestion? 12. Why the congestion occurs in network? 13. What is meant by quality of service? 14. What are the two categories of QoS attributes? 15. List out the user related attributes? 16. What are the networks related attributes?

PART B 1. Explain the duties of transport layer. (16) 2. Explain socket in detail. (16) 3. Explain UDP & TCP. (16) 4. Explain about congestion control. (16) 5. Explain leaky bucket and token bucket algorithm. (16)

UNIT II DATA LINK LAYER PART A (2 Marks) 1.What are the responsibilities of data link layer? 2.Mention the types of errors. 3.Define the following terms. 4.What is redundancy? 5. List out the available detection methods. 6. Write short notes on VRC. 7. Write short notes on LRC. 8. Write short notes on CRC. 9. Write short notes on CRC generator. 10. Write short notes on CRC checker. 11. Give the essential properties for polynomial. 12. Define checksum. 13. What are the steps followed in checksum generator? 14. List out the steps followed is checksum checker side. 15. Write short notes on error correction. 16. Mention the types of error correcting methods. 17. What is the purpose of hamming code? 18. Define flow control. 19. What is a buffer? 20. Mention the categories of flow control.

PART B 1. Explain error detection and error correction techniques. (16) 2. Explain error control mechanism. (16) 3. Explain the flow control mechanism. (16) 4. Explain the timers and time registers in FDDI. (16) 5. Explain about Ethernet. (16)

UNIT – V APPLICATION LAYER PART A (2 Marks) 1. What is the purpose of Domain Name System? 2. Discuss the three main division of the domain name space. 3. Discuss the TCP connections needed in FTP. 4. Discuss the basic model of FTP. 5. What is the function of SMTP? 6. What is the difference between a user agent (UA) and a mail transfer agent (MTA)? 7. How does MIME enhance SMTP? 8. Why is an application such as POP needed for electronic messaging? 9. Give the format of HTTP request message. 10. Give the format of HTTP response message. 11. Write down the three types of WWW documents. 12. What is the purpose of HTML? 13. Define CGI. 14. Name four factors needed for a secure network. 15. How is a secret key different from public key? 16. What is a digital signature? 17. What are the advantages & disadvantages of public key encryption? 18. What are the advantages & disadvantages of secret key encryption? 19. Define permutation. 20. Define substitutional & transpositional encryption. PART B 1. Explain the functions of SMTP. (16) 2. Write short notes on FTP. (16) 3. Explain about HTTP. (16) 4. Explain the WWW in detail. (16) 5. Explain the type of encryption/decryption method. Conventional Methods: (16)

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close