Professional Documents
Culture Documents
Computer Networks & Security
Computer Networks & Security
Computer Networks & Security
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
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
Transmission medium
Connectionless Idle - No connection Connection-oriented Idle - No connection
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
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
Node 1 Node 2
From transport layer To transport layer
Packet Packet
Header 3 Data Network Header 3 Data
layer
Node-1 Node-2
Segments Segments
Data Data
DLL DLL
Data L7 Data L7
Presentation
layer
Data L6 Data L6
Transport layer
Internet layer
Host to network
Application layer
Telnet FTP SMTP DNS
IP Internet layer
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
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
RF IF
Down Voice
Demodulator Demultiplexer data
converter
video
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
MAC MAC
MAC
PHY PHY PHY PHY
PORT-1 PORT-2
LAN A LAN B
hp hp
WinNT
Netware
Gateway
hp hp hp
Repeater
hp hp
hp
Application Application
Presentation Presentation
Session Session
Transport Transport
Network Network
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
Physical Physical
Application Application
Presentation Presentation
Session Session
Transport Transport
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
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
0 1 1 0 1 0 1 1
t
Polar encoding
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
Frequency
synthesizer
Psendo
random
code
generator
k-bit patterns
000 001 010 011 100 101 110 111 k-bit Frequency
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
Chip generator
Packet
LLC Packet
To network
Data from upper layer
Data from
Flag ESC
upper layer
Extra 2
bytes
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
Stuffed bits
7-bit data
D7 D6 D5 D4 D3 D2 D1 D0
Parity bit
Encoder Decoder
User User
Data Data
Correct or discard
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
(a) Datawords
(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
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 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
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
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
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
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
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
Command
Response Response
Combined
Combined
Command/Response
Command/Response
Flag Address Control User Flag
FCS
information
(a) I-frame
(b) S-frame
(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
User-3
User-5
Shared
multiple access
medium
User-2
User-1
Multidrop cable
Time
Node 2
hp
Time
Node 3
hp
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
Yes Yes
Abort Success
tp to
to to tp
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
G e G
1
0.368
e
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
(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
(b)
Found Size:
idle binary exponential
Continuously sense
IFS
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
Set a timer
No
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
Persistence
strategy
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
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
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
Data Link
Layer
MAC
Layer
AP
Station Station Station Station
hp hp hp hp
Server
hp
AP AP
hp hp
hp hp
hp
BSS BSS
2 Level or 4 level
FSK
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
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
(a) RTS
FC D Address 1 FCS
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
B A
BSS BSS
Master Slave - 1 Master Slave - 3
Slave Slave - 2
Slave Slave
Application profiles
Link manager
Baseband layer
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
3 4 1 1 1 8
Higher Layers and Higher Layers and
Applications Applications
Data Data
Audio Control Audio Control
L2CAP L2CAP
Link Manager
Radio Radio
Upper layers
Data link
MAC sublayer common part layer
Security sublayer
Bits 1 1 6 16 16 8
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
Datagram Virtual-circuit
networks networks
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
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
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
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
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)
Source address
Destination address
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 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
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
ARP message
Preamble
Destination Source Type Data
and CRC
address address
SFD
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
RARP Query
packet
(a)
RARP Response
packet
(b)
ICMP
message
IP IP
header data
Frame
Frame data Trailer
header
0 8 16 31
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
Optional data
Sent by the request message : Repeated by the reply message
13 : Request
14 : Reply
Original timestamp
Receive timestamp
Transmit timestamp
17 : Request
18 : Reply
Address mask
Type : 9 Code : 0 Checksum
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
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
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
Family
All 0s
All 0s
All 0s
All 0s
Network address
Repeated
Subnet mask
Next-hop address
Distance
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
Router ID
Area ID
Authentication
Authentication
Data
AS2
iBGP
R2 R3
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
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
20 3 1 8
Lable QOS S TTL
LSP
Ingress Egress
IP IP
network network
Router Router
Router Router
MANET routing prorocol
classification
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
2
5 8 Destination
Source 1
3
6 <1,4,6>
<1,4,6>
<1,4,6>
4
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
Services provided to
transport layer
Transport Transport
TPDU
entity entity
Interface
Network layer Network layer
Frame payload
Packet payload
Passive Active
establishment establishment
pending pending
hp hp
Host
Server Server
computer computer
Close
FIN wait
wait
Receive SYN
Receive ACK
Host A Host B
SYN (SEQ=x)
SYN (SEQ=y)
Receive FIN
Receive ACK
Receive ACK
Host A Host B
Send DR + DR
start timer
Send DR + start timer
DR
Release
connection
Host A Host B
Send DR + DR
start timer
Send DR + start timer
DR
Release
connection
Send DR + DR
start timer
Host A Host B
Send DR +
start timer DR
Send DR + start timer
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
Options (optional)
Data (optional)
Bits 0 31
Host 1 Host 2 Host 1 Host 2
)
=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
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
(Timeout/)
K/–
AC
CLOSED
state
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
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
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)
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
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
Leaky
bucket
(Host computer)
Regulated flow
Output to Network
(Fixed rate)
Arrival of a packet
at time ta
Y
X' < 0 ?
N
X' = 0
Nonconforming
X'> L?
packet
X = X' + I
LCT = ta
Conforming packet
Regulated flow
Output to network
(Fixed rate)
C
M
C
S
M
S
S
Data flow
Sender
Router
Bandwidth Bandwidth
reservation reservation
Router Router
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
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
(a)
Web server
hp
Web server
(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
Space
Method ://Host:Port/Path
Headers
information
A blank line
Body
(optional)
Space
Server
Client
hp
Initiate
TCP connection
RTT
Request
file
RTT Time to
transmit file
Entire file
received
Root
stes
sinhgad
Root level
ae fr in zw
Root level
arpa
in-
addr
132
35
50
120
Root
vtu
Root server
hp
hp hp hp
hp hp hp hp hp hp
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
Bits 0 1516 31
Identification Flags
12 bytes
Number of question Numbers of answers
Bit 1 4 1 1 1 1 3 4
cs.yale.edu Yale cs name server
4 5
3 6
2 7
1 8
flits.cs.vu.nl Originator
User agent Mail server
User agent
Mail server
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
User
interface
Control connection
Control Control
process process
TCP/IP
Data transfer Data transfer
process process
Data connection
Client Server
Client Server
TCP TCP
0 8 16 24 31
TRANSACTION IDENTIFIER
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
DHCPACK
Lease time 50 % expired/ Lease cancelled/
DHCPREQUEST DHCPRELEASE
BOUND
DHCPACK DHCPACK
RENEWING REBINDING
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
VarBind list
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
Secure
Integrity
Availability
Attacks
Passive Active
attacks attacks
Opponent Read content of
message from sender
to receiver
nternet
Sender Receiver
hp
nternet
Sender
Receiver
hp
nternet
Sender Receiver
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
Sender Receiver
Transformation Transformation
K
Secure channel
Key
source
Plain text (64 bit) Key (64 bit)
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
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)
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
Bob
Bob's
Bob's public
private key key
Transmitted
ciphertext
<
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
Client machine
Web server
browser
TCP connect
SSl connect
Secure HTTP
Get transaction
hp hp
To Internet
hp hp hp
Firewall
Corporate network