Computer Networks & Security

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 528

Information message

Sender Receiver
Hosts
LAN 3 Router
Subnet

LAN 1

LAN 2
LAN 4
Tinterface
HOST A HOST B
Layer 5 protocol
Layer 5 Layer 5

Layer 4/5 interface


Layer 4 protocol
Layer 4 Layer 4

Layer 3/4 interface


Layer 3 protocol
Layer 3 Layer 3

Layer 2/3 interface


Layer 2 protocol
Layer 2 Layer 2

Layer 1/2 interface


Layer 1 protocol
Layer 1 Layer 1

Physical medium
Layer N + 1
IDU

ICI
PCI SDU

PDU ICI

Layer N
IDU

Layer N – 1

SDU

ICI

Etc.
Transmitting Receiving
Header 1 Data Header 1 Data

Header 1 Data N + 1 Layer Header 1 Data

Header 2 Header 1 Data Header 2 Header 1 Data

Header 2 Header 1 Data N Layer Header 2 Header 1 Data

Header 3 Header 2 Header 1 Data Header 3 Header 2 Header 1 Data

Header 3 Header 2 Header 1 Data N – 1 Header 3 Header 2 Header 1 Data


Layer

Transmission medium
Connectionless Idle - No connection Connection-oriented Idle - No connection

Data transfer Connection established

Idle - No connection Data transfer

Connection release

Idle - No connection
End host End host
Protocol
APDU 7 Application Application

Protocol
PPDU 6 Presentation Presentation
Protocol
SPDU 5 Session Session
Protocol
TPDU 4 Transport Transport

Packet 3 Network Network Network Network

Frame 2 Data link DLL DLL Data links

Bit 1 Physical Physical Physical Physical

Internal protocol
From data link layer To data link layer

Node - 1 Node - 2

Physical
Physical Bit stream Bit stream Physical
layer medium layer
From network layer To network layer

Frame Frame
Data link Header 2 Data Trailer Header 2 Data Trailer Data link
layer layer

To physical layer From physical layer

Node 1 Node 2
From transport layer To transport layer

Packet Packet
Header 3 Data Network Header 3 Data
layer

To data link layer From data link layer

Node-1 Node-2

From application layer To application layer

Segments Segments

Header 4 Data H4 Data Network Header 4 Data Data


layer

To network layer From network layer


DLL DLL
Physical Physical
From presentation layer To presentation layer

Data Data

Header 5 Synch Synch Header 5 Synch Synch

Session layer Session layer

To transport layer From transport layer

Network layer Network layer

DLL DLL

Physical layer Physical layer


From application layer To application layer

Data L7 Data L7

Presentation
layer

Encoded, encrypted Decoded, decrypted


Header 6 and compressed data Header 6 and decompressed data

Data L6 Data L6

To session layer From session layer


Application layer

Transport layer

Internet layer

Host to network
Application layer
Telnet FTP SMTP DNS

TCP UDP Transport layer

IP Internet layer

LAN X.25 Packet radio Host to network layer


I
Application layer Specific
Process
addresses

Transport layer TCP, UDP, SCTP Port


address

Network layer IP, ARP Logical


address

Data link layer


Physical Physical
Physical layer network address
Destination address does
not match, data packets are dropped.
Sender
27 36 45 18

Data Trailer Data

18 27 Data 18 27 Data

Destination
address Source
address
Server Node Node

Terminator

T-Connection

Node Node
Node

Server Node

Switch

Node
Server

Node Node

Data
flow
Node Node

Node
Server

Server Node Node Node Node

Bus

Node Node

Node Node

Node
Copper
Plastic conductor
Colour-code
encasement
insulation
Color-code
insulation

Copper
conductor
Shielding

Plastic
encasement
Wire mesh Protective
Insulating conductor plastic covering
Copper material
core
Wireless communication Light wave

Radio wave and microwave Infrared

3 300 400 900


kHz GHz THz THz
Frequency
IF RF
Voice
Multiplexer Modulator Up-converter Transmitting
data
antenna
video

(a) Microwave transmitter


Receiving
antenna

RF IF
Down Voice
Demodulator Demultiplexer data
converter
video

(b) Microwave receiver


giga =
Hub
Dedicated
print server Printer
Dedicated
print server Printer

hp

hp

hp

hp

Dedicated Printer
print server

LED Port
hub
Computer

Cable
Computer
Computer
Hub

Hub Hub

hp hp hp hp hp hp hp hp
hp hp hp hp
2
hp hp hp hp

1
Bridge

LAN 1 LAN 2
Station Station

LLC Bridge LLC

MAC MAC
MAC
PHY PHY PHY PHY

PORT-1 PORT-2

LAN A LAN B
hp hp

Network Router Network

WinNT

Netware
Gateway
hp hp hp

Repeater

hp hp
hp

Application Application

Presentation Presentation

Session Session

Transport Transport

Network Network

Data link Data link

Physical Physical

Physical
Repeater
hp hp hp hp hp

Network Network
A Bridge B
hp hp hp hp hp

Application Application

Presentation Presentation

Session Session

Transport Transport

Network Network

Data link Data link


Bridge
Physical Data links Physical

Physical Physical

Application Application

Presentation Presentation

Session Session

Transport Transport

Network Router Network

Data link
Network Data link
DLL DLL
Physical Physical
Physical
Physical
Gateway
7 Application Application 7 7 Application
Presenta-
6 Presentation 6 6 Presentation
tion
5 Session Session 5 5 Session

4 Transport Transport 4 4 Transport

3 Network Network 3 3 Network

Data link DLL 2 Data link


2 2
Physical 1
1 Physical 1 Physical

MAC Port No.

Refers

Switching table

Source Source
Hub Switch
A

B
Access point

hp

100110101 1 0 0 1 1 0 1 0 1
Line coding
Bit stream
V

1 0 0 1 0 1 Signal level = 2
Data level = 2
t

1 0 1 0 0 1 Signal level = 3
Data level = 2
t

With D.C. component


t

Without D.C. component


t
Line Coding Schemes

Unipolar Polar Bipolar

0 1 1 0 1 0 1 1

t
Polar encoding

NRZ RZ Manchester Differential


manchester
1 0 1 0 1 1 1 0 0
Unipolar
NRZ

Polar NRZ

NRZ-inverted
(Differential
encoding)

Bipolar
encoding

Manchester
encoding

Differential
Manchester
encoding
1 0 1 1 0 0 0 1 1 1 0
Unipolar RZ
T 2T 3T 4T 5T 6T 7T 8T 9T 10T 11T

Polar NRZ

Bipolar (AMI)

Manchester (Bi-phase)

1 1 0 0 1 0 0 1 1 1
AMI

Manchester

Polar
NRZ
1 1 1 0 0 1 0 1

Unipolar
NRZ

Polar
NRZ

Polar
RZ

Manchester

Bipolar
NRZ
B Bss

Original Spreading Spreaded


signal signal

Spreading B-Bandwidth of source signal


code Bss- Bandwidth of spreaded signal
Original signal Modulator Spreaded signal

Frequency
synthesizer

Psendo
random
code
generator

k-bit patterns

000 001 010 011 100 101 110 111 k-bit Frequency

000 100 kHz


001 200 kHz Hop
frequency
010 300 kHz
011 400 kHz
100 500 kHz
101 600 kHz
110 700 kHz
111 800 kHz

Frequency table
800 kHz
700 kHz
600 kHz
Carrier 500 kHz
frequencies
kHz 400 kHz
300 kHz
200 kHz
100 kHz

1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Hop
Cycle-1 Cycle-2 periods

Original Modulator Spread signal


signal

Chip generator
Packet

LLC Packet

MAC LLC Packet MAC

To network
Data from upper layer

Variable number of characters

Flag Header Trailer Flag

Data from
Flag ESC
upper layer

Frame Flag Flag Flag


Header ESC ESC ESC Trailer
sent

Extra 2
bytes

Frame Flag Flag Flag


Header ESC ESC ESC Trailer
received

Unstuffed

Data to upper
Flag ESC
layer
Data 0 1 1 0 - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0

After bit stuffing 0 1 1 0 - 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0

Stuffed bits
7-bit data
D7 D6 D5 D4 D3 D2 D1 D0

Parity bit
Encoder Decoder
User User
Data Data
Correct or discard

Code generator Code checker

Data and redundancy Received data

Sender side Physical medium Receiver side


Addition

0 0 1 1
+ 0 + 1 + 0 + 1
__ __ __ __
0 1 1 0
Subtraction
0 0 1 1
– 0 – 1 – 0 – 1
__ __ __ __
0 0 1 0

K bits K bits K bits

(a) Datawords

n bits n bits n bits n bits

(b) Codewords
User data Original data

Encoder Decoder
Dataword K bits Dataword K bits

Extract
Codeword Codeword
generator checker Discard
n bits
Codeword Codeword n bits

Sender Physical medium Receiver

User data Original data

Encoder Decoder
Dataword K bits Dataword K bits

Correct
Codeword Codeword
generator checker
n bits
Codeword Codeword n bits

Sender Receiver
Physical medium
bi Pi
bi
1 0 0 1 0 1 0 Quotient
1 1 0 0 1) 1 1 0 1 0 1 1 0 0 0 0 Dividend
Divisor 1 1 0 0 1
0 0 1 1 1
0 0 0 0 0
0 1 1 1 1
0 0 0 0 0

1 1 1 1 0
1 1 0 0 1
0 1 1 1 0
0 0 0 0 0
1 1 1 0 0
1 1 0 0 1
0 1 0 1 0
0 0 0 0 0
1 0 1 0 Remainder

B(x) = 1 1 0 1 0 1 1 0 0 0 bit string B


R(x) = 1 0 1 0 bit string R

T(x) = 1 1 0 1 0 1 1 1 0 1 0 bit string T

b n –1 b n– 2 b n– 3

b n– 1 x n– 1 b n– 2 x n– 2 b n– 3 x n– 3 ... b 2 x2 b 1x b0
x 10 x7 x5 x3 x2 x1

x 10 x9 x7 x5 x4

6 3
x +x +x
4
x +x +1
3
)x 10 9
+x +
7
x
5
+x +x
4

10 9 6
x +x +x
7 6 5 4
x +x +x +x
7 6 3
x +x +x
5 4 3
x +x +x
5 4
x +x +x
3
+x +x
Received codeword c(x) e(x)
g(x) g(x) g(x)

x4 x2 1
Remainder

Codeword

Remainder
Remainder
remainder is not zero, hence ERROR
x3 x 1

Remainder

2 nd
Sender Receiver

Deliver
Network Get data
data

Data
link

Physical Send Receive


frame frame
Data frames

Event : Request from Event : Notification from


network layer physical layer
Sender Receiver

A B

Request
Frame 1
Arrival
Request
Frame 2
Arrival
Request
Frame 3
Arrival

Time Time
t out

Sender Receiver

Deliver
Network Get data data Network

Data Data
link link

Receive Send Receive Send


Physical Physical
frame frame frame frame
Data frame

ACK
frame
Sender Receiver

A B

Request
Frame
Arrival
Arrival ACK

Request
Frame
Arrival
Arrival ACK

Time Time
Frames already Window of frames that may
transmitted be transmitted

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6

Frame Last frame


sequence transmitted
number
Window shrinks as Window expands as
frames are sent acknowledgements are
received

Window of frames that are


Frames already received accepted by receiver

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6

Last frame
acknowledged
Window shrinks as Window expands as
frames are received acknowledgements are
sent
Sn Next frame Rn Next frame
to send to receive

0 1 0 1 0 0 1 0 1 0
Sender Receiver
Data frame
Deliver
Network Get data data Network
seqNo ackNo
Data link Data link

Receive Send Receive Send


Physical Physical
frame frame frame frame
Data frames

Sender Receiver

Frame 0

ACK 1

Frame 1

ACK 0

Time Time
Sender Receiver

Frame 0
ACK 1
Frame 1
Lost
frame Lost frame
Frame 1
Retransmitted ACK 0
frame

Time Time

Sender Receiver

Frame 0
ACK 1
Frame 1
ACK 0
Lost ACK Lost ACK
Frame 1
Retransmitted ACK 0
frame

Time Time
Sender Receiver

Frame 0
ACK 1 Delayed ACK 1
Frame 0 Discared frame
Frame
1
ACK 0
Discard ACK
Frame 1
ACK 0

Time Time
2k 1
Window

Before
sliding 6 7 0 1 2 3 4 5 6 7 0 1

Window

After
sliding 6 7 0 1 2 3 4 5 6 7 0 1
one frame

Window size = 7

6 7 0 1 2 3 4 5 6 7 0

6 7 0 1 2 3 4 5 6 7 0

SF

SL

SL SF 1
S F , S, S L

Sender Receiver

SF SL Frame 0
0 1 2 3 0 1 2 3
ACK 1 0 1 2 3 0 1 2 3
S
R
Frame 1
0 1 2 3 0 1 2 3
ACK 0 0 1 2 3 0 1 2 3
S
R
0 1 2 3 0 1 2 3
Frame 2 0 1 2 3 0 1 2 3
S
R

Time Time
Sender Receiver

0 1 2 3 0 1 2 Frame 2 lost
0 1 2 3 0 1 2
S R
0 1 2 3 0 1 2 3 0 Frame 3
0 1 2 3 0 1 2 3
S R
Frame 2 retransmitted Frame 3 will be discarded
0 1 2 3 0 1 2 3 since frame 2 is not recieved
S 0 1 2 3 0 1 2 3
2
ACK R
Frame 3 retransmitted
0 1 2 3 0 1 2
0 1 2 3 0 1 2 3
S
R

Time Time

2k

RF RL

0 1 2 3 0 1 2 3 0 1 2 3 0 1 2

S, SF SL RF RL

Sender window Receiver window


Sender Receiver

0 1 2 3 0 1 2
Frame 0
S
0 1 2 3 0 1 2
ACK 0
0 1 2 3 0 1 2 3 Frame 1
S
ACK 1 0 1 2 3 0 1 2
0 1 2 3 0 1 2 Frame 2 lost
S
Frame 0 1 2 3 0 1 2 3
0 1 2 3 0 1 2 3 3
S NAK- 2 0 1 2 3 0 1
0 1 2 3 0 1 2 3 Frame 3
retransm
S itted
0 1 2 3 0 1 2

Time Time

2k 2k

2k
1
1 2a
t prop
t frame

1
1 2a
W
2a 1

W
2a 1

W
2a 1

W
2a 1

W
2a 1

W W
2a 1 2a 1

Frame size
Bit rate
1
(2a 1)
1 0.5 1 a 0. 5
t prop t frame t prop t frame t frame 2t prop
t frame bit_ duration
2t prop / bit_ duration 2 20 ms / 0.25 ms 160
Primary Secondary
station station
Commands

Responses

Primary
station
Commands

Responses Responses

Secondary Secondary
station station
Commands Responses Primary
Primary
+ +
Secondary Secondary
station Responses Commands station

Primary Secondary

Command

Response

Primary Secondary Secondary

Command

Response Response
Combined
Combined
Command/Response

Command/Response
Flag Address Control User Flag
FCS
information

(a) I-frame

Flag Address Control FCS Flag

(b) S-frame

Flag Address Control Management FCS Flag


information

(c) U-frame

0 P/F

N(S) N(R)
1 0 P/F

Code N(R)

1 1 P/F

Code Code
Data
Flag Address Control Protocol or FCS Flag
padding
No. of
bytes 1 byte 1 byte 1 byte 1/2 byte Variable 1/2 byte 1 byte
1

Detect carrier
Idle

Drop Establish
2
carrier link
Failure

Succeed

Terminate
5 Authenticate 3
link Failure

Exchange Succeed
of
Finish data
4
Data field

Stack protocol
Flag Address Control Protocol FCS Flag
packet

Type of stack protocol


is defined

1 byte 1 byte 2 bytes Variable


Code ID Length Information
LCP packet

Flag Address Control Protocol Data field FCS Flag


LCP packet

Configuration Link termination Link monitoring


packets packets packets

Configure - request Terminate - request Code - reject


Configure - ack Terminate - ack Protocol - reject
Configure - nak Echo - request
Configure - reject Echo - reply
Discard - request

1 byte 1 byte 2 bytes Variable


IPCP packed Code ID Length IPCP

Flag Address Control Protocol Payload FCS Flag


8021 H
Packet
Network layer

Data LLC LLC Packet


link
layer MAC MAC LLC Packet MAC

Physical layer Network


User-4

User-3
User-5

Shared
multiple access
medium
User-2

User-1

Multidrop cable

Host Inbound line


computer Outbound line

Station 1 Station 2 Station 3


Node 1
hp

Frame 1.1 Frame 1.2

Time

Node 2
hp

Frame 2.1 Frame 2.2

Time

Node 3
hp

Frame 3.1 Frame 3.2

Time

Node 4
Frame 4.1 Frame 4.2
hp

Time

Collision Collision
duration duration
K : Number of attempts
Tp : Maximum propagation time Start Station has
a frame to send
Tfr : Average transmission time for a frame
TB : Back-off time
K=0

Wait TB time
Send the frame
(T B = R  Tp or R  Tfr)

Choose a random
number R between Wait time-out time
K
(2  Tp)
0 and 2 – 1

No

K > Kmax No ACK


K=K+1
received?

Yes Yes

Abort Success
tp to
to to tp

Collides with Collides with


the start of the end of
packet A packet A

Packet B Packet C

tp tp

Packet A
Time
to to + tp to + 2tp to + 3tp

Start of End of
packet A packet B
transmission transmission

Vulnerable period
of pure ALOHA

to tp to tp
Gk e G
pk
k!

G po

po

po e 2G

G e 2G

G 0.5

1
0.184
2e
Transmission time

Successfully sent
packets
Station 1 t
Random retransmission delay

Station 2 t

Station 3 t

Station 4 t

Colliding packets Random retransmission delay


po e G

G e G

1
0.368
e

Smax = 0.368 at G = 1.0


0.4
Slotted ALOHA
Throughput
S Pure ALOHA
0.2
Smax = 0.184 at G = 0.5

0 0.5 1.0 1.5 2.0 2.5 3.0

Offered channel traffic (G)


G e 2G

0.75 * e 2 * 0.75

e G

e G

e G

G 2.3

G*e G

2.3 * e (2.3)

G 1

G 1
A B C D
hp hp hp hp

B senses C senses
here here D senses
here
t1
Vulnerable time
=
Propagation time
Frame propagation

Time Time

Sense
Sense Sense and transmit

Wait Wait

Time
Busy

(a)
Station

Wait
Channel? randomly
Busy

Free

Station can transmit

(b)
Sense
and transmit
Continuously sense
Channel?
Busy

Idle
Time
Busy
Station can transmit

(a) (b)
Probability outcome
does not allow transmission
Transmit
Continuously sense
Time slot Time slot Time slot

Time
Busy
(a)

Channel?
Busy
Idle
Idle

Wait a >p
Channel? Probability
slot outcome?

Busy <p

Use back-off process Station can transmit


as though collision occurred

(b)

Found Size:
idle binary exponential
Continuously sense
IFS

Busy Contention window Send frame Time-out Time


A B C D

Radio range
Start

Set backoff
to zero

Persistence
strategy

Wait DIFS

Send RTS

Set a timer

Wait backoff
time No CTS received
before timeout?
Yes

Wait SIFS

Send the frame

Set a timer
No

Backoff Increment No ACK received


limit? backoff before timeout?
Yes Yes
Abort
Fig. 12 Success
Fig. 12

A B C D
 
+ + 
 
 
i) t0

A B C D

ii) t1

A B C D

iii) t2

A B C D

iv) t3

A B C D

v) t4

A B C D

vi) t5

A B C D

Transmission from A Jam signal


Transmission from C Garbled signal
Start

Set back off


to zero

Persistence
strategy

Wait back off


Send the frame
time

Yes Send jam


Collision signal
No
Success Increment
back off

Back off No
limit
Yes
Abort
Destination Source Length
Preamble SFD address address or type Data and padding CRC
(7 bytes) (1 byte) (6 bytes) (6 bytes) (2 bytes) (4 bytes)
Minimum payload length : 46 bytes
Maximum payload length : 1500 bytes

Destination Source Length


CRC
address address PDU Data and padding
(6 bytes) (6 bytes) (2 bytes) (4 bytes)

Minimum frame length : 512 bits or 64 bytes


Maximum frame length : 12,144 bits or 1518 bytes

lot time
Propagation speed
2
A Packet starts at time 0 B

A Packet almost at B at T –  B

A B

Collision at time T

A B
Noise burst gets back
to A at 2T
1 1 0 0 0 1 0 1
Binary 1
+V

Binary 0
–V

1 0 1 0 1 1 1 0 0
i th 2e 1

P
P 2 /A

1
1 2 B Le / cF

Implementation of standard Ethernet

10 Base 5 10 Base 2 10 Base - T 10 Base - F


1 0 1 0 1 1 1 0 0
Unipolar
NRZ

Polar NRZ

NRZ-inverted
(Differential
encoding)

Bipolar
encoding

Manchester
encoding

Differential
manchester
encoding
Radio Radio

D Channel D
Bits S Radio Radio S Bits
P P

Radio Radio
TX RX
Upper Layers

Logical LInk Control (LLC) layer

Data Link
Layer
MAC
Layer

Physical 802.11 802.11 802.11 802.11a 802.11b 802.11g


Layer Infrared FHSS DSSS OFDM HR-DSSS OFDM
Station Station Station Station
hp hp hp hp

AP
Station Station Station Station
hp hp hp hp

(a) BSS without AP (b) BSS with AP


Distribution
system

Server

hp

AP AP

hp hp

hp hp

hp

BSS BSS
2 Level or 4 level
FSK

Pseudo random Frequency


sequence synthesizer

1 or 2 11 MHz
11 - chip 11 or
Barker sequence BPSK or QPSK
22 Mbps analog
Mbps
signal
digital
data
1 or 2 Mbps 4 to 16 Analog
or PPM signal
Digital 2 to 4
data
IEEE 802.11
LLC
sublayer

Contention-free
Data service
Contention
link service
layer
Point co-ordination function
MAC
sublayer
Distribution co-ordination function

Physical
layer 802.11 802.11 802.11 802.11a 802.11a 802.11g
FHSS DSSS Infrared DSSS OFDM DSSS

I
Source Destination

hp hp hp hp

DIFS

RTS

SIFS

CTS
NAV
(No carrier
SIFS sensing)
Data

SIFS

ACK

Time Time
2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0 to 2312 bytes 4 bytes

FC D Address 1 Address 2 Address 3 SC Address 4 Frame body FCS

Protocol To From More Pwr More


Type Subtype Retry WEP Rsvd
version DS DS flag mgt data

2 bits 2 bits 4 bits 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit
Bytes 2 2 6 6 4

FC D Address 1 Address 2 FCS

(a) RTS

2 bytes 2 bytes 6 bytes 4 bytes

FC D Address 1 FCS

(b) CTS or ACK


BSS

hp hp

BSS-ID

B A
Addr Addr Addr Addr
1 2 3 4

B A
Distribution system

AP

A r
Add
hp

AP
hp

r 4
B Add
A ddr 3
r
Add 2
1

B A

BSS BSS

Distribution system

AP
AP
A
Add
r A B
hp
1 ddr hp

2 Add
r
3 Add
r
4

B A

BSS BSS

Wireless distribution system

AP2 AP2 AP1 B A


AP1
Addr Addr Addr Addr
hp
1 2 3 4 hp

B A

BSS BSS
Master Slave - 1 Master Slave - 3

Slave Slave - 2

(a) Single-slave piconet (b) Multi-slave piconet


Master Master

Slave Slave Slave

Slave Slave

Application profiles

Other RFcomm Telephony Service


discovery
Control
Audio
LLC Adaption protocol

Link manager

Baseband layer

Physical radio layer


Applications

Profiles

D
Control
Audio

a
t
a

L2CAP Layer

Baseband Layer

Radio Layer
625 μs

366 μs

Hop Hop
Master
Time

Hop Hop
Slave
f0 f1 f2 f3 Time
Master Hop Hop

Time

Hop
Slave 1
Time

Hop
Slave 2
f0 f1 f2 f3 Time
Bits : 72 54 0 - 2744

Access code Header Data

The 18-bit header is repeated


three times for a total of 54 bits.
Address Type F A S Checksum

3 4 1 1 1 8
Higher Layers and Higher Layers and
Applications Applications

Data Data
Audio Control Audio Control
L2CAP L2CAP

Host Controller Interface


Link Manager

Link Manager

Link Controller Link Controller

Radio Radio
  Upper layers

Service specific convergence sublayer

Data link
MAC sublayer common part layer

Security sublayer

Transmission convergence sublayer


Physical
Physical layer
medium
QPSK QAM - 16 QAM - 64
dependent
sublayer
Frame 1 Frame 2 Frame 3

Downstream Guard Time


Upstream Time Slot
11 6 11 2 11 16 8 4

E Type C Length Header


O EK Connection ID Data CRC
C I CRC

(a) Generic frame

Bits 1 1 6 16 16 8

Type Bytes Header


10 Connection ID
needed CRC

(b) Bandwidth request frame


Carrier's
equipment

Router
B D
H1 Process P2
O A Packet E F O H2
Process 1
P1
C LAN
Carrier's Router
equipment
B D
4 Process P2
H1
1
O A E F O H2
3 2
Process
P1 C LAN

Packet
P1 P2 P1

P2
Process P3

O H3 Router
Carrier's
equipment
B D
Process P2
H1
1
O A 4 E F O H2
3 2
Process P1
C LAN

Routing table of A

H1 1 C 1
H3 1 C 2
in out

Routing table of C
A 1 E 1
A 2 E 2

Routing table of E

C 1 F 1
C 2 F 2
hp hp hp

L K J
hp hp

A I
III
I VI
hp

IV
B
II VII hp

hp
V II
C
hp hp hp hp

D E F G
Switched
networks

Circuit-switched Packet-switched Message-switched


networks networks networks

Datagram Virtual-circuit
networks networks

Physical connection is setup


when call connection is made

Switching offices
Message
Message
hp
Message

Sender Message
hp

Receiver
Switching
nodes
Datagram network
A
hp hp

4 3 2 1 3 1

4 1

2 3

1
4 X
2 3 4 1
hp hp

2
Packet Packet
hp

Packet

Packet
VCI
VCI
Virtual circuit hp

Data 77
Data 14
OSI model TCP/IP
layers Protocol
architecture
layer TCP/ IP protocol
suite
Application
layer

Presentation Application
layer layer
Telnet FTP SMTP DNS RIP SNMP

Session
layer

Host-to-Host TCP UDP


Transport transport
layer layer
IGMP ICMP
IP
Network Internet ARP RARP
layer layer
Token Frame
Ethernet ring relay ATM
Data-link
layer
Network
interface
Physical layer
layer
Class A Class B Class C
network network network

Leading bit
Leading bit is always Leading bit
is always 0 1&0 is always 1, 1, 0

Router
Router only has to
read the first bit to
know which of it's 3
routes to forward it on.
Packet

From To
Class A 0.0.0.0 127.255.255.255
Netid Hostid Netid Hostid

Class B 128.0.0.0 191.255.255.255


Netid Hostid Netid Hostid

Class C 192.0.0.0 223.255.255.255


Netid Hostid Netid Hostid

Class D 224.0.0.0 239.255.255.255


Group address Group address

Class E 240.0.0.0 255.255.255.255


Undefined Undefined
0 1 2 3 8 16 24 31
0
Class A Net ID Host ID

1 0
Class B Net ID Host ID

1 1 0
Class C Net ID Host ID

1 1 1 0
Class D Multicast address

1 1 1 1
Class E Reserved for future use
Application
SMTP FTP TFTP DNS BOOTP layer

Transport
SCTP TCP UDP layer

IGMP ICMP
Network
IPv4 layer
ARP RARP

Data link
layer
Underlying LAN OR
WAN technology
Physical
layer
IP datagram

Header MTU Trailer


LEN = 1500
OFFSET = 0
DF = 0, MF = 1

DATA
(1500 bytes)

LEN = 3499
OFFSET = 0 LEN = 1500
DF = 0, MF = 0 OFFSET = 1500
DF = 0, MF = 1
MTU = 1500

DATA DATA
(3500 bytes) (1500 bytes)

LEN = 499
OFFSET = 3000
DF = 0, MF = 0

DATA
(499 bytes)
The Internet

128.10.2.1 All traffic to


H3 128.10.0.0

R Router

H1 128.10.1.1
Network 128.10.2.0

H4
H2 128.10.1.2
128.10.2.2

Network 128.10.1.0
2x

2y
2x

2y 25 2
LAN Packet
1 before
translation
2
10.0.0.1 198.60.42.12
3

4 ISP
Router Router
Leased line
5 NAT
box
6 PC

7 Server

Boundary of
company premises
40 bytes Upto 65535 bytes

Base Payload
header

Extension
Data packet from
headers
upper layer
(optional)

4 bits 4 bits 8 bits 8 bits 8 bits

VER PRI Flow label

Payload length Next header Hop limit

Source address

Destination address

Next header Header length

Next header Header length

Next header Header length


Application and
Transport layer

IPv4 IPv6

Underlying
LAN or WAN
technology

To IPv4 To IPv6
system system
IPv4 header
IPv6 header
IPv6 Host Payload IPv6 Host
hp hp

IPv4 Region

IPv6 Host IPv6 header IPv4 Host


Payload
hp hp

IPv6 Region

Header translation
158.108.2.2 158.108.2.4
A Who has IP B
158.108.2.4
hp hp

Request

Chp
D
hp
E
hp

158.108.2.3
158.108.2.5

(a) Broadcast request

158.108.2.2 158.108.2.4
Me! With
A 0:0:e8:15:CC:1 B
hp hp

Reply

C
hp
D
hp
E
hp

158.108.2.5 158.108.2.3

(b) Unicast reply

ARP message

Frame header Frame data area


32 bits

Hardware type Protocol type

Hardware Protocol Operation


length length
1: Request 2: Reply

Sender hardware address

Sender protocol address

Target hardware address

Target protocol address


8 bytes 6 bytes 6 bytes 2 bytes 4 bytes

Preamble
Destination Source Type Data
and CRC
address address
SFD

ARP request or reply packet


hp hp

130.23.3.20 130.23.43.25

B23455102210 A46EF45983AB
System A System B

0001 0800
06 04 0001
B23455102210
130.23.3.20
000000000000
130.23.43.25

Data Preamble
CRC 0806 B23455102210 111111111111
28 bytes and SFD
ARP request (from A to B)
0002 0800
06 04 0002
A46EF45983AB
130.23.43.25
B23455102210
130.23.3.20

Preamble B23455102210 A46EF45983AB 0806 Data CRC


and SFD
ARP reply (from B to A)
Sender Authorised server
hp hp hp hp hp

RARP Query
packet

(a)

Sender Authorised server


hp hp hp hp hp

RARP Response
packet

(b)

ICMP
message

IP IP
header data

Frame
Frame data Trailer
header
0 8 16 31

Type Code Checksum

Reset of the header

IP header and 64 bits of original datagram


hp

10.1.1.1
3
R1 R2

172.16.1.100 E0 E0 172.16.1.200

1 2 4
hp

Host H 172.16.1.1/24
Default GW = 172.16.1.100
8 : Echo request
0 : Echo reply

Type : 8 or 0 Code : 0 Checksum

Identifier Sequence number

Optional data
Sent by the request message : Repeated by the reply message
13 : Request
14 : Reply

Type : 13 or 14 Code : 0 Checksum

Identifier Sequence number

Original timestamp

Receive timestamp

Transmit timestamp
17 : Request
18 : Reply

Type : 17 or 18 Code : 0 Checksum

Identifier Sequence number

Address mask
Type : 9 Code : 0 Checksum

Number of Address entry


Lifetime
addresses size

Router address 1

Address preference 1

Router address 2

Address preference 2
A B C D

F G
E H

I J K L
New estimated
delay from J
To A I H K Line

A 0 24 20 21 8 A

B 12 36 31 28 20 A

C 25 18 19 36 28 I

D 40 27 8 24 20 H

E 14 7 30 22 17 I

F 23 20 19 40 30 I

G 18 31 6 31 18 H

H 17 20 0 19 12 H

I 21 0 14 22 10 I

J 9 11 7 10 0 –

K 24 22 22 0 6 K

L 29 33 9 9 15 K

JA delay JI delay JH delay JK delay New routing


is 8 is 10 is 12 is 6 table for J

Vectors received from


J's four neighbors
A A
1 1 B C D
Routing table for A 3 2 3
B B
B C D B C D
1 1 2 3 1 3 4 3
C C
1 1 B C D
5 4 5
D D
2 1
A B E

5 2 3

D C F
2 3
B C

A D

E F
3
B C
2 5

A 3 H

1 2
D E
1

3
B C
2 5

A H

1 2
D E
1

(2,A)
B C
2

A H

1
D E
(1, A)

(2, A)
B C

A H

E
D (1, A)
B (2,A) C (3,D)

A H

D (1,A) E (1,D)

B (2, A) C (3, D)

A H

D (1, A) E (1, D)

B C

A H (1, E)

D (1, A) E (1, D)
B C

A H

D E

B C d(AC) = 4

3
A H

1
1
d(AD) = 1 E d(AE) = 2

d(AE) d(AC)
d(AE)

B C

A H

D E
Region 1 Region 2

1B 2A 2B

1A 1C
2C 2D

4C 5C

5B 5D

3A 3B 4A 4B 5A 5E

Region 3 Region 4 Region 5


W X Y
A D B

C
Command Version Reserved

Family All 0s

Network address
Repeated

All 0s

All 0s

Distance
Com : 1 Version Reserved

Family All 0s

Network address
Repeated

All 0s

All 0s

All 0s

(a) Request for some

Com : 1 Version Reserved

Family

All 0s

All 0s

All 0s

All 0s

(b) Request for all


Command Version Reserved

Family Route tag

Network address
Repeated

Subnet mask

Next-hop address

Distance

Command Version Reserved

FFFF Authentication type

Authentication data
16 bytes
To another AS
N4 R2

N3 R3
R6 N6 R7 N8

N2 R1 R4 R5
N7

N1
R8 Area
193.0.0.0 Area
Area 193.0.0.1
193.0.0.2
N5

Area
193.0.0.3
0 8 16 31

Version Type Packet length

Router ID

Area ID

Checksum Authentication type

Authentication

Authentication

Data
AS2

iBGP
R2 R3

AS3 eBGP eBGP

R4 R1 AS1

AS4 eBGP

R5 iBGP R6

0 8 16 24 31

Marker

Length Type
Octets Octets

Marker Marker
16 16

2 Length 2 Length
1 Type 1 Type

(a) Keepalive 1 Error code

1 Error subcode

Variable Data

(b) Notification

Octets
Octets

16 Marker
16 Marker

2 Length
2 Length
1 Type
1 Type
1 Version Unfeasible
2 routes length
2 My AS
Withdrawn
2 Hold time Variable routes

4 BGP identifier Total path


2 attribute length
Optional
1 parameter Variable Path attributes
length
Network layer
Optional Variable
Variable reachability
parameter
information

(c) Open (d) Update


32 bits

20 3 1 8
Lable QOS S TTL

Layer 2 header MPLS header IP Packet


Router

LSP
Ingress Egress

Router Router Router Router


LSR

IP IP
network network

Router Router

Router Router
MANET routing prorocol
classification

Reactive Proactive Hybrid


protocol protocol protocol

AODV DSR ACOR ABR DSDV OLSR WRF CGSR TORA ARPAM ZRF OORP
Source
1 2
node

4
5

6
7

Destination
8 9
node

1 2

4
5

6
7

8 9
1 2

6
7

8 9

1 2

6
7

8 9
1 2

8 9
7 <1,3,5,7>
<1,2>
2
<1>
<1,3,5>
5 8 Destination
Source 1 <1>
3 <1,3>
6 <1,4,6>

<1>
<1,4>
4

(a) Route request

2
5 8 Destination
Source 1
3
6 <1,4,6>

<1,4,6>
<1,4,6>
4

(b) Route reply


Home Network

Packets routed indirectly


Home Agent Correspondent Node
through HA

ly to
ct d
re te
En

di ou
ca

N r
C ets
ps

ck
ula

Pa
tio
n

Foreign Agent
Mobile
Node

Foreign Network
Process Process
Process to process delivery

hp hp

ntrenet

Router Router Router

Node to node Node to node Node to Node to


delivery node node
Host to host delivery
System 1 System 2

Application layer Interface Application layer

Services provided to
transport layer

Transport Transport
TPDU
entity entity

Transport layer Services provided from Transport layer


network layer

Interface
Network layer Network layer
Frame payload

Packet payload

Frame Packet TPDU TPDU payload


header header header
Connection request Connect primitive
IDLE executed
TPDU received

Passive Active
establishment establishment
pending pending

Connection primitive Connection accepted


executed Established
TPDU received

Passive Disconnection request Active


disconnect disconnect
pending TPDU received pending

Disconnect primitive Disconnection request


executed IDLE
TPDU received
Router
Communication
channel

(a) Data link layer environment

Router Subnet / Internet

hp hp

Host

Server Server
computer computer

(b) Transport layer environment


Active open Passive open
Closed
send SYN

SYN sent Close Close Listen

Receive SYN Receive SYN


ESTAB Send SYN
Receive FIN

Close
FIN wait
wait

Receive FIN Close


Closed
Send FIN
Time Host A Host B
Send SYN seq=x In the network

Receive SYN

Send SYN seq=y, ACK x+1

Receive SYN + ACK

Send ACK y+1

Receive ACK
Host A Host B
SYN (SEQ=x)

SYN (SEQ=y)

SYN (SEQ=y, ACK=x+1)

SYN (SEQ=x, ACK=y+1)


Time Host A Host B
Send FIN seq=x In the network

Receive FIN

Send ACK x+1

Receive ACK

Send FIN seq=y, ACK x+1

Receive FIN + ACK

Send ACK y+1

Receive ACK
Host A Host B
Send DR + DR
start timer
Send DR + start timer
DR

Release
connection

Send ACK ACK


Release connection

Host A Host B
Send DR + DR
start timer
Send DR + start timer
DR

Release
connection

Send ACK ACK


Lost Time out
(Release connection)
Host A Host B

Send DR + DR
start timer

DR Send DR + start timer


(Time out)
Send DR + Lost
start timer DR
Send DR + start timer
DR
Release
connection
Send ACK ACK
Release connection

Host A Host B
Send DR +
start timer DR
Send DR + start timer

(Time out) Lost


Send DR +
start timer Lost

(N time outs) (Time out)


Release connection Release connection
4 Transport
address

Layer
To router

4 Network
address
3

Layer
To router
Destination

Source
Destination

Source
Slow start Congestion
avoidance
No congestion Mild congestion
Severe congestion
Network
throughput
(Packets Controlled traffic
delivered) (Ideal case)

Uncontrolled
traffic

Offered load
(Packets sent)

AvgLen MinThreshold
MaxThreshold MinThreshold
TempP
(1 count TempP)

0 . 01
(1 count 0 . 01) count
IP datagram

IP TCP
TCP data
header header

20 bytes 20 bytes
TCP segment

Source port number Destination port


(16 bits) number (16 bits)

32 bit sequence number


20 Bytes

32 bit Acknowledgment number

Header Reserved U A P R S F Window size


length R C S S Y I (16 bits)
(6 bits)
(4 bits) G K H T N N

TCP checksum Urgent pointer


(16 bits) (16 bits)

 Options (optional) 
 Data (optional) 
Bits 0 31
Host 1 Host 2 Host 1 Host 2

SYN (SEQ SYN (SE


Q = x)
= x)
= y)
SEQ
SYN (

)
=x+1
) x+1
Time

, ACK C K=
EQ = y = y, A
SYN (S (SEQ
SYN
SY
N(
SE
Q=
x, A
CK
=y
+1
(SEQ = x )
+ 1, ACK =
y + 1)

(a) TCP connection establishment in the normal case (b) Call collision
Client Server
hp hp

Segment 1 : FIN
Seq = 20 ack = –

Segment 2 : ACK
Seq = 50 ack = 21

Segment : FIN
Seq = 51 ack = 21

Segment : ACK
Seq = 21 ack = 52

Time Time
CONNECT/SYN
CLOSED
Start
state
CLOSE/–
LISTEN/– CLOSE/–

SYN/SYN + ACK LISTEN


State
SEN
RST D

SYN SYN
RCVD SENT
SYN/SYN + ACK (Simultaneous open)

AC
K
(Data transfer )
Connection
ESTABLISHED
state SYN + ACK/ACK
CLOSE/FIN (Step 3 of the three-way handshake)

CLOSE/FIN FIN/ACK
(Active close) (Passive close)

FIN/ACK
FIN CLOSING CLOSE
WAIT 1 state WAIT

ACK/– ACK/– Finish


FIN+ACK/ACK
FIN TIMED LAST
WAIT 2 WAIT ACK
FIN/ACK

(Timeout/)
K/–
AC
CLOSED
state

(Go back to start)


Receiver
Sender Receiver buffer
0 8K
Request
4K SE Empty
for 4K Q=0
write
4K

2048
2048 WIN =
ACK =
Request
for 4K 4K S
EQ =
write 2048
Buffer full
Sender
is 0
blocked 4096 WIN =
ACK =
048 Reads 4K
96 W IN = 2
ACK = 40
4K
Send
upto 4K 2K S
EQ = 409
6
2K 4K
Receiver's buffer is full

Application reads 1 byte

Free Room for one more byte

Header Window update segment sent

Header 1 byte New byte arrives

Receiver's buffer is full


R R M

E rr M A
A g E rr
D h (| E rr | D)
A 4D
E rr
44 u ts
Timeo
40
36
32
Congestion window

28 Threshold

24 hold
Thres
20
16

12
08
04

2 4 6 8 10 12 14 16 18 20 22 24
Transmission number
Window

1 2 3 4 5 6 7 8 9 10 11 12

(a)

Sent and
ACKed
Not yet sent
Window

1 2 3 4 5 6 7 8 9 10 11 12

(b)
Window

1 2 3 4 5 6 7 8 9 10 11 12

(c)
1 st
2 nd
3 rd

4 th
5 th
5 th
6 th
7 th

8 th
9 th
1 th
IP datagram
UDP datagram

IP UDP
UDP data
header header

20 bytes 8 bytes

Source port number Destination port


16-bit number (16-bit)
8 Bytes
UDP length UDP checksum
16-bit 16-bit

 Data (optional) 
0 31
CLIENT SERVER

Server
Client Stub Server
stub

Lower Lower
layer layer
Multimedia application
User
space
RTP

Socket interface

UDP

IP
OS
Kernel
Ethernet
Ethernet payload

IP payload
UDP payload
Ethernet IP UDP RTP
Header RTP payload
Header Header header

32-bits
0 31
Payload
(2-bits) P X CC M Sequence number
type
version (1-bit) (1-bit) (4-bits) (1-bit) (16-bits)
(7-bits)

Time stamp (32-bits)

Synchronization source identifier


(32-bits)

 

Contributing source identifier


st

nd

rd

th

th

th

th
SCTP User SCTP User
Application Application

SCTP SCTP
Transport Transport
Service Service
One or more One or more
IP Network IP address IP address IP Network
Service appearances appearances Service

SCTP
32-bit

Source port number Destination port number


SCTP
Verification Tag common
header
Checksum

Chunk type Chunk flag Chunk length


field field field Chunk 1
[control
Chunk data or data]

    
  
  
Chunk type Chunk flag Chunk length Chunk N
field field field [control
or data]
Chunk data
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Source port Destination port
Verification tag
Checksum
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Type Chunk flags Chunk length

Chunk value
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Type = 0 Reserved U B E Length

TSN

Stream identifier S Stream sequence number n

Payload protocol identifier

User data (seq n of stream S)


Unregulated
packet flow

Leaky
bucket
(Host computer)

Regulated flow

Output to Network
(Fixed rate)
Arrival of a packet
at time ta

X' = X – (ta– LCT)

Y
X' < 0 ?

N
X' = 0

Nonconforming
X'> L?
packet

X = X' + I
LCT = ta
Conforming packet

X = Value of leaky bucket counter


X' = Auxiliary value
LCT = Last conformance time
Token Bucket holds
bucket token periodically

Regulated flow

Output to network
(Fixed rate)
C
M
C
S
M

S
S
Data flow

Sender

Router

Bandwidth Bandwidth
reservation reservation

Router Router

Host Host Host Host


E F
A B C D

Receivers
Packets Packet
arriving Classifier Marker
forward
Packet flow

Source Destination

Source Destination

Feedback information
B C

A D

E F

B C

A D
oke
Ch

E F

B C

A D

Choke

E F
B C

A D

C
ho
ke
E F

B C

A D

Reduced
flow
E F

B C

A D

Flow is still
maximum
E F

B C

A D

Flow is
reduced
E F
B C

A D

Heavy
flow
E F

B C

A D
ke
ho
C

E F

B C

A D

Choke
Reduced
E F flow
B C

C
A ho D
ke

E F

B C

A D

E F
Antenna

Sender R Receiver
R R (mobile host)

R Base
R station
Router
TCP-1 TCP-2
http : // www.sinhgad.com/types

Name of protocol Name of computer Name of item to


to use when accessing on which the server request from the server
the server is running
Server 1 Server 2
Current page
displayed by
browser

Client Hyperlink
hp Hyperlink
to abc.com
to pqr.com
Web
server

Web
Browser server
program

ction
TCP Conne

Internet
CGI
Server script Database
Browser on disk

hp

1 2 3 4

8 7 6 5

User
Web server

Local
hp

Internet CGI
program hard
disk

Web server

Server starts CGI program

(a)

Web server
hp

Internet CGI Local


program hard
disk

Web server

CGI program sends output

(b)
HTML
Controller hp


HTTP FTP SMTP
Java

Interpreters
HTT Proxy
P re est
ques server P requ
t HTT
HTT
P re nse
Client spon Pr espo Origin
se HTT server

st
ue
eq
T Pr on
se
HT res
p
TP
HT

Client Origin
server
Request UR
L+
Ver
Header b
Body
Client
Server
ode
us c
Stat essage
m
Response and body
Header
Body

Request line

Header
information

Blank line

Optional
body part
GET / home.html HTTP / 1.1

HTTP URL HTTP version


request type

Space

Method ://Host:Port/Path

http : // www.technicalpublication.org / home.html

Protocol Subdomain Domain name


File path
Top level
domain
Status line

Headers
information

A blank line

Body
(optional)

Header name : Header value

Space
Server
Client
hp

Initiate
TCP connection

RTT

Request
file

RTT Time to
transmit file

Entire file
received
Root

Inverse Generic domain Country domain


domain
Root level

com edu gov int mil net org

stes

sinhgad

stes. sinhgad. edu

Root level

ae fr in zw
Root level

arpa

in-
addr

132

35

50

120
Root

com edu gov int mil org ae us

Generic domains Country domains


Root

com Domain name = com

Label book Domain name = book.com

vtu

Root server
hp

hp hp hp

Arpa server edu server Com server

hp hp hp hp hp hp

Stes.edu vtu.edu vtubooks.com abc.com Preeti.com


Root

edu Zone

Stes

Domain

Zone and
domain
edu

2 3
5 4

it.edu Stes.edu

1
6

hp

Client
edu

3 4
it.edu

2
hp Stes.edu

6
Client
Header Header
information information

 Question   Question part



part  
Answer part
 Authoritative part

 Additional information 
part

(a) Query (b) Response

Bits 0 1516 31

Identification Flags

12 bytes
Number of question Numbers of answers

Number of authority Number of additional


records
 Questions

 Answers

 Authority

 Additional information

QR Opcode AA TC RD RA Zero r code

Bit 1 4 1 1 1 1 3 4
cs.yale.edu Yale cs name server

4 5

yale.edu Yale name server

3 6

edu-server.net Edu name server

2 7

cs.vu.nl VU cs name server

1 8

flits.cs.vu.nl Originator
User agent Mail server

SMTP Mail server


SMTP

User agent

SMTP User agent

Mail server

User agent User agent


User send mail Outgoing Client
TCP connection
mail spool (background
area transfer) for outgoing mail

User
interface

Mailboxes Server
for TCP connection
(to accept
User reads mail incoming mail) for outgoing mail
mail
1
User 2 Mail 4 Mail 6 User
agent server server agent Bob
3 5

Alice

Commands
MTA MTA
client Responses server
User User

Non-ASCII Non-ASCII
code code

MIME MIME

7-bit 7-bit
ASCII ASCII
7 bit ASCII
SMTP SMTP
User computer Mail server
POP3 POP3
client server

Login name
Ok
Password
Password verified. Ok
List of emails
Email numbers with sizes
Download 1
New email 





Download N
New email
Status line HTTP / 1.1 300 ok
Date : Wed , 8 Oct 2014 13:00:13 GMT
General headers
Connection : close
Server : Apache / 1.3.27
Accept-range : bytes
Entity headers Content-type : text / html
Content-length : 200
Last-modified : 2 Oct 2014 13:00:13 GMT
Blank line
<html>
<head>
Message body <title> Welcome to the India <title>
<head>
<body>
No connection
se
lea
re
TCP connection
ec

Pre-authentication
ur

establish
so
Re

Not Authentication
Authenticated
authenticated Successful

ox

n
lb

tio
ai

lec
M ox
s

lb
fail

ut

se
ai

d
go

se
M clo
n

t lo
atio

Selected
ien
ntic

Cl
he

nt
t
ie
ou
Aut

Cl
log

Logout

Both side close connection


User

User
interface
Control connection
Control Control
process process
TCP/IP
Data transfer Data transfer
process process
Data connection

Client Server

Local code Local code

Control NVT Control


Client : process 62010 21 process : Server
ASCII
File type, data structure
and mode of transmission
are defined by the client

Client Server

Local data Data Data Local data


type and transfer transfer type and
structure process Data process structure
connection
Application

User Telnet Telnet


terminal client server

TCP TCP
0 8 16 24 31

OP HTYPE HLEN HOPS

TRANSACTION IDENTIFIER

SECONDS ELAPSED FLAGS

CLIENT IP ADDRESS

YOUR IP ADDRESS

SERVER IP ADDRESS

ROUTER IP ADDRESS


CLIENT HARDWARE ADDRESS (16 OCTETS)



SERVER HOST NAME (64 OCTETS)



BOOT FILE NAME (128 OCTETS)



OPTIONS (VARIABLE)


Boot

INIT

-/ DHCPDISCOVER
DHCPOFFER

SELECTING

Select offer/DHCPREQUEST Lease time expired


or
DHCPNACK
REQUESTING

DHCPACK
Lease time 50 % expired/ Lease cancelled/
DHCPREQUEST DHCPRELEASE
BOUND

DHCPACK DHCPACK
RENEWING REBINDING

Lease time 87.5 % expired/


DHCPREQUEST
SNMP agents

SNMP Router
Manager SNMP

Server
ph

Multilayer
switch

Computer Network
programming management

Language
syntax SMI

Objects declaration
MIB
and definition

Program
coding SNMP
UDP
connections

GetRequest

GetNextRequest

GetBulkRequest
SNMP
agent
SetRequest
SNMP
manager
Response

Client Trap Server

InformRequest To another manager

Report To another manager


PDU

VarBind list

PDU Request Error Error


type ID status index

Variable Value  Variable Value


Message

Version

GlobalData

ID

MaxSize

Flags

SecurityModel

SecurityParameter

ScopePDU

contextEngine

contextName

PDU
Passive
Passive open
161
Client open Server
162
(a) Passive open by both client and server

Active
open
68000 161
Client Server
162
(b) Exchange of request and response messages

Active
open 161
Client Server
162 61150

(c) Server sends trap message


Confidentiality

Secure
Integrity
Availability
Attacks

Passive Active
attacks attacks
Opponent Read content of
message from sender
to receiver

nternet

Sender Receiver

hp

Opponent Observe pattern of


messages from sender
to receiver
hp hp

nternet

Sender
Receiver
hp

Opponent Message from opponent


that appears to be from sender
hp hp

nternet

Sender Receiver

hp

Capture message from


Opponent sender to receiver, later
replay message to receiver
hp hp

nternet

Sender Receiver
hp

Opponent modifies
Opponent message from sender
to receiver
hp hp

nternet

Sender Receiver

hp

Disrupts service
provided by server
hp hp

nternet
Source Server
system
hp

Target
system

Legitimate connection attempt


TCP SYN packet

TCP SYN ACK packet

TCP ACK packet

Syn flood DOS attack


TCP SYN packet

TCP SYN ACK packet

The final TCP ACK packet is never sent


Trusted third
party

Sender Receiver

Transformation Transformation

Message + Secret nformation Secret + Message


message Channel message

Secret Opponent Secret


information information
Secret key
shared by
sender and recipients

Plaintext Encryption Decryption Plaintext


input algorithm algorithm output
^
X
Cryptanalyst ^
K

Message X Encryption Y Decryption X


algorithm algorithm Destination
source

K
Secure channel

Key
source
Plain text (64 bit) Key (64 bit)

nitial permutation Permuted


choice 1

64 56

48 56
Permuted Left circular
Round 1
choice 2 shift
K1
64 56

48 56
Round 2 Permuted Left circular
choice 2 shift
K2

48 56
Permuted Left circular
Round 16
choice 2 shift
K16

32 bit swap

64

Inverse initial
permutation

Ciphertext (64 bit)


(IP 1)

Li Ri 1
Ri L i 1 F(R i 1 , K i )
(L i ) (R i 1) (R i )
(L i 1 ) (R i 1) Ki

R (32 bits)

48 bits K(48 bits)

S1 S2 S3 S4 S5 S6 S7 S8

32 bits
Si
Si

th

C0 D0
Ci 1 Di 1

F(R i 1 , K i )
Public key ring

Suresh Tomy

Alice

Alice Alice
public private
key key

Transmitted
ciphertext

Plaintext Encryption Decryption Plaintext


input algorithm algorithm output

Public key ring

Bob

Bob's
Bob's public
private key key

Transmitted
ciphertext

Plaintext Encryption Decryption Plaintext


input algorithm algorithm output
X (X 1 , X 2 , Xm)
KU b
KR b
Y1
KU b X1
<
X
Cryptanalyst

<
KRb

Message X Y X
Encrypt Decrypt Destination
source

KVb KRb
Source side X1 Destination side Y1
Key-pair
source

Y1 , Y2 , Y3 .... Yn
E KU b (X)

D KR b (Y)
KU b
KR b

(PU b )
PR b
(PU b )
n pq

(n)
(n) (n)
d e (n)
(n)
KU
KR

Pe

Cd

pq (n)

(n)
(n)

xy

d e (n) p ed P
C Pe
P Cd (P e )d P ed

(n)
(n)

(n)
(n)
(n)
(n)
(n)
(n)
ed (n)
7 d

Me

(n)
ed (n)

Me

cd

(n)

ed (n)
cd
Application
data

Fragment

Compress

Add-MAC

Encrypt

Append
SSL
Record header
Client Server

Client_hellow
Phase - 1
ellow
server_h

te
Certifica
hange
key exc
_
Server_ est
Phase - 2 te_requ
Certifica
done
hellow_
Server_

Certifica
te
Client_k
ey_exch
Phase - 3 ange
Certifica
te_verify

Change
_cipher_
spec
Finished

Phase - 4 spec
_cipher_
Change
Finished
Secure hypertext terminal
protocol

Secure socket layer

Hypertext terminal protocol


Transmission control protocol
Transmission control protocol

Internet protocol Internet protocol

(a) HTTP (b) Secure HTTP

Client machine
Web server
browser

TCP connect

SSl connect

Secure HTTP

Get transaction
hp hp

To Internet

hp hp hp

Firewall

Corporate network

You might also like