800 likes | 960 Views
FIT1005 FIT – Monash University Topic 10 Protocol Concepts and Internet Protocol Reference: Chapter 18 – Stallings 7E. Protocol Concepts. Stallings Ch18 7E, Ch 2 6E, Ch 15 5E Forouzan Ch 3 7E ENTITY - anything capable of sending or receiving information:
E N D
FIT1005 FIT – Monash University Topic 10 Protocol Concepts and Internet Protocol Reference: Chapter 18 – Stallings 7E
Protocol Concepts Stallings Ch18 7E, Ch 2 6E, Ch 15 5E Forouzan Ch 3 7E • ENTITY - anything capable of sending or receiving information: • application program • file transfer package • DBMS - Client/Server • Email package • terminal etc • SYSTEM - a physically distinct object that contains one or more entities: programs, computers, terminals, remote sensors etc • COEXTENSIVE - In some cases entity and system in which it resides are one and the same: terminal, smoke detector
Entity Communication • For two entities to successfully communicate they must speak the same language. • The entities must agree on What is to be communicated How it is to be communicated When it is to be communicated • TheWhat, the How, and the When must conform to some mutually acceptable set of conventions governing the exchange of data between the entities: THE PROTOCOL
Elements of a Protocol • SYNTAX - the structure of the information communicated: eg The HDLC protocol (operates at Data Link Layer) requires that data be exchanged in frames of a specific format Stallings fig 7.7 7E, 7.10 6E, 6.10 5E • SEMANTICS - the meaning of control info, exchanged to support regulatory functions such as connection establishment and error handling: eg The HDLC protocol uses a control field in the frame to provide a variety of regulatory functions - Stallings Table 7.1 7E/6E, 6.1 5E • TIMING - Is concerned with Flow Control and the Sequencing of data.
Frame Format Fig 7.7 - HDLC
Control Field Format Fig 7.7 - HDLC
Protocol Functions • Fragmentation and Reassembly • Encapsulation and Delineation of Data • Connection Control • Ordered Delivery • Flow Control • Error Control • Addressing • Multiplexing • Transmission Services
Protocol Functions • Not all protocols have all functions; this would involve a significant duplication of effort • However, there are situations where the same type of function is present in protocols at different levels/layers in the network architecture
Fragmentation and Reassembly Fragmentation - Stallings fig 2.4 7E • Whether an Application Entity sends data in Messages or in a Continuous stream, lower level protocols may need to break the data up into blocks of some smaller bounded size - Protocol Data Units (PDUs) • The communication network may only accept blocks of data up to a certain size: ATM - fixed 53bytes, IEEE 802.3 - up to 1526 bytes, IP up to 64Kbytes • Advantages: • Error control more efficient • More equitable access to shared transmission media • Receiving entity can allocate smaller buffers
Fragmentation and Reassembly • Disadvantages: • Increased % of Control Info • PDU arrival may generate an interrupt that must be serviced; smaller blocks results in more interrupts • More time is spent processing smaller, more numerous, PDUs Reassembly • PDUs need to be reassembled into messages at receiver
Fragmentation and Reassembly Fig 2.4 – Protocols Data Units
Encapsulation and Delineation Encapsulation - Stallings fig 7.7 7E • The process by which control information (to support the protocol) is added to the data to form the PDU • Control information includes: • Address: eg source / destination • Error detecting code: eg CRC • Protocol control: to implement protocol’s supervisory functions • Flags: to delimit PDU, indicating when it starts and ends
Encapsulation and Delineation Delineation • The Protocol must enable entities to determine what is: • Control information • Data in the PDU, this can be done • By position within PDU eg HDLC • By use of specific bit patternseg BISYN
Connection Control - Connectionless Data Transfer • Entity may transmit data to another entity in an unplanned fashion and without prior coordination. • Each PDU that makes up the message is treated as an independent unit. • Postal Service - Imagine a 3 page letter, each page placed in a separate envelope and posted: • A page may not arrive • Pages may arrive in wrong order • The destination entity may not exist • IP via datagrams, at Network layer provide a Connectionless Data Transfer service
Connection Control - Connection Oriented • Stallings fig 18.1 7E, 2.3 6E, 15.3 5E • Is preferred if entities anticipate a lengthy exchange of data and / or certain details of their protocol must be negotiated dynamically • A logical connection is established between the entities • Telephone Service - three phases: • Connection Establishment • Does the entity exist ? • Does the entity agree to exchange data ? • Negotiate on optional protocol features to be implemented • Data Transfer: Data and acknowledgments • Connection Termination • Either side ‘may’ terminate the connection • TCP via segments, at Transport layer, provides a Connection Oriented Transfer service
Connection Oriented • In many connection-oriented data transfer protocols is that sequencing is used: • Each side sequentially numbers the PDUs that it sends to the other side • As each side remembers that it is engaged in a logical connection, it can keep track of both outgoing numbers, which it generates, and incoming numbers, which are generated by the other side • Sequencing is necessary to support: • Ordered delivery, flow control, and error control
Ordered Delivery • PDUs sent between two entities may traverse different paths thru the network • There is a risk the PDUs will not arrive in the order in which they are sent • To ensure Ordered Delivery each PDU could be given a unique number, the numbers are assigned sequentially • With a finite sequence number field, sequence numbers repeat • The maximum sequence number must be greater than the maximum number of PDUs that could be outstanding at any time
Ordered Delivery • TCP (segments), at transport layer, provides this function, on a logical end-to-end link, between source and destination entity • IP (datagrams), at network layer, does not provide this function • HDLC (frames), at data link layer, provides this function on each hop (a point-to-point link), on the path through a WAN to the destination
Flow Control • A function performed by receiving Entity to limit amount / rate of data that is sent by the sending Entity • This is to ensure receiving Entity’s buffer does not overflow • Stop and Wait - send one PDU at a time • Source sends a PDU, then must ‘stop and wait’ for an ACK from the destination, before it can send the next PDU • Sliding Window - send several PDUs at a time • Source can send a number of PDUs, up to a maximum Window Size, before it must ‘stop and wait’ for an ACK from the destination
Flow Control • TCP uses a sliding window technique based on a Credit Allocation Scheme, in terms of the number of octets (bytes) that will be accepted by the receiver, before the sender must stop transmitting • IP does not provide this function • HDLC uses a sliding window technique based number of frames that will be accepted by the receiver
Flow Control Refer fig 2.3 Stallings 7E • May need to be implement in protocols at different layers in the network architecture • The network will need to exercise flow control over X via network access protocol, to enforce network traffic control • If Y’s network access module has only limited buffer space it needs to exercise flow control over X’s network access module via the transport protocol • Even though Y’s network access module can control its data flow, Y’s application may be vulnerable to overflow • The application may be hung up waiting for disk access • Thus flow control is also needed over the application protocol
Error Control • Needed to guard against loss or damage of data and control information Detection • Protocol needs to provide a technique that can detected errors in a PDU eg parity, CRC Correction • Once an error is detected in a PDU, how is it corrected: • Feedback Error Correction eg HDLC: Go-Back-N, Selective Reject • Forward Error Correction eg Hamming Single Bit Code
Error Control • Error control may need to be performed at various layers: • The network access protocol should include error control to assure that data are successfully exchanged between station and network • However, a packet of data may be lost inside the network, and the transport protocol should be able to recover from this loss
Addressing • Addressing Level • Network Level • Application Level • Network Attachment Point • Addressing Scope • Local • Global • Connection Identifier (Name) • Addressing Mode • Unicast • Multicast • Broadcast
Addressing Level • Refers to the level in the communications architecture at which an entity is named Network Level Address • A unique address is associated with each end system (e.g., workstation or server) and each intermediate system (e.g., router) • In TCP/IP architecture, this is known as an IP address • In OSI architecture, this is referred to as a network service access point (NSAP) • It is used to route a PDU through a network or networks to a system indicated by a network level address in the PDU
Addressing Fig 18.2 – TCP/IP Concepts
Addressing Level Application Level Address • Once data arrive at a destination system, they must be routed to some application in a system • A system will support multiple applications • Each application is assigned a unique identifier: • TCP/IP architecture – port number • OSI architecture - service access point (SAP)
Addressing Level Network Attachment Point • Each network must maintain a unique address for each device interface on the network • Example, each device (PC, printer) on an IEEE 802.3 local area network has a MAC (Media Access Control) address • This address enables data units (MAC frames) to be forwarded through the LAN and delivered to the intended attached device
Addressing Scope Local - Address Standard - the MAC address • the name (address) by which an entity is identified within its own system • As the system may want to enforce its own local naming (addressing) conventions • The MAC address is a local address that is unique within the LAN
Addressing Scope Global- Address Standard - the IP address • The name (address) by which an entity is known outside its own system • As no entity/system can be expected to deal with a variety of naming (addressing) conventions, hence global standard • Non-ambiguity: a global address identifies a unique system • Global applicability: the address can be identified by all other systems
Connection identifiers • The concept of connection identifiers comes into play when we consider connection-oriented data transfer (e.g., virtual circuit) rather than connectionless data transfer • For connectionless data transfer, a global identifier is used with each data transmission • For connection-oriented transfer, it is sometimes desirable to use only a connection identifier during data transfer phase
Addressing mode • Unicast address: the address refers to a single system or port • Multicast address: such an address identifies a specific subset of entities within the network to which data will be sent • Broadcast address: data is intended for all entities within a network • Multiplexing • One form of multiplexing is supported by means of multiple connections into a single system
Multiplexing • Multiple Connections into a single system • multiple data link connections terminating in a single end system • these data link connections are multiplexed over the single physical interface between the end system and the network • Multiple simultaneous connections • there can be multiple TCP connections terminating in a given system, each connection supporting a different pair of ports
Multiplexing • Multiplexing can be used in on of two directions • Upward multiplexing, occurs when multiple higher-level connections are multiplexed on, or share, a single lower-level connection • Downward multiplexing, means that a single higher-level connection is built on top of multiple lower-level connections, the traffic on the higher connection being divided among the various lower connections
Transmission Services • A protocol may provide a variety of additional services to the entities that use it • Common examples: • Priority • Certain messages, such as control messages, may need to get through to the destination entity with minimum delay • Thus, priority could be assigned on a message basis, or on a connection basis • Quality of service • Certain classes of data may require a minimum throughput or a maximum delay threshold • Security • Security mechanisms, restricting access, may be invoked
Principles of Internetworking • Packet-switching networks grew out of a need to allow the computer user to have access to resources beyond that available in a single system • Resources of a single network are often inadequate to meet user’s needs • As the networks that might be of interest exhibit so many differences, it is impractical to consider merging them into a single network • Need the ability to interconnect various networks so that any two stations on any of the constituent networks can communicate
Principles of Internetworking • An interconnectedset of networks, from a user’s point of view, may appear simply a large network • If each of the constituent networks retain its identity and special mechanisms are for communicating across multiple networks, then the entire configuration is often referred to as an internet • Each constituent network in an internet supports communication among the devices attached to the network • These devices are referred to as end systems (ES)
Principles of Internetworking • Networks are connected by devices referred to as intermediate nodes (IS) • ISs provide a communications path and perform the necessary relaying and routing functions so that data can be exchanged between devices attached to different networks in the internet • Two types of ISs of particular interest: • A bridge operates at layer 2 of the OSI Model and acts as a relay of frames between similar networks • A router operates at layer 3 and routes datagrams between potentially different networks
Principles of Internetworking • An internetworking facility must provide the following: • A link between networks • At minimum, a physical and link control connection is needed • Routing and delivery of data between processes on different networks • An accounting service that keeps track of the use of various networks and routers and maintains status information • These should be provided in such a way as not to require modifications to the networking architecture of any of the constituent networks
Principles of Internetworking The internetworking facility must accommodate a number of differences among networks in: • Addressing schemes • Maximum PDU size • Network access mechanisms • Timeouts • Error recovery • Status Reporting • Routing techniques • User access control • Connection control
Principles of Internetworking • Addressing schemes • The networks may use different endpoint names and address and directory maintenance schemes • Some form of global network addressing must be provided, as well as a directory service • Maximum PDU size • PDUs from one network may have to be broken up into smaller pieces for another network
Principles of Internetworking • Network access mechanisms • The network access mechanism between station and network may be different for stations on different networks • Timeouts • Typically, a connection-oriented transport service will await an acknowledgment until a timeout expires, at which it will retransmit its block of data • In general, longer times are required for successful delivery across multiple networks • Internetwork timing procedures must allow successful transmission that avoids unnecessary retransmissions
Principles of Internetworking • Error recovery • Network procedures may provide anything from no error recovery up to reliable end-to-end (within the network) service • The internetwork service should not depend on nor be interfered with by nature of the individual network’s error recovery capability • Status reporting • Different networks report status and performance differently • It must be possible for the internetworking facility to provide such information on internetworking activity to interested and authorised processes
Principles of Internetworking • Routing techniques • Internetwork routing may depend on fault detection and congestion control techniques peculiar to each network • The internetworking facility must be able to coordinate these to route data adaptively between stations on different networks • User access control • Each network will have its own user access control technique • These must be invoked by the internetwork facility as needed • Further, a separate internetwork access control technique may be required
Principles of Internetworking • Connection control • Individual networks may provide connection-oriented or connectionless service • It may be desirable for the internetwork service not to depend on the nature of the connection service of the individual networks
Internet Architecture – Connection Control • Connection-oriented operation • Connectionless operation
Internet Architecture - Connection-oriented operation • It is assumed that each network provides a connection-oriented form of service • That is, it is possible to establish a logical network connection between any two end systems attached to the same network • ISs are used to connect two or more networks • Each IS appears as an ES to each of the network to which it is attached