internet architecture and protocol

43
Internet Architecture and Protocol Hayder Al-Ghanimi University of Babylon College of Information Technology Department of Software

Upload: others

Post on 01-Mar-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Internet Architecture and Protocol

Internet Architecture and Protocol

Hayder Al-Ghanimi

University of Babylon College of Information Technology

Department of Software

Page 2: Internet Architecture and Protocol

Protocols and layering

• Network protocols and software

• Layered protocol suites

• The OSI 7 layer model

• Common network design issues and solutions

Page 3: Internet Architecture and Protocol

What is a protocol

• A protocol is an agreement on how to communicate

• Includes – Syntax: how a communication is specified &

structured • Format, order messages are sent and received

• Semantics: what a communication means – Actions taken when transmitting, receiving, or when a

timer expires

– Timing: when and how long

Page 4: Internet Architecture and Protocol

Examples of Protocols in Human Interactions

• Telephone 1. (Pick up / open up the phone.) 2. Listen for a dial tone / see that you have service. 3. Dial. 4. Should hear ringing … 5. Callee: “Hello?” 6. Caller: “Hi, it’s Hayder….” Or: “Hi, it’s me” (¬ what’s that about?) 7. Caller: “Hey, do you think … blah blah blah …” pause 8. Callee: “Yeah, blah blah blah …” pause 9. Caller: Bye 10. Callee: Bye 11. Hang up

Page 5: Internet Architecture and Protocol

Examples of Protocols in Human Interactions

• Asking a question

1. Raise your hand.

2. Wait to be called on.

3. Or: wait for speaker to pause and vocalize

Page 6: Internet Architecture and Protocol

The need for protocols

• Basic communication hardware can transfer bits from one place to another

• Communication software provides a convenient high level interface for application programmers – do not have to deal directly with hardware

– can run over different hardware

• A set of rules for exchanging messages is a network protocol

Page 7: Internet Architecture and Protocol

Protocol suites

• Rather than having a single huge protocol, protocols tend to be structured as suites of specific protocols

– design and testing is easier

– extension and updating is easier

– selection and combination becomes possible

Page 8: Internet Architecture and Protocol

Layering

• The most common approach to designing protocol suites

• Each layer deals with a different level of abstraction and communicates with the layers above and below

Page 9: Internet Architecture and Protocol

Example - the OSI 7 layer model

• ISO model for standardising all networks

• Now 20 years old and woefully out of date

• Probably too complex

• However, still provides useful terminology and a good general example of layering

Page 10: Internet Architecture and Protocol

The 7 OSI layers

Page 11: Internet Architecture and Protocol

Conceptual path of data

Page 12: Internet Architecture and Protocol

Commercially available stacks

Page 13: Internet Architecture and Protocol

Multiple nested headers

• Each layer places information in a header before passing a packet to a lower layer and removes it before passing it to an upper layer

Page 14: Internet Architecture and Protocol

Layering principle

• Layer N software on the destination computer must receive exactly the message sent by layer N software on the sending computer

Page 15: Internet Architecture and Protocol
Page 16: Internet Architecture and Protocol

Common networking issues

• Sequencing for out-of-order delivery

• Sequencing to remove duplicate packets

• Re-transmitting lost packets

• Avoiding replay caused by excessive delay

• Flow control to prevent data overrun

• Mechanisms to avoid network congestion

Page 17: Internet Architecture and Protocol

Sequencing for out-of-order delivery

• Connectionless network with dynamic routing may deliver packets out of order

• Transport protocols solve this with sequencing • Each packet is given a sequence number • The receiver notes the number of the last

packet that arrived in sequence and stores additional out of order packets

• The packets are delivered in sequence to the next layer up

Page 18: Internet Architecture and Protocol

Sequencing to reject duplicates

• Malfunctioning hardware can produce multiple copies of a packet

• Sequence numbers allow duplicates to be detected and discarded

Page 19: Internet Architecture and Protocol

Re-transmitting lost packets

• Packet loss is a fundamental problem due to transmission errors

• One approach to reliable transmission involves positive acknowledgements – sender transmits and starts a timer

– receiver receives and acknowledges

– on time-out the sender transmits again

– the receiver must watch out for duplicates

Page 20: Internet Architecture and Protocol

Avoiding replay caused by delay

• A duplicate packet might turn up in a later session (e.g., if it was queued in a switch for a long time)

• May be confused with a packet from the later session that uses the same sequence number

• Solution is to include a session identifier in the packet

Page 21: Internet Architecture and Protocol

Flow control to prevent overrun

• Data overrun occurs when the sender sends faster than the receiver can receive

• Simple solution is to acknowledge each packet before sending the next (“stop and go”)

• However, this can be wasteful of bandwidth

Page 22: Internet Architecture and Protocol

Sliding window protocols

• Sender and receiver agree a window size (number of packets)

• Initially a whole window is sent

• After that, each packet is acknowledged and then another can be sent

Page 23: Internet Architecture and Protocol
Page 24: Internet Architecture and Protocol
Page 25: Internet Architecture and Protocol

Congestion

• Congestion arises due to too much traffic and/or bottlenecks in the network

• Limited storage in switches means that packets get dropped

Page 26: Internet Architecture and Protocol

Dealing with congestion

• Detecting congestion

– switches can inform senders

– packet loss can be used as a measure of congestion

Page 27: Internet Architecture and Protocol

OSI Model in Details

This is the second part of this lecture

• The model • Functions of the layers

Page 28: Internet Architecture and Protocol

7OSI

Page 29: Internet Architecture and Protocol

[ 1] PHYSICAL LAYER This is the second part of this lecture

Physical

Session

Transport

Network

Data Link

Presentation

Application

Page 30: Internet Architecture and Protocol

Goals of Physical Layer

• Service: move information between two systems connected by a physical link

• Interface: specifies how to send and receive bits

• Protocol: coding scheme used to represent a bit, voltage levels, duration of a bit

• Examples: coaxial cable, optical fiber links; transmitters, receivers

Page 31: Internet Architecture and Protocol
Page 32: Internet Architecture and Protocol

Goals of this lecture for Physical

• Explain how electric current can be used to transmit bits over short distances

• Present a popular mechanism (RS-232) for sending characters this way

• Introduce notions of baud rate and bandwidth

Page 33: Internet Architecture and Protocol

Asynchronous communication

• Where the receiver does not know when the sender will transmit – transmit when data is ready

– variable delays between transmissions

– no sender-receiver coordination beforehand

• E.g., keyboard connected to a computer

• Technically, the electrical signal does not contain information about where individual bits begin and end

Page 34: Internet Architecture and Protocol

Using electric current to send bits

• Use a wire to create a circuit between the sender and receiver

• Negative voltage on the wire could represent a 1 and positive a 0

• Waveform diagram shows variable delay

Page 35: Internet Architecture and Protocol

The RS-232 standard

• To connect keyboards, terminals etc. to computers over copper wire

• Is concerned with 7-bit characters

• Electrical details (voltages)

• Serial communication

• Asynchronous (for each character)

Page 36: Internet Architecture and Protocol

RS-232 continued

• Never leaves 0 volts on the wire - an idle line is the same as a 1 bit

• Sender and receiver agree how long a bit lasts - receiver uses a local timer

• A 0 start bit signifies the start of a character and is followed by 7 data bits

• A minimum gap of 1 bit between characters (a phantom stop bit of 1)

Page 37: Internet Architecture and Protocol

Example RS-232 waveform

Page 38: Internet Architecture and Protocol

Baud rate

• Transmission hardware is rated in baud - the number of signals that are generated per second

• The baud rate need not be the same as the bit rate, it depends on how many levels of signal are used

• With RS-232 they are the same

Page 39: Internet Architecture and Protocol

Agreeing the Baud rate

• Sender and receiver agree on length of time each bit is held => maximum number of bits per second (e.g., 300, 9600, 19200)

• RS-232 may often have a configurable baud rate (manually or by software)

Page 40: Internet Architecture and Protocol

Framing errors

• Might occur if the sender and receiver are set to different baud rates

• Receiver samples the signal several times for each bit to check for differences (framing errors)

• Used by the break key to send an abort signal

Page 41: Internet Architecture and Protocol

Full duplex communication

• Two wires required to carry information in one direction (return is a ground)

• Full duplex is two way communication and needs 3 wires - ground is shared

Page 42: Internet Architecture and Protocol

Hardware bandwidth

• Hardware cannot change signals instantly => maximum speed at which bits can be sent

• Bandwidth - maximum frequency of signal that a transmission medium can carry

• Measured in cycles per sec = Hertz (Hz)

• Every system (electronic and biological) has a limited bandwidth

Page 43: Internet Architecture and Protocol

Bitrate, Baudrate and Bandwidth

• Bitrate – how many bits per second are being sent

• Baudrate – how many signals per second are used to send those bits

• Bandwidth – the number of signals per second that a medium can accommodate