Important Networking Concepts Overview

1
 
Chapter 3: Review of
Important Networking
Concepts
Magda El Zarki
Dept. of CS
UC Irvine
http://www.ics.uci.edu/~magda
elzarki@uci.edu
2
Networking Concepts
 
Protocol Architecture
Protocol Layers
Encapsulation
Network Abstractions
3
Sending a packet from Argon to
Neon
4
Sending a packet from Argon to
Neon
1
2
8
.
1
4
3
.
7
1
.
2
1
 
i
s
 
n
o
t
 
o
n
 
m
y
 
l
o
c
a
l
 
n
e
t
w
o
r
k
.
Therefore, I need to send the packet to my 
default gateway with address 128.143.137.1 
frame
1
2
8
.
1
4
3
.
7
1
.
2
1
 
i
s
 
o
n
 
m
y
 
l
o
c
a
l
 
n
e
t
w
o
r
k
.
Therefore, I can send the packet directly.
frame
5
Communications Architecture
The complexity of the communication task is reduced by using
multiple protocol layers
:
Each protocol is implemented independently
Each protocol is responsible for a specific subtask
Protocols are grouped in a hierarchy
A structured set of protocols is called a 
communications
 
architecture
or
 
protocol suite
6
TCP/IP Protocol Suite
The TCP/IP protocol suite is the
protocol architecture of the
Internet
The TCP/IP suite has four layers:
Application, Transport, Network,
and Data Link Layer
End systems (hosts) implement
all four layers. Gateways
(Routers) only have the bottom
two layers.
7
Functions of the Layers
Data Link Layer:
Service: 
 
Reliable transfer of frames over a link
 
Media Access Control on a LAN
Functions: 
 
Framing, media access control, error checking
 Network Layer:
Service:
 
 
Move packets from source host to destination
host
Functions:
 
 
Routing, addressing
Transport Layer:
Service:
 
 
Delivery of data between hosts
Functions:
 
 
Connection establishment/termination, error
 
control, flow control
Application Layer:
Service: 
 
Application specific (delivery of email, retrieval
of HTML 
 
documents, reliable transfer of file)
Functions: 
 
Application specific
8
TCP/IP Suite and OSI Reference
Model
The TCP/IP protocol stack does not
define the lower layers of a complete
protocol stack
9
Assignment of Protocols to Layers
 
10
Layered Communications
An entity of a particular layer can only communicate with:
1
.
 
a
 
p
e
e
r
 
l
a
y
e
r
 
e
n
t
i
t
y
 
u
s
i
n
g
 
a
 
c
o
m
m
o
n
 
p
r
o
t
o
c
o
l
 
(
P
e
e
r
 
 
P
r
o
t
o
c
o
l
)
 
2. 
 
adjacent layers
 
to provide services and to receive 
 
 
services
11
Service Primitives
C
o
m
m
u
n
i
c
a
t
i
o
n
 
s
e
r
v
i
c
e
s
 
a
r
e
 
i
n
v
o
k
e
d
 
v
i
a
 
f
u
n
c
t
i
o
n
 
c
a
l
l
s
.
 
T
h
e
f
u
n
c
t
i
o
n
s
 
a
r
e
 
c
a
l
l
e
d
 
s
e
r
v
i
c
e
 
p
r
i
m
i
t
i
v
e
s
12
Service Primitives
R
e
c
a
l
l
:
 
A
 
l
a
y
e
r
 
N
+
1
 
e
n
t
i
t
y
 
s
e
e
s
 
t
h
e
 
l
o
w
e
r
 
l
a
y
e
r
s
 
o
n
l
y
 
a
s
 
a
 
s
e
r
v
i
c
e
p
r
o
v
i
d
e
r
 
Service Provider
13
Service Access Points
A
 
s
e
r
v
i
c
e
 
u
s
e
r
 
a
c
c
e
s
s
e
s
 
s
e
r
v
i
c
e
s
 
o
f
 
t
h
e
 
s
e
r
v
i
c
e
 
p
r
o
v
i
d
e
r
a
t
 
S
e
r
v
i
c
e
 
A
c
c
e
s
s
 
P
o
i
n
t
s
 
(
S
A
P
s
)
A SAP has an address that uniquely identifies where the
service can be accessed
14
Exchange of Data
Assume a layer-N entity at A wants to send data to a layer-N peer
entity to B
T
h
e
 
u
n
i
t
 
o
f
 
d
a
t
a
 
s
e
n
t
 
b
e
t
w
e
e
n
 
p
e
e
r
 
e
n
t
i
t
i
e
s
 
 
i
s
 
c
a
l
l
e
d
 
a
 
P
r
o
t
o
c
o
l
 
D
a
t
a
U
n
i
t
 
(
P
D
U
)
For now, let us think of a PDU as a single packet
What actually happens:  Layer N passes the PDU to one of A
s  SAPs at
layer N-1
The layer N-1 entity (at A) then constructs its own PDU which it sends to
the layer N-1 entity at B
Note:  PDU at layer N-1 =  Header
 
 +
 
PDU at layer N
A
B
15
Exchange of Data
A
B
16
Layers in the Example
17
Layers in the Example
18
Layers and Services
Service provided by TCP to HTTP:
reliable transmission of data over a logical connection
Service provided by IP to TCP:
unreliable transmission of IP datagrams across an IP network
Service provided by Ethernet to IP:
transmission of a frame across an Ethernet segment
Other services:
DNS
: translation between domain names and IP addresses
ARP
: Translation between IP addresses and MAC addresses
19
Encapsulation and Demultiplexing
As data is moving down the protocol stack, each protocol
is adding layer-specific control information
 
20
Encapsulation and Demultiplexing
in our Example
Let us look in detail at the Ethernet frame between Argon
and the Router, which contains the TCP connection
request to Neon.
This is the frame in hexadecimal notation.
 
00e0 f923 a820 00a0 2471 e444 0800 4500
002c 9d08 4000 8006 8bff 808f 8990
 
808f
4715 065b 0050 0009 465b 0000 0000 6002
2000 598e 0000 0204 05b4
21
Encapsulation and Demultiplexing
22
Encapsulation and
Demultiplexing:
Ethernet Header
23
Encapsulation and
Demultiplexing:
IP Header
24
Encapsulation and
Demultiplexing:
IP Header
25
Encapsulation and
Demultiplexing:
TCP Header
O
p
t
i
o
n
:
m
a
x
i
m
u
m
s
e
g
m
e
n
t
 
s
i
z
e
26
Encapsulation and
Demultiplexing:
TCP Header
27
Encapsulation and
Demultiplexing: Application data
28
Different Views of Networking
Different Layers of the protocol stack have a different view of the
network. This is HTTP
s and TCP
s view of the network.
 
29
Network View of IP Protocol
30
Network View of Ethernet
Ethernet
s view of the network
 
 
IP Addresses
Structure of an IP address
Subnetting
CIDR
IP Addresses
IP Addresses
What is an IP Address?
An IP address is a unique global address for a network
interface
An IP address:
i
s
 
a
 
3
2
 
b
i
t
 
l
o
n
g
 
i
d
e
n
t
i
f
i
e
r
e
n
c
o
d
e
s
 
a
 
n
e
t
w
o
r
k
 
n
u
m
b
e
r
 
(
n
e
t
w
o
r
k
 
p
r
e
f
i
x
)
 
 
a
n
d
 
a
 
h
o
s
t
n
u
m
b
e
r
 
Dotted Decimal Notation
I
P
 
a
d
d
r
e
s
s
e
s
 
a
r
e
 
w
r
i
t
t
e
n
 
i
n
 
a
 
s
o
-
c
a
l
l
e
d
 
d
o
t
t
e
d
 
d
e
c
i
m
a
l
n
o
t
a
t
i
o
n
Each byte is identified by a decimal number in the range
[0..255]:
 
  
 
1
st
 Byte
=
 
1
2
8
2
nd
 Byte
=
 
1
4
3
3
rd
 Byte
=
 
1
3
7
4
th
 Byte
=
 
1
4
4
1
2
8
.
1
4
3
.
1
3
7
.
1
4
4
The network prefix identifies a network and the host
number identifies a specific host (actually, interface on
the network).
H
o
w
 
d
o
 
w
e
 
k
n
o
w
 
h
o
w
 
l
o
n
g
 
t
h
e
 
n
e
t
w
o
r
k
 
p
r
e
f
i
x
 
i
s
?
T
h
e
 
n
e
t
w
o
r
k
 
p
r
e
f
i
x
 
i
s
 
i
m
p
l
i
c
i
t
l
y
 
d
e
f
i
n
e
d
 
(
c
l
a
s
s
-
b
a
s
e
d
a
d
d
r
e
s
s
i
n
g
)
T
h
e
 
n
e
t
w
o
r
k
 
p
r
e
f
i
x
 
i
s
 
i
n
d
i
c
a
t
e
d
 
b
y
 
a
 
n
e
t
m
a
s
k
.
Network prefix and Host number
network prefix
host number
E
x
a
m
p
l
e
:
 
e
l
l
i
n
g
t
o
n
.
c
s
.
v
i
r
g
i
n
i
a
.
e
d
u
Network id is: 
 
128.143.0.0
Host number is: 
 
137.144
Network mask is: 
 
255.255.0.0
    or   
ffff0000
Prefix notation: 
 
128.143.137.144/16
Network prefix  is 16 bits long
Example
128.143
137.144
The old way: Classful IP Adresses
When Internet addresses were standardized (early 1980s), the
Internet address space was divided up into classes:
C
l
a
s
s
 
A
:
 
N
e
t
w
o
r
k
 
p
r
e
f
i
x
 
i
s
 
8
 
b
i
t
s
 
l
o
n
g
C
l
a
s
s
 
B
:
 
N
e
t
w
o
r
k
 
p
r
e
f
i
x
 
i
s
 
1
6
 
b
i
t
s
 
l
o
n
g
C
l
a
s
s
 
C
:
 
N
e
t
w
o
r
k
 
p
r
e
f
i
x
 
i
s
 
2
4
 
b
i
t
s
 
l
o
n
g
Each IP address contained a key which identifies the class:
C
l
a
s
s
 
A
:
 
I
P
 
a
d
d
r
e
s
s
 
s
t
a
r
t
s
 
w
i
t
h
 
0
C
l
a
s
s
 
B
:
 
I
P
 
a
d
d
r
e
s
s
 
s
t
a
r
t
s
 
w
i
t
h
 
1
0
C
l
a
s
s
 
C
:
 
I
P
 
a
d
d
r
e
s
s
 
s
t
a
r
t
s
 
w
i
t
h
 
1
1
0
The old way: Internet Address
Classes
 
 
The old way: Internet Address
Classes
We will learn about multicast addresses later in this course.
Problems with Classful IP
Addresses
The original classful address scheme had a number
of problems
P
r
o
b
l
e
m
 
1
.
 
T
o
o
 
f
e
w
 
n
e
t
w
o
r
k
 
a
d
d
r
e
s
s
e
s
 
f
o
r
 
l
a
r
g
e
n
e
t
w
o
r
k
s
 
Class A and Class B addresses are gone
P
r
o
b
l
e
m
 
2
.
 
T
w
o
-
l
a
y
e
r
 
h
i
e
r
a
r
c
h
y
 
i
s
 
n
o
t
 
a
p
p
r
o
p
r
i
a
t
e
f
o
r
 
l
a
r
g
e
 
n
e
t
w
o
r
k
s
 
w
i
t
h
 
C
l
a
s
s
 
A
 
a
n
d
 
C
l
a
s
s
 
B
a
d
d
r
e
s
s
e
s
.
F
i
x
 
#
1
:
 
S
u
b
n
e
t
t
i
n
g
Problems with Classful IP
Addresses
P
r
o
b
l
e
m
 
3
.
 
I
n
f
l
e
x
i
b
l
e
.
 
A
s
s
u
m
e
 
a
 
c
o
m
p
a
n
y
 
r
e
q
u
i
r
e
s
 
2
,
0
0
0
a
d
d
r
e
s
s
e
s
Class A and B addresses are overkill
Class C address is insufficient (requires 8 Class C addresses)
F
i
x
 
#
2
:
 
C
l
a
s
s
l
e
s
s
 
I
n
t
e
r
d
o
m
a
i
n
 
R
o
u
t
i
n
g
 
(
C
I
D
R
)
Problems with Classful IP
Addresses
P
r
o
b
l
e
m
 
4
:
 
E
x
p
l
o
d
i
n
g
 
R
o
u
t
i
n
g
 
T
a
b
l
e
s
:
 
R
o
u
t
i
n
g
 
o
n
 
t
h
e
b
a
c
k
b
o
n
e
 
I
n
t
e
r
n
e
t
 
n
e
e
d
s
 
t
o
 
h
a
v
e
 
a
n
 
e
n
t
r
y
 
f
o
r
 
e
a
c
h
 
n
e
t
w
o
r
k
a
d
d
r
e
s
s
.
 
I
n
 
1
9
9
3
,
 
t
h
e
 
s
i
z
e
 
o
f
 
t
h
e
 
r
o
u
t
i
n
g
 
t
a
b
l
e
s
 
s
t
a
r
t
e
d
 
t
o
 
o
u
t
g
r
o
w
t
h
e
 
c
a
p
a
c
i
t
y
 
o
f
 
r
o
u
t
e
r
s
.
F
i
x
 
#
2
:
 
C
l
a
s
s
l
e
s
s
 
I
n
t
e
r
d
o
m
a
i
n
 
R
o
u
t
i
n
g
 
(
C
I
D
R
)
Problems with Classful IP
Addresses
P
r
o
b
l
e
m
 
5
.
 
T
h
e
 
I
n
t
e
r
n
e
t
 
i
s
 
g
o
i
n
g
 
t
o
 
o
u
t
g
r
o
w
 
t
h
e
 
3
2
-
b
i
t
 
a
d
d
r
e
s
s
e
s
F
i
x
 
#
3
:
 
I
P
 
V
e
r
s
i
o
n
 
6
Subnetting
P
r
o
b
l
e
m
:
 
O
r
g
a
n
i
z
a
t
i
o
n
s
h
a
v
e
 
m
u
l
t
i
p
l
e
 
n
e
t
w
o
r
k
s
w
h
i
c
h
 
a
r
e
 
i
n
d
e
p
e
n
d
e
n
t
l
y
m
a
n
a
g
e
d
S
o
l
u
t
i
o
n
 
1
:
 
A
l
l
o
c
a
t
e
 
o
n
e
 
o
r
m
o
r
e
 
a
d
d
r
e
s
s
e
s
 
f
o
r
 
e
a
c
h
n
e
t
w
o
r
k
Difficult to manage
-> From the outside of
the organization -
each network must be
addressable.
S
o
l
u
t
i
o
n
 
2
:
 
A
d
d
 
a
n
o
t
h
e
r
l
e
v
e
l
 
o
f
 
h
i
e
r
a
r
c
h
y
 
t
o
 
t
h
e
 
I
P
a
d
d
r
e
s
s
i
n
g
 
s
t
r
u
c
t
u
r
e
University Network
Medical 
School
Library
Engineering
School
Basic Idea of Subnetting
Split the host number portion of an IP address into a 
 
subnet
number
 and a (smaller) 
host number
.
Result is a 3-layer hierarchy
Then: 
 
Subnets can be freely assigned within the organization
Internally, subnets are treated as separate networks
Subnet structure is not visible outside the organization
network prefix
host number
subnet number
network prefix
host number
extended network prefix
R
o
u
t
e
r
s
 
a
n
d
 
h
o
s
t
s
 
u
s
e
 
a
n
 
e
x
t
e
n
d
e
d
 
n
e
t
w
o
r
k
 
p
r
e
f
i
x
 
(
s
u
b
n
e
t
 
m
a
s
k
)
 
t
o
 
i
d
e
n
t
i
f
y
 
t
h
e
s
t
a
r
t
 
o
f
 
t
h
e
 
h
o
s
t
 
n
u
m
b
e
r
s
*
 
There are different ways of subnetting. Commonly used netmasks for university networks with /16
prefix (Class B) are 255.255.255.0 and 255.255.0.0
Subnet Masks
Each layer-2 network (Ethernet segment, FDDI segment) is
allocated a subnet address when connected to a router.
Typical Addressing Plan for an Organization
that uses subnetting
128.143.0.0/16
Gateway
Router
R
R
R
Advantages of Subnetting
 
With subnetting, IP addresses use a 3-layer hierarchy:
Network
Subnet
Host
Improves efficiency of IP addresses by not consuming an entire
address space for each physical network.
Reduces router complexity. Since external routers do not know
about subnetting, the complexity of routing tables at external
routers is reduced.
Note: Length of the subnet mask need not be identical at all
subnetworks.
CIDR - Classless Interdomain
Routing
IP backbone routers have one routing table entry for each
network address:
With subnetting, a backbone router only needs to know one
entry for each network
This is acceptable for Class A and Class B networks
2
7
 = 128 Class A networks
2
14
 = 16,384 Class B networks
But this is not acceptable for Class C networks
2
21
 =  2,097,152 Class C networks
In 1993, the size of the routing tables started to outgrow the
capacity of routers
Consequence: The Class-based assignment of IP addresses
had to be abandoned
CIDR - Classless Interdomain
Routing
G
o
a
l
s
:
Restructure IP address assignments to increase efficiency
Hierarchical routing aggregation to minimize route table
entries
K
e
y
 
C
o
n
c
e
p
t
:
 
T
h
e
 
l
e
n
g
t
h
 
o
f
 
t
h
e
 
n
e
t
w
o
r
k
 
i
d
 
(
p
r
e
f
i
x
)
 
i
n
 
t
h
e
 
I
P
a
d
d
r
e
s
s
e
s
 
i
s
 
k
e
p
t
 
a
r
b
i
t
r
a
r
y
Consequence:
 Routers advertise the IP address and the
length of the prefix
CIDR Example
CIDR notation of a network address:
1
9
2
.
0
.
2
.
0
/
1
8
"18" says that the first 18 bits are the network part of the
address (and 14 bits are available for specific host addresses)
The network part is called the 
prefix
Assume that a site requires a network address with 1000
addresses
With CIDR, the network is assigned a continuous block of 1024
addresses with a 22-bit long  prefix
 
CIDR:  Prefix Size vs. Network Size
C
I
D
R
 
B
l
o
c
k
 
P
r
e
f
i
x
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#
 
o
f
 
H
o
s
t
 
A
d
d
r
e
s
s
e
s
 
 
 
 
 
 
 
 
 
 
 
/
2
7
3
2
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
2
6
6
4
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
2
5
1
2
8
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
2
4
2
5
6
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
2
3
5
1
2
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
2
2
1
,
0
2
4
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
2
1
2
,
0
4
8
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
2
0
4
,
0
9
6
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
1
9
8
,
1
9
2
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
1
8
1
6
,
3
8
4
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
1
7
3
2
,
7
6
8
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
1
6
6
5
,
5
3
6
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
1
5
1
3
1
,
0
7
2
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
1
4
2
6
2
,
1
4
4
 
h
o
s
t
s
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/
1
3
5
2
4
,
2
8
8
 
h
o
s
t
s
CIDR and Address assignments
Backbone ISPs obtain large block of IP addresses space
and then reallocate portions of their address blocks to
their customers.
E
x
a
m
p
l
e
:
Assume that an ISP owns the address block 
206.0.64.0/18
,
which represents 16,384 (2
32-18
=2
14
) IP addresses
Suppose a client requires 800 host addresses
With CIDR: 
Assign a /22 block (512=2
9
<800<1024=2
10
 -> 32-
10=22), i.e., 206.0.68.0/22 gives a block of 1,024 (2
10
) IP
addresses.
CIDR and Routing Information
206.0.64.0/18
204.188.0.0/15
209.88.232.0/21
Internet
Backbone
ISP X 
owns:
C
o
m
p
a
n
y
 
X
 
:
  
206.0.68.0/22
I
S
P
 
y
 
:
 
209.88.237.0/24
O
r
g
a
n
i
z
a
t
i
o
n
 
z
1
 
:
 
209.88.237.192/26
O
r
g
a
n
i
z
a
t
i
o
n
 
z
2
 
:
 
209.88.237.0/26
CIDR and Routing Information
206.0.64.0/18
204.188.0.0/15
209.88.232.0/21
Internet
Backbone
ISP X 
owns:
C
o
m
p
a
n
y
 
X
 
:
  206.0.68.0/22
I
S
P
 
y
 
:
 209.88.237.0/24
O
r
g
a
n
i
z
a
t
i
o
n
 
z
1
 
:
 
209.88.237.192/26
O
r
g
a
n
i
z
a
t
i
o
n
 
z
2
 
:
 209.88.237.0/26
Backbone sends everything
which matches the prefixes
206.0.64.0/18, 204.188.0.0/15,
209.88.232.0/21 
to ISP X.
ISP X sends everything which
matches the prefix:
206.0.68.0/22  
to Company X,
209.88.237.0/24 
to ISP y
Backbone routers do not know
anything about Company X, ISP
Y, or Organizations z1, z2.
ISP X does not know about
Organizations z1, z2.
ISP y sends everything which matches
the prefix:
209.88.237.192/26 
to Organizations z1
 
209.88.237.0/26 
to Organizations z2
Example
Belongs to:
Cable & Wireless USA 
 
207.0.0.0 - 207.3.255.255
Belongs to:
City of Charlottesville, VA:  
207.2.88.0 - 207.2.92.255
The IP Address:    
207.2.88.170
CIDR and Routing
A
g
g
r
e
g
a
t
i
o
n
 
o
f
 
r
o
u
t
i
n
g
 
t
a
b
l
e
 
e
n
t
r
i
e
s
:
128.143.0.0/16 and 128.142.0.0/16 are represented as
128.142.0.0/15
L
o
n
g
e
s
t
 
p
r
e
f
i
x
 
m
a
t
c
h
:
 
R
o
u
t
i
n
g
 
t
a
b
l
e
 
l
o
o
k
u
p
 
f
i
n
d
s
 
t
h
e
 
r
o
u
t
i
n
g
e
n
t
r
y
 
t
h
a
t
 
m
a
t
c
h
e
s
 
t
h
e
 
l
o
n
g
e
s
t
 
p
r
e
f
i
x
What is the outgoing interface for
128.143.137.0 ?
Routing table
Slide Note
Embed
Share

Review essential networking concepts including protocol architecture, protocol layers, encapsulation, network abstractions, communication architecture, and TCP/IP protocol suite. Understand the functions of different layers in networking for reliable data transfer and communication efficiency.

  • Networking Concepts
  • Protocol Architecture
  • TCP/IP Suite
  • Communication Architecture
  • Data Link Layer

Uploaded on May 11, 2024 | 3 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Chapter 3: Review of Important Networking Concepts Magda El Zarki Dept. of CS UC Irvine elzarki@uci.edu http://www.ics.uci.edu/~magda 1

  2. Networking Concepts Protocol Architecture Protocol Layers Encapsulation Network Abstractions 2

  3. Sending a packet from Argon to Neon 3

  4. Sending a packet from Argon to Neon Therefore, I need to send the packet to my default gateway with address 128.143.137.1 128.143.71.21 is on my local network. Therefore, I can send the packet directly. 128.143.71.21 is not on my local network. DNS: What is the IP address DNS: The IP address of neon.tcpip-lab.edu is 128.143.71.21 128.143.137.1 is 00:e0:f9:23:a8:20 ARP: What is the MAC address of 128.143.137.1? of neon.tcpip-lab.edu ? ARP: The MAC address of ARP: What is the MAC address of 128.143.71.21? ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28 frame frame 4

  5. Communications Architecture The complexity of the communication task is reduced by using multiple protocol layers: Each protocol is implemented independently Each protocol is responsible for a specific subtask Protocols are grouped in a hierarchy A structured set of protocols is called a communications architecture or protocol suite 5

  6. TCP/IP Protocol Suite Application User-level programs The TCP/IP protocol suite is the protocol architecture of the Internet Transport Operating system Network The TCP/IP suite has four layers: Application, Transport, Network, and Data Link Layer Data Link End systems (hosts) implement all four layers. Gateways (Routers) only have the bottom two layers. Data Link Sublayer in Local Area Networks Media Access Control (MAC) 6

  7. Functions of the Layers Data Link Layer: Service: Functions: Reliable transfer of frames over a link Media Access Control on a LAN Framing, media access control, error checking Network Layer: Service: host Functions: Transport Layer: Service: Functions: Move packets from source host to destination Routing, addressing Delivery of data between hosts Connection establishment/termination, error control, flow control Application Layer: Service: of HTML Functions: Application specific (delivery of email, retrieval documents, reliable transfer of file) Application specific 7

  8. TCP/IP Suite and OSI Reference Model The TCP/IP protocol stack does not define the lower layers of a complete protocol stack 8

  9. Assignment of Protocols to Layers ping Application Layer HTTP Telnet FTP DNS SNMP application Transport Layer TCP UDP Routing Protocols ICMP RIP Network Layer IP PIM IGMP OSPF DHCP Data Link Layer ARP Ethernet 9 Network Interface

  10. Layers in the Example HTTP HTTP HTTP protocol TCP TCP TCP protocol IP IP IP IP protocol IP protocol Ethernet Ethernet Ethernet Ethernet Ethernet Ethernet argon.tcpip- lab.edu 128.143.137.144 neon.tcpip-lab.edu 128.143.71.21 router71.tcpip- lab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpip- lab.edu 128.143.71.1 16

  11. Layers in the Example HTTP HTTP Send HTTP Request to neon Establish a connection to 128.143.71.21 at port 80Open TCP connection to 128.143.71.21 port 80 IP datagram is a TCP segment for port 80 TCP TCP Send IP data-gram to 128.143.71.21 Send a datagram (which contains a connection request) to 128.143.71.21 128.143.71.21 IP Send IP datagram to IP IP Frame is an IP datagram Frame is an IP datagram Send the datagram to 128.143.7.21 Send the datagram to 128.143.137.1 Ethernet Ethernet Ethernet Ethernet argon.tcpip- lab.edu 128.143.137.144 neon.tcpip-lab.edu 128.143.71.21 router71.tcpip- lab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpip- lab.edu 128.143.71.1 Send Ethernet frame to 00:20:af:03:98:28 Send Ethernet frame to 00:e0:f9:23:a8:20 17

  12. Layers and Services Service provided by TCP to HTTP: reliable transmission of data over a logical connection Service provided by IP to TCP: unreliable transmission of IP datagrams across an IP network Service provided by Ethernet to IP: transmission of a frame across an Ethernet segment Other services: DNS: translation between domain names and IP addresses ARP: Translation between IP addresses and MAC addresses 18

  13. Encapsulation and Demultiplexing As data is moving down the protocol stack, each protocol is adding layer-specific control information User data HTTP HTTP Header User data TCP TCP Header HTTP Header User data IP TCP segment IP Header TCP Header HTTP Header User data Ethernet IP datagram Ethernet Header Ethernet Trailer IP Header TCP Header HTTP Header User data Ethernet frame 19

  14. Encapsulation and Demultiplexing in our Example Let us look in detail at the Ethernet frame between Argon and the Router, which contains the TCP connection request to Neon. This is the frame in hexadecimal notation. 00e0 f923 a820 00a0 2471 e444 0800 4500 002c 9d08 4000 8006 8bff 808f 8990 808f 4715 065b 0050 0009 465b 0000 0000 6002 2000 598e 0000 0204 05b4 20

  15. Encapsulation and Demultiplexing 6 bytes destination address 4 bytes source address type CRC Application data Ethernet Header IP Header TCP Header Ethernet Trailer Ethernet frame 21

  16. Encapsulation and Demultiplexing: Ethernet Header 6 bytes 00:e0:f9:23:a8:20 4 bytes 0:a0:24:71:e4:44 0x0800 CRC 22

  17. Encapsulation and Demultiplexing: IP Header 32 bits version (4 bits) header length Total Length (in bytes) (16 bits) DS ECN flags (3 bits) Identification (16 bits) Fragment Offset (13 bits) TTL Time-to-Live (8 bits) Protocol (8 bits) Header Checksum (16 bits) Source IP address (32 bits) Destination IP address (32 bits) 23

  18. Encapsulation and Demultiplexing: IP Header 32 bits 0x4 0x5 0x0 0x0 4410 9d08 0102 00000000000002 12810 0x06 8bff 128.143.137.144 128.143.71.21 24

  19. Encapsulation and Demultiplexing: TCP Header 32 bits Source Port Number Destination Port Number Sequence number (32 bits) Acknowledgement number (32 bits) header length Flags window size 0 TCP checksum option type urgent pointer Option: maximum segment size length Max. segment size Application data TCP Header Ethernet Header IP Header Ethernet Trailer Ethernet frame 25

  20. Encapsulation and Demultiplexing: TCP Header 32 bits 162710 8010 60783510 010 819210 00002 610 0000002 0000102 0x598e 210 410 146010 26

  21. Encapsulation and Demultiplexing: Application data No Application Data in this frame Application data TCP Header Ethernet Header IP Header Ethernet Trailer Ethernet frame 27

  22. Different Views of Networking Different Layers of the protocol stack have a different view of the network. This is HTTP s and TCP s view of the network. Argon Neon 128.143.137.144 128.143.71.21 HTTP server HTTP server HTTP client TCP client TCP server TCP server IP Network 28

  23. Network View of IP Protocol 128.143.137.144 128.143.71.21 128.143.137.1 128.143.71.1 Router 128.143.71.0/24 Network 128.143.137.0/24 Network 29

  24. Network View of Ethernet Ethernet s view of the network Argon (128.143.137.144) Router137 (128.143.137.1) Ethernet Network 30

  25. IP Addresses Structure of an IP address Subnetting CIDR

  26. IP Addresses 32 bits version (4 bits) header length Type of Service/TOS (8 bits) Total Length (in bytes) (16 bits) flags (3 bits) Identification (16 bits) Fragment Offset (13 bits) TTL Time-to-Live (8 bits) Protocol (8 bits) Header Checksum (16 bits) Source IP address (32 bits) Destination IP address (32 bits)

  27. IP Addresses 32 bits 0x4 0x5 0x00 4410 9d08 0102 00000000000002 12810 0x06 8bff 128.143.137.144 128.143.71.21

  28. What is an IP Address? An IP address is a unique global address for a network interface An IP address: is a 32 bit long identifier encodes a network number (network prefix) and a host number

  29. Dotted Decimal Notation IP addresses are written in a so-called dotted decimal notation Each byte is identified by a decimal number in the range [0..255]: 10001111 10001001 10010000 10000000 1st Byte 2nd Byte 3rd Byte 4th Byte = 128 = 143 = 137 = 144 128.143.137.144

  30. Network prefix and Host number The network prefix identifies a network and the host number identifies a specific host (actually, interface on the network). network prefix host number How do we know how long the network prefix is? The network prefix is implicitly defined (class-based addressing) The network prefix is indicated by a netmask.

  31. Example Example: ellington.cs.virginia.edu 128.143 137.144 Network id is: 128.143.0.0 Host number is: 137.144 Network mask is: 255.255.0.0 or ffff0000 Prefix notation: 128.143.137.144/16 Network prefix is 16 bits long

  32. Subnetting Problem: Organizations have multiple networks which are independently managed Solution 1: Allocate one or more addresses for each network Difficult to manage -> From the outside of the organization - each network must be addressable. University Network Engineering School Medical School Library Solution 2: Add another level of hierarchy to the IP addressing structure Subnetting

  33. Basic Idea of Subnetting Split the host number portion of an IP address into a subnet number and a (smaller) host number. Result is a 3-layer hierarchy network prefix host number subnet number host number network prefix extended network prefix Then: Subnets can be freely assigned within the organization Internally, subnets are treated as separate networks Subnet structure is not visible outside the organization

  34. Typical Addressing Plan for an Organization that uses subnetting Each layer-2 network (Ethernet segment, FDDI segment) is allocated a subnet address when connected to a router. 128.143.71.0 / 24 R 128.143.0.0/16 128.143.16.0 / 24 Gateway 128.143.8.0 / 24 128.143.7.0 / 24 Router R 128.143.17.0 / 24 128.143.22.0 / 24 R 128.143.136.0 / 24

  35. Advantages of Subnetting With subnetting, IP addresses use a 3-layer hierarchy: Network Subnet Host Improves efficiency of IP addresses by not consuming an entire address space for each physical network. Reduces router complexity. Since external routers do not know about subnetting, the complexity of routing tables at external routers is reduced. Note: Length of the subnet mask need not be identical at all subnetworks.

  36. CIDR - Classless Interdomain Routing Goals: Restructure IP address assignments to increase efficiency Hierarchical routing aggregation to minimize route table entries Key Concept: The length of the network id (prefix) in the IP addresses is kept arbitrary Consequence: Routers advertise the IP address and the length of the prefix

  37. CIDR Example CIDR notation of a network address: 192.0.2.0/18 "18" says that the first 18 bits are the network part of the address (and 14 bits are available for specific host addresses) The network part is called the prefix Assume that a site requires a network address with 1000 addresses With CIDR, the network is assigned a continuous block of 1024 addresses with a 22-bit long prefix

  38. CIDR: Prefix Size vs. Network Size CIDR Block Prefix # of Host Addresses /27 32 hosts /26 64 hosts /25 128 hosts /24 256 hosts /23 512 hosts /22 1,024 hosts /21 2,048 hosts /20 4,096 hosts /19 8,192 hosts /18 16,384 hosts /17 32,768 hosts /16 65,536 hosts /15 131,072 hosts /14 262,144 hosts /13 524,288 hosts

  39. CIDR and Address assignments Backbone ISPs obtain large block of IP addresses space and then reallocate portions of their address blocks to their customers. Example: Assume that an ISP owns the address block 206.0.64.0/18, which represents 16,384 (232-18=214) IP addresses Suppose a client requires 800 host addresses With CIDR: Assign a /22 block (512=29<800<1024=210 -> 32- 10=22), i.e., 206.0.68.0/22 gives a block of 1,024 (210) IP addresses.

  40. CIDR and Routing Information Company X : 206.0.68.0/22 ISP X owns: 206.0.64.0/18 204.188.0.0/15 209.88.232.0/21 Internet Backbone ISP y : 209.88.237.0/24 Organization z1 : Organization z2 : 209.88.237.192/26 209.88.237.0/26

  41. CIDR and Routing Information anything about Company X, ISP Y, or Organizations z1, z2. Backbone routers do not know Company X : 206.0.68.0/22 ISP X owns: ISP y sends everything which matches the prefix: 209.88.237.192/26 to Organizations z1 209.88.237.0/26 to Organizations z2 ISP X does not know about Organizations z1, z2. 206.0.64.0/18 204.188.0.0/15 209.88.232.0/21 Internet Backbone matches the prefix: 206.0.68.0/22 to Company X, 209.88.237.0/24 to ISP y ISP X sends everything which ISP y : 209.88.237.0/24 Backbone sends everything which matches the prefixes 206.0.64.0/18, 204.188.0.0/15, 209.88.232.0/21 to ISP X. Organization z1 : Organization z2 : 209.88.237.192/26 209.88.237.0/26

  42. Example The IP Address: 207.2.88.170 207 2 88 170 10101010 11001111 00000010 01011000 Belongs to: City of Charlottesville, VA: 207.2.88.0 - 207.2.92.255 00000000 11001111 00000010 01011000 Belongs to: Cable & Wireless USA 207.0.0.0 - 207.3.255.255 00000000 11001111 00000000 00000000

  43. CIDR and Routing Aggregation of routing table entries: 128.143.0.0/16 and 128.142.0.0/16 are represented as 128.142.0.0/15 Longest prefix match: Routing table lookup finds the routing entry that matches the longest prefix Prefix Interface 128.0.0.0/4 128.128.0.0/9 interface #5 interface #2 What is the outgoing interface for 128.143.128.0/17 interface #1 128.143.137.0 ? Routing table

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#