Top Banner
Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing Marker is a sequence of six 1’s To ensure six 1’s do not appear in the data, the transmitter adds an extra 0 after five consecutive 1’s Receiver knows if the next bit after five consecutive 1’s is a 0, the 0 should be removed and ignored If the next bit is a 1, it is the beginning or end of a packet
32

Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Packet Boundary Markers• There are various techniques to mark the

beginning/end of a packet• Bit stuffing

– Marker is a sequence of six 1’s– To ensure six 1’s do not appear in the data, the

transmitter adds an extra 0 after five consecutive 1’s

– Receiver knows if the next bit after five consecutive 1’s is a 0, the 0 should be removed and ignored

– If the next bit is a 1, it is the beginning or end of a packet

Page 2: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Packet Headers and Trailers

The sending node adds envelopes (headers and trailers) to packets as the packets are passed downwards from layer to layer

Page 3: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Envelopes

ApplicationApplication

PresentationPresentation

SessionSession

TransportTransport

NetworkNetwork

Data LinkData Link

PhysicalPhysical

SH

TH SH

NH TH SH

DH NH TH SH

DH NH TH SH

SH

TH SH

NH TH SH

DH NH TH SH

DH NH TH SH

Page 4: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

SDUs and PDUs

• Each sending unit layer communicates with its peer receiving unit layer through a Protocol Data Unit (PDU)

• When layer n+1 passes information to layer n for transmission, the information is known as a Service Data Unit (SDU)

Page 5: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Connectionless Protocol

Layer n – 1 offers two functions:

• Sender accepts packets for transmission from layer n

• Receiver delivers packets to layer n

Page 6: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Connection-Oriented Protocol

• A connection must be established before data can be transferred– The connection is set up

– Data is transferred (sender) or received (receiver)

– The connection is terminated

• Either layer n requests connection/release to/from some destination address (sender) or layer n–1 informs layer n that the layer n process in the sending node requests connection/release

Page 7: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Types of Services

• Datagram (best-effort) – Accepts data but makes no guarantee of delivery. Data can be lost, duplicated, out of sequence, or mangled

• Reliable – Service either guarantees or claims data will be delivered in order, without corruption, mangling or loss

Page 8: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Service Protocols

connection oriented

connectionless

datagram ATM IP, IPX DECnet

reliable X.25

Page 9: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Reliable Service

• Reliability comes at a cost. Layer n–1 is more costly and less efficient

• Reliability may be provided at more than one layer, but it need not be provided at every layer

Page 10: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Some Alternatives• Two types of data link layer Logical link

Control (LLC) are offered over LANs– LLC Type 1 – is a connectionless

datagram service– LLC Type 2 – is a reliable connection

oriented service

• ISO defines two network layers:– Connection-Oriented Network Service

(CONS) – Connectionless Network Service (CLNS)

Page 11: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

TCP/IP

• IP is connectionless

• There are two transport layer protocols:– Transmission Control Protocol (TCP) – is

reliable connection-oriented service– User Datagram Protocol (UDP) – is

datagram service

Page 12: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Important Network Properties

Page 13: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Scope

• Solve as general of a problem as possible

• Support a wide range of applications, broad spectrum of applications and many underlying technologies

Page 14: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Scalability

• Work well as a large network and be efficient as a small network

• Nowadays, large means millions or even trillions of nodes

Page 15: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Autoconfigurability

Networks must run themselves instead of relying on constant complex and costly human tweaking

Page 16: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Tweakability

• Networks that come with reasonable defaults should be autoconfiguring

• They should incorporate times and other parameters that network managers can play with to optimize performance for specific conditions

Page 17: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Determinism

• Identical conditions should yield identical results

• Routes should be identical givin identical physical topologies

• If networks are not deterministic, routes might differ depending on the order nodes are brought up in the network

• Not everyone feels determinism is worth the price

Page 18: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Migration

• A network design will not last forever• It is important to design network protocols so

that new features can be added to nodes one at a time without disrupting current operations

• It is important to be able to make modification, such as address changes, in a node-by-node fashion without disrupting network operations

Page 19: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Robustness

• Continue to operate even when nodes or links fail

• Network algorithm should adapt to changes in topology

• Undetected data errors can cause undetected corruption. Defective implementations can attach to the network and cause unpredictable behavior

• Humans (notoriously unreliable components of the system) frequently misconfigure things

Page 20: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Types of Robostness

Page 21: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Safety Barriers• A design where a fault does not spread

beyond a safety barrier• Corruption is confined to only a portion of the

network• For example, broadcast storm is a severe

congestion event. With IP, a broadcast storm on one LAN can incapacitate another LAN connected by a bridge, but the storm would be not be spread to the second LAN if the two LANs are connected by a router.

• Network can also be partitioned into areas or domains

Page 22: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Self Stabilization• After any sort of database corruption, the network will

return to normal operation without human intervention• Advanced Research Projects Agency Network

(ARPANET) was not self-stabilizing• Self stabilization does not guarantee network will

function properly with an offending device, but it will return to normal when the device is removed

• Turning the power on and off (power cycling) will often works as an instant repair, but networks don’t have on/off switches

• The network is not self-stabilizing if a saboteur can insert a few bad packets and bring the network down forever or until costly human intervention occurs

• If the saboteur must constantly insert destabilizing packets, he will be caught.

Page 23: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Fault Detection

• It is desirable for a network to diagnose itself, identifying faulty equipment

• Networks vary greatly in their fault detection capabilities

Page 24: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Byzantine Robustness

• The term Byzantine failure is taken from a famous computer science problem know as the Byzantine general’s problem

• Node failure not because it ceases operation, but rather because of defective operation, i.e., hardware fault or sabotage.

• Byzantine robustness is when nodes continue to function properly in the face of Byzantine failures

Page 25: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Simple Protocol – No ErrorsTransmitter Receiver

100

ack

0f

ack

rom

ack

etc

Assume packets can store only 3 characters

Page 26: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Detecting a Lost Ack

• Implement timer at sender• If timer is too small, packets will be needlessly

retransmitted– Transmitting packets needlessly adds processing

burden on the recipient– Recipient is already too overloaded to return ack in

time

• If timer is too large, throughput will decrease after packet loss because packet retransmission is delayed

Page 27: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Simple protocol – Lost AckTransmitter Receiver

100

XXX ack gets lost

100``

ack

0f

ack

rom

ack

etc

Page 28: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Packet Timeout Problem

If packet is not really lost, 1000 transmitted by sender could be received as 1001000

Page 29: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Adding Packet Numbers

Transmitter Receiver

100 (#1)

XXX ack (#1) gets lost

100 (#1)

ack (#1)

0f (#2)

ack (#2)

rom (#3)

ack (#3)

etc

Page 30: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Packet Numbering

• It would be nice to have unlimited size for packet numbers

• However, that would waste space• Packet numbers are usually limited to some

maximum size that wraps around• Assume packet numbers are represented by 3 bits

(in real protocols the number would be much larger)

• Packet numbers are 0,1,2,3,4,5,6,7

Page 31: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Packet Numbering Problems• Transmit 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3

– If all packets after the first 4 are lost– Receiver could send ack #3 and sender and receiver

would assume all packets arrived properly

• Transmit 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3– If the packets are permuted into a random order with

datagram service– which packet 2 arrives first?

• Transmit 0, 1, 2, 3, 4, 5, 6, 7– If ack (#7) is sent but gets lost in transit– The transmitter resends all packets which are accepted

as new data by the receiver

Page 32: Packet Boundary Markers There are various techniques to mark the beginning/end of a packet Bit stuffing –Marker is a sequence of six 1’s –To ensure six.

Packet Ordering Solutions• Design window sizes carefully• Packet number size should be large enough so that

packet number cannot wrap around in the worst-case delay time

• For example, if it is conceivable that a network could delay a packet by 15 sec, it must not be possible for a transmitter (at maximum speed) to transmit enough packets so that the packet number will wrap around in 15 secs

• Window size should be no larger than half the packet number