Professional Documents
Culture Documents
Dr Shahedur Rahman
s.rahman@mdx.ac.uk
Room: T115
Session Content
Lesson objectives
At the completion of this lesson you should be
able to
understand the basics concepts of Virtual
Circuit and Datagram
understand the IP protocol
describe the basics of the TCP and UDP
protocol
Application Layer
3
Transport Layer
2
Internet Layer
Network
layer
IP protocol
addressing conventions
datagram format
packet handling conventions
Routing protocols
path selection
RIP, OSPF, BGP
routing
table
ICMP protocol
error reporting
router signaling
Routing algorithms
||| switching: move packets from
routers input to appropriate router
output
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
application
transport
network
data link
physical
? ?
?
virtual circuit
or
datagram?
Virtual circuits
performance-wise
network actions along source-to-dest path
||| call setup, teardown for each call before data can flow
||| each packet carries VC identifier (not destination host ID)
||| every router on source-dest. paths maintain state for
each passing connection
- transport-layer connection only involved two end systems
Datagram
||| data exchange among computers
- elastic service, no strict timing req.
||| smart end systems (PCs)
- can adapt, perform control, error
recovery
- simple inside network, complexity at
edge
||| many link types
- different characteristics
- uniform service difficult
VC network
||| evolved from telephony
||| human conversation:
- strict timing, reliability
requirements
- need for guaranteed service
||| dumb end systems
- telephones
- complexity inside network
11
IPv4 Addresses
||| IP address: 32-bit identifier for host, router interface
32 Bits
Class B
Network ID
Host ID
w. x. y. z.
Example:
131.107.3.24 =
131
107
24
IP Addresses - cont
||| class-full addressing:
class
Large Networks A
0 network
Medium-sized B
10
Small networks C
110
1110
1.0.0.0 to
127.255.255.255
host
network
128.0.0.0 to
191.255.255.255
host
network
multicast address
host
192.0.0.0 to
223.255.255.255
224.0.0.0 to
239.255.255.255
32 bits
13
IP Addresses - cont
Number
of Networks
Number of Hosts
per Network
Range of
Network IDs
(First Octet)
Class A
126
16,777,214
1 126
Class B
16,384
65,534
128 191
Class C
2,097,152
254
192 223
14
IP Addresses - cont
Router
223.1.1.1
223.1.2.1
223.1.1.2
223.1.1.4
223.1.1.3
223.1.3.1
223.1.3.27
223.1.2.9
223.1.2.2
223.1.3.2
15
Addressing Guidelines
||| Network ID Cannot Be 127
- 127 is reserved for loopback functions (A zone that
enables the server to direct traffic to itself. The host
number is almost always 127.0.0.1.)
||| Network ID and Host ID Cannot Be 255 (All Bits Set to 1)
- 255 is a broadcast address
||| Network ID and Host ID Cannot Be 0 (All Bits Set to 0)
- 0 means this network only
||| Host ID Must Be Unique to the Network
16
IP datagram format
32 bits
- Current version is 4
||| Internet Header Length (IHL) - 4bits
ver
IHL
TOS
16-bit identifier
time to
live
upper
layer
flgs
length
fragment
offset
Internet
checksum
17
ver
IHL
TOS
16-bit identifier
time to
live
flags
upper
layer
length
fragment
offset
Internet
checksum
18
32 bits
ver
IHL
TOS
16-bit identifier
time to
live
flags
upper
layer
length
fragment
offset
Header
checksum
19
fragmentation:
in: one large datagram
out: 3 smaller datagrams
reassembly
20
Application Layer
3
Transport Layer
Internet Layer
1
source port #
dest port #
sequence number
acknowledgement number
head not
UAP R S F
len used
checksum
application
data
(variable length)
23
FIN
Initiates a
connection
Open
SYN +
ACK
time
Accepts and
acknowledges
FIN
ACK
Acknowledges
and begins tx
application
transport
Network
Network
access
3. ACK
2. SYN + ACK
1. SYN
ACK
Three-way
Threehandshake
Close
ACK
4. Receive data
3. ACK
application
2. SYN + ACK transport
Network
1. SYN
Network
access
25
Host A
User
types
C
Host B
host ACKs
receipt of
C, echoes
back C
host ACKs
receipt
of echoed
C
time
simple telnet scenario
26
TCP characteristics
||| A message is transmitted and then a positive
acknowledgement is being waited for
||| If the positive acknowledgement does not arrive in
certain period of time, the message is retransmitted
||| Messages are numbered in sequence so that no one is
being lost or duplicated
||| Messages are delivered at the destination in the same
order they were sent by the source
27
28
29
32 bits
source port #
dest port #
length
checksum
Application
data
(message)
application
transport
Network
Network
access
1. Send data
application
transport
2. Receive data Network
Network
access
31
UDP checksum
Sender:
||| treat segment contents as
sequence of 16-bit integers
||| checksum: addition (1s
complement sum) of
segment contents
||| sender puts checksum
value into UDP checksum
field
Receiver:
||| compute checksum of received
segment
||| check if computed checksum
equals checksum field value:
- NO - error detected
- YES - no error detected.
32
Question?
You are mapping out the transmission of packets from one station to another
(TCP is used). Packets 1-10 are sent. Packets arrived in the following order:
3,4,2,5,1,8,7,10,9. What packets will be acknowledged and what, if any, will
need to be retransmitted?
A.
B.
C.
D.
Application Layer
Transport Layer
2
Internet Layer
1
application
transport
network
data link
physical
application
transport
network
data link
physical
application
transport
network
data link
physical
35
Summary