Ạ
M NG MÁY TÍNH NÂNG CAO
1
s
k
r
o
w
t
e
N
Chapter 01: Overview
Chapter 01: Overview
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Data networks
Data networks
2
Businesses needed a solution
s
k
r
o
w
t
e
N
Data networks developed as a result of business
applications that were written for microcomputers.
that would
three
following
the
successfully address
problems:
• How to avoid duplication of equipment and
resources
• How to communicate efficiently
• How to set up and manage a network
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Network topology
Network topology
3
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Logical Topologies
Logical Topologies
4
Broadcast
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Token Passing
T
F
U
L
N
I
Local-area networks (LANs)
Local-area networks (LANs)
5
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Local-area networks (LANs)
Local-area networks (LANs)
6
LANs consist of the following components:
s
k
r
o
w
t
e
N
• Computers
• Network interface cards
• Peripheral devices
• Networking media
• Network devices
Some common LAN technologies are:
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
• Ethernet
• Token Ring
• FDDI
T
F
U
L
N
I
Wide-area networks (WANs)
Wide-area networks (WANs)
7
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Wide-area networks (WANs)
Wide-area networks (WANs)
8
WANs
then
interconnect LANs, which
provide access to computers or file servers
in other locations.
Some common WAN technologies are:
s
k
r
o
w
t
e
N
• Modems
• Integrated Services Digital Network (ISDN)
• Digital Subscriber Line (DSL)
• Frame Relay
• US (T) and Europe (E) Carrier Series – T1,
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
E1, T3, E3
• Synchronous Optical Network (SONET)
T
F
U
L
N
I
OSI layers
OSI layers
9
Dividing the network into seven layers
provides the following advantages:
• It breaks network communication into smaller,
more manageable parts.
s
k
r
o
w
t
e
N
• It standardizes network components to allow
multiple vendor development and support.
• It allows different types of network hardware
and software to communicate with each other.
• It prevents changes in one layer from affecting
other layers.
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
• It divides network communication into smaller
parts to make learning it easier to understand.
T
F
U
L
N
I
TCP/IP model
TCP/IP model
0
1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP/IP model
TCP/IP model
1
1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Ethernet and the OSI model
Ethernet and the OSI model
2
1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Ethernet and the OSI model
Ethernet and the OSI model
3
1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Ethernet Naming – MAC address
Ethernet Naming – MAC address
4
1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Ethernet frame fields
Ethernet frame fields
5
1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Start Frame Delimiter : 10101011
Encapsulating Data
Encapsulating Data
6
1
Application
Presentation
Session
Upper Layer Data
Segment
Transport
TCP Header
Upper Layer Data
s
k
r
o
w
t
e
N
Network
Packet
IP Header
Data
LLC Header
Data
FCSFCS
Data Link
Frame
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
MAC Header
Data
FCSFCS
Physical
Bits
I
0101110101001000010
T
F
U
L
N
De - encapsulating Data
De - encapsulating Data
7
1
Application
Presentation
Session
Upper Layer Data
Transport
s
k
r
o
w
t
e
N
Upper Layer Data
Network
TCP+ Upper Layer Data
IP + TCP + Upper Layer Data
Data Link
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
LLC Hdr + IP + TCP + Upper Layer Data
Physical
I
0101110101001000010
T
F
U
L
N
Switches and Bridges
8
1
Data Link
s
k
r
o
w
t
e
N
OR
1
2
3
4
1
2
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
• Each segment has its own collision domain
• All segments are in the same broadcast domain
• Broadcasts are forwarded to all segments
T
F
U
L
N
I
Ethernet Switching
Ethernet Switching
9
1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Network Device Domains
0
2
Hub
Bridge
Switch
Router
s
k
r
o
w
t
e
N
Collision Domains:
1 4 4
4
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Broadcast Domains:
1 1 1
4
T
F
U
L
N
I
1
2
s
k
r
o
w
t
e
N
Interconnecting Networks
Interconnecting Networks
with TCP/IP
with TCP/IP
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Introduction to TCP/IP
Introduction to TCP/IP
2
2
Host
Host
s
k
r
o
w
t
e
N
Internet
TCP/IP
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
•Early protocol suite
•Universal
T
F
U
L
N
I
OSI Model and TCP/IP Protocol Model
OSI Model and TCP/IP Protocol Model
3
2
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Application Layer Overview
Application Layer Overview
4
2
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Transport Layer Overview
5
2
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Transport Layer Functions
6
2
Distinguishes between
upper layer applications
s
k
r
o
w
t
e
N
Establishes end-to-end
connectivity between
applications
TCP
UDP
SPX
t
r
o
p
s
n
a
r
T
Defines flow control
Provides reliable or
IP
IPX
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
k
r
o
w
t
e
N
unreliable services for
data transfer
T
F
U
L
N
I
Reliable Transport Layer Functions
7
2
s
k
r
o
w
t
e
N
Sender
Receiver
Synchronize
Acknowledge, Synchronize
Acknowledge
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Connection Established
Connection Established
Connection Established
Connection Established
I
Data Transfer
(Send Segments)
T
F
U
L
N
TCP Segment Format
TCP Segment Format
8
2
Bit 0
Bit 15 Bit 16
Bit 31
Destination port (16)
Source port (16)
Sequence number (32)
s
k
r
o
w
t
e
N
Acknowledgement number (32)
20
bytes
Reserved (6) Code bits (6)
Window (16)
Header
length (4)
Checksum (16)
Urgent (16)
Options (0 or 32 if any)
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Data (varies)
T
F
U
L
N
I
Port Numbers
Port Numbers
9
2
Application
Layer
R
I
P
F
T
P
D
N
S
s
k
r
o
w
t
e
N
S
M
T
P
T
F
T
P
S
N
M
P
T
E
L
N
E
T
520520
2121
2323
2525
5353
6969
161161
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Port
Numbers
UDP
TCP
Transport
Layer
T
F
U
L
N
I
TCP Port Numbers
TCP Port Numbers
0
3
……
Source
Source
Port
Port
Dest.
Dest.
Port
Port
Telnet Z
Host Z
Host A
s
k
r
o
w
t
e
N
SP
DP
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
1028
1028
2323
……
Dest. port = 23.
Send packet to my
Telnet
application.
T
F
U
L
N
I
TCP Three Way Handshake
TCP Three Way Handshake
1
3
Host A
Host B
11
Send SYN
(seq=100 ctl=SYN)
s
k
r
o
w
t
e
N
SYN received
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Three Way Handshake
TCP Three Way Handshake
Host A
Host B
2
3
11
Send SYN
(seq=100 ctl=SYN)
s
k
r
o
w
t
e
N
SYN received
22
SYN received
Send SYN, ACK
(seq=300 ack=101 ctl=syn,ack)
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Three Way Handshake
TCP Three Way Handshake
Host A
Host B
3
3
11
Send SYN
(seq=100 ctl=SYN)
s
k
r
o
w
t
e
N
SYN received
22
SYN received
Send SYN, ACK
(seq=300 ack=101 ctl=syn,ack)
33
Established
(seq=101 ack=301 ctl=ack)
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Service Attacks
Denial--ofof--Service Attacks
Denial
4
3
s
k
r
o
w
t
e
N
Denial-of-service (DoS) attacks are designed to deny
services to legitimate hosts attempting to establish
connections. In a DoS attack, the hacker initiates a
synchronization but the receiving device replies to a non-
existent, unreachable IP address and then is placed in a
wait-state while waiting to receive the final ACK from the
initiator.
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Simple Acknowledgment
TCP Simple Acknowledgment
5
3
Sender
Receiver
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
•Window size = 1
T
F
U
L
N
I
TCP Simple Acknowledgment
TCP Simple Acknowledgment
6
3
Sender
Receiver
Send 1
Receive 1
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Simple Acknowledgment
TCP Simple Acknowledgment
Receiver
Sender
7
3
Send 1
Receive 1
Send ACK 2
s
k
r
o
w
t
e
N
Send 2
Receive 2
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Simple Acknowledgment
TCP Simple Acknowledgment
8
3
Receiver
Sender
Send 1
Receive 1
Send ACK 2
s
k
r
o
w
t
e
N
Send 2
Receive 2
Send ACK 3
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
•Window size = 1
T
F
U
L
N
I
TCP Simple Acknowledgment
TCP Simple Acknowledgment
Sender
Receiver
9
3
Send 1
Receive 1
Send ACK 2
Receive ACK 2
s
k
r
o
w
t
e
N
Send 2
Receive 2
Send ACK 3
Receive ACK 3
Send 3
Receive 3
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
•Window size = 1
T
F
U
L
N
I
TCP Simple Acknowledgment
TCP Simple Acknowledgment
Sender
Receiver
0
4
Send 1
Receive 1
Send ACK 2
Receive ACK 2
s
k
r
o
w
t
e
N
Send 2
Receive 2
Send ACK 3
Receive ACK 3
Send 3
Receive 3
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Receive ACK 4
•Window size = 1
T
F
U
L
N
I
TCP Sequence and Acknowledgment Numbers
TCP Sequence and Acknowledgment Numbers
1
4
……
Source
Source
Port
Port
Dest.
Dest.
Port
Port
Sequence
Sequence
#
#
Acknowledgement
Acknowledgement
#
#
s
k
r
o
w
t
e
N
I just
sent #10.
Source Dest. Seq. Ack.
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
1028
23
10
1
T
F
U
L
N
I
TCP Sequence and Acknowledgment Numbers
TCP Sequence and Acknowledgment Numbers
2
4
……
Source
Source
Port
Port
Dest.
Dest.
Port
Port
Sequence
Sequence
#
#
Acknowledgement
Acknowledgement
#
#
I just
sent #10.
s
k
r
o
w
t
e
N
I just got #10,
now I need #11.
Source Dest.
2323
1028
1028
Seq.
101010
Ack.
11
Source Dest.
1028
1028
2323
Seq.
11
Ack.
111111
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Sequence and Acknowledgment Numbers
TCP Sequence and Acknowledgment Numbers
3
4
……
Source
Source
Port
Port
Dest.
Dest.
Port
Port
Sequence
Sequence
#
#
Acknowledgement
Acknowledgement
#
#
s
k
r
o
w
t
e
N
I just
sent #11.
I just got #10,
now I need #11.
Source Dest.
2323
1028
1028
Seq.
101010
Ack.
11
Source Dest.
1028
1028
2323
Seq.
11
Ack.
111111
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Source Dest.
2323
1028
1028
Seq.
111111
Ack.
22
T
F
U
L
N
I
TCP Basic Windowing
TCP Basic Windowing
4
4
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Sliding Windowing
TCP Sliding Windowing
5
4
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
TCP Sliding Windowing
TCP Sliding Windowing
6
4
s
k
r
o
w
t
e
N
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
UDP Segment Format
UDP Segment Format
7
4
1Bit 0
Bit 15 Bit 16
Bit 31
Destination port (16)
Source port (16)
8
Bytes
Length (16)
Checksum (16)
s
k
r
o
w
t
e
N
Data (if any)
•No sequence or acknowledgment fields
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Network Layer Functions
8
4
logical
and
IP, IPX
k
r
o
w
t
e
N
s
k
r
o
w
t
e
N
802.2
i
• Defines
source
destination
addresses
associated with a
specific protocol
k
n
L
a
t
a
D
• Defines
paths
through network
802.3
• Interconnects
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
EIA/TIA-232
v.35
l
a
c
i
s
y
h
P
multiple data links
T
F
U
L
N
I
Network Layer Functions
9
4
Network Layer End Station Packet
Data
IP Header
Source
address
Destination
address
s
k
r
o
w
t
e
N
172.15.1.1
Network
Node
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Network Layer Functions
Network Layer Functions
0
5
Address
Mask
172.16.122.204 255.255.0.0
s
k
r
o
w
t
e
N
172
16
122
204
10101100 00010000 01111010 11001100
255
255
0
0
11111111 11111111 00000000 00000000
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Network
Host
T
F
U
L
N
I
Internet Layer Overview
Internet Layer Overview
1
5
Internet Protocol (IP)
Internet Protocol (IP)
s
k
r
o
w
t
e
N
Application
Internet Control Message
Internet Control Message
Protocol (ICMP)
Protocol (ICMP)
Transport
Internet
Address Resolution
Address Resolution
Protocol (ARP)
Protocol (ARP)
Data Link
Physical
Reverse Address
Reverse Address
Resolution Protocol (RARP)
Resolution Protocol (RARP)
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
OSI network layer corresponds to the
TCP/IP internet layer
T
F
U
L
N
I
IP Datagram
IP Datagram
2
5
1Bit 0
Bit 15 Bit 16
Bit 31
Total Length (16)
Version
(4)
Header
Length (4)
Priority & Type
of Service (8)
Identification (16)
Fragment offset (13)
Flags
(3)
s
k
r
o
w
t
e
N
Time to live (8)
Protocol (8)
Header checksum (16)
20
Bytes
Source IP Address (32)
Destination IP Address (32)
Options (0 or 32 if any)
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Data (varies if any)
T
F
U
L
N
I
Protocol Field
Protocol Field
3
5
UDP
TCP
Transport
Layer
s
k
r
o
w
t
e
N
6
17
Protocol
Numbers
IP
Internet
Layer
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Internet Control Message Protocol
Internet Control Message Protocol
4
5
Application
s
k
r
o
w
t
e
N
Destination
Unreachable
Transport
1
ICMP
Echo (Ping)
Internet
Other
Data Link
Physical
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Address Resolution Protocol
Address Resolution Protocol
5
5
I need the
Ethernet
address of
176.16.3.2.
s
k
r
o
w
t
e
N
172.16.3.1
172.16.3.2
IP: 172.16.3.2 = ???
IP: 172.16.3.2 = ???
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Address Resolution Protocol
Address Resolution Protocol
6
5
I need the
I need the
Ethernet
Ethernet
address of
address of
176.16.3.2.
176.16.3.2.
s
k
r
o
w
t
e
N
I heard that broadcast.
I heard that broadcast.
The message is for me.
The message is for me.
Here is my Ethernet
Here is my Ethernet
address.
address.
172.16.3.1
172.16.3.2
IP: 172.16.3.2 = ???
IP: 172.16.3.2 = ???
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Address Resolution Protocol
Address Resolution Protocol
7
5
I need the
I need the
Ethernet
Ethernet
address of
address of
176.16.3.2.
176.16.3.2.
s
k
r
o
w
t
e
N
I heard that broadcast.
I heard that broadcast.
The message is for me.
The message is for me.
Here is my Ethernet
Here is my Ethernet
address.
address.
172.16.3.1
172.16.3.2
IP: 172.16.3.2 = ???
IP: 172.16.3.2 = ???
IP: 172.16.3.2
IP: 172.16.3.2
Ethernet: 0800.0020.1111
Ethernet: 0800.0020.1111
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Address Resolution Protocol
Address Resolution Protocol
8
5
I need the
I need the
Ethernet
Ethernet
address of
address of
176.16.3.2.
176.16.3.2.
I heard that broadcast.
I heard that broadcast.
The message is for me.
The message is for me.
Here is my Ethernet
Here is my Ethernet
address.
address.
s
k
r
o
w
t
e
N
172.16.3.1
172.16.3.2
IP: 172.16.3.2 = ???
IP: 172.16.3.2 = ???
IP: 172.16.3.2
IP: 172.16.3.2
Ethernet: 0800.0020.1111
Ethernet: 0800.0020.1111
•Map IP
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
MAC
T
F
U
L
N
I
Reverse ARP
Reverse ARP
9
5
What is
my IP
address?
s
k
r
o
w
t
e
N
Ethernet: 0800.0020.1111 IP = ???
Ethernet: 0800.0020.1111 IP = ???
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Reverse ARP
Reverse ARP
0
6
What is
my IP
address?
I heard that
broadcast.
Your IP
address is
172.16.3.25.
s
k
r
o
w
t
e
N
Ethernet: 0800.0020.1111 IP = ???
Ethernet: 0800.0020.1111 IP = ???
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Reverse ARP
Reverse ARP
1
6
What is
my IP
address?
I heard that
broadcast.
Your IP
address is
172.16.3.25.
s
k
r
o
w
t
e
N
Ethernet: 0800.0020.1111 IP = ???
Ethernet: 0800.0020.1111 IP = ???
Ethernet: 0800.0020.1111
Ethernet: 0800.0020.1111
IP: 172.16.3.25
IP: 172.16.3.25
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Reverse ARP
Reverse ARP
2
6
What is
my IP
address?
I heard that
broadcast.
Your IP
address is
172.16.3.25.
s
k
r
o
w
t
e
N
Ethernet: 0800.0020.1111 IP = ???
Ethernet: 0800.0020.1111 IP = ???
Ethernet: 0800.0020.1111
Ethernet: 0800.0020.1111
IP: 172.16.3.25
IP: 172.16.3.25
• Map MAC
IP
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Introduction to TCP/IP Addresses
Introduction to TCP/IP Addresses
3
6
172.16.0.1
172.18.0.1
172.18.0.2
172.16.0.2
HDR
SADA
DATA
10.13.0.0
192.168.1.0
192.168.1.1
10.13.0.1
172.17.0.1
172.17.0.2
s
k
r
o
w
t
e
N
• Unique addressing allows communication
between end stations
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
• Path choice is based on destination address
T
F
U
L
N
I
IP Addressing
IP Addressing
4
6
32 bits
Network
Host
Dotted
Decimal
Maximum
255
255
255
255
s
k
r
o
w
t
e
N
8 9
16 17
24 25
32
1
Binary
11111111 11111111 11111111 11111111
4
6
2
3
68421
1
4
6
2
3
68421
1
4
6
2
3
68421
1
4
6
2
3
68421
1
8
2
1
8
2
1
8
2
1
8
2
1
172
16
122
204
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
10101100 00010000 01111010 11001100
I
Example
Decimal
Example
Binary
T
F
U
L
N
IP Address Classes
IP Address Classes
5
6
8 bits
8 bits
8 bits
8 bits
Network
Network
Network
Network
HostHost
HostHost
HostHost
HostHost
HostHost
HostHost
•Class A:
Network
Network Network
Network Network
Network
Network
Network
HostHost
HostHost
HostHost
HostHost
s
k
r
o
w
t
e
N
•Class B:
Network Network
Network Network
Network
Network
Network
Network Network
Network Network
Network
HostHost
HostHost
•Class C:
•Class D:
Multicast
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
•Class E: Research
T
F
U
L
N
I
IP Address Classes
IP Address Classes
8 9
16 17
24 25
32
1
6
6
Bits:
0NNNNNNN
0NNNNNNN
HostHost
HostHost
HostHost
Range (1-126)
1
8 9
16 17
24 25
32
Bits:
s
k
r
o
w
t
e
N
10NNNNNN
10NNNNNN
Network
Network
HostHost
HostHost
Range (128-191)
1
8 9
16 17
24 25
32
Bits:
110NNNNN
110NNNNN
Network
Network
Network
Network
HostHost
Range (192-223)
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
1
8 9
16 17
24 25
32
Bits:
Multicast Group Multicast Group
Multicast Group
Multicast Group Multicast Group
1110MMMM Multicast Group
1110MMMM
I
Range (224-239)
T
F
U
L
N
Host Addresses
Host Addresses
7
6
172.16.2.2
10.1.1.1
10.6.24.2
E1
10.250.8.11
172.16.3.10
E0
172.16.2.1
s
k
r
o
w
t
e
N
172.16.12.12
10.180.30.118
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
Routing Table
Network
Interface
172.16
.
12
.
12
I
172.16.0.0
E0
Network
Host
10.0.0.0
E1
T
F
U
L
N
Determining Available Host Addresses
Determining Available Host Addresses
Network
Host
8
6
172
16
0 0
6
1
5
1
4
1
3
1
2
1
1
1
09 87654321
1
N
s
k
r
o
w
t
e
N
10101100 00010000 00000000 00000000
00000000 00000001
00000000 00000011
1
2
3
.
.
.
.
.
.
.
.
.
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
11111101
11111111
11111111 11111110
11111111 11111111
65534
65535
65536
2
-
I
2N-2 = 216-2 = 65534
65534
T
F
U
L
N
Addressing without Subnets
Addressing without Subnets
9
6
s
k
r
o
w
t
e
N
172.16.255.253 172.16.255.254
172.16.0.1 172.16.0.2 172.16.0.3
…...
172.16.0.0
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
•Network 172.16.0.0
T
F
U
L
N
I
Addressing with Subnets
Addressing with Subnets
0
7
172.16.3.0
s
k
r
o
w
t
e
N
172.16.4.0
172.16.1.0
172.16.2.0
•Network 172.16.0.0
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Subnet Addressing
Subnet Addressing
1
7
172.16.2.200
172.16.3.5
172.16.3.1
E1
E0
172.16.2.2
172.16.3.100
172.16.2.1
s
k
r
o
w
t
e
N
172.16.2.160
172.16.3.150
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
New Routing Table
Network
Interface
172.16
.
2
.
160
172.16.0.0
E0
Network
Host
I
172.16.0.0
E1
T
F
U
L
N
Subnet Addressing
Subnet Addressing
2
7
172.16.2.200
172.16.3.5
172.16.3.1
E1
172.16.2.2
172.16.3.100
E0
172.16.2.1
s
k
r
o
w
t
e
N
172.16.2.160
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
New Routing Table
Network
Interface
172.16
.
2
.
160
172.16.2.0
E0
Network
Subnet
Host
I
172.16.3.0
E1
T
F
U
L
N
Subnet Mask
Subnet Mask
Network
Host
3
7
172172
172172
1616
1616
00
00
00
00
IP
Address
Network
Host
s
k
r
o
w
t
e
N
Default
Subnet
Mask
255255
11111111
255255
11111111
00
00000000
00
00000000
Also written as “/16” where 16 represents the number of 1s
in the mask.
Network
Subnet
Host
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
255255
255255
255255
255255
255255
255255
00
00
8-bit
Subnet
Mask
I
Also written as “/24” where 24 represents the number of 1s
in the mask.
T
F
U
L
N
Decimal Equivalents of Bit Patterns
Decimal Equivalents of Bit Patterns
128 64
32
16
8
4
2
1
4
7
0
0
0
0
0
0
0
0
=
0
1
0
0
0
0
0
0
0
=
128
s
k
r
o
w
t
e
N
1
1
0
0
0
0
0
0
=
192
1
1
1
0
0
0
0
0
=
224
1
1
1
1
0
0
0
0
=
240
1
1
1
1
1
0
0
0
=
248
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
1
1
1
1
1
1
0
0
=
252
1
1
1
1
1
1
1
0
=
254
I
1
1
1
1
1
1
1
1
=
255
T
F
U
L
N
Subnet Mask without Subnets
Subnet Mask without Subnets
5
7
Network
Host
10101100
00010000
00000010
10100000
172.16.2.160
172.16.2.160
s
k
r
o
w
t
e
N
11111111
11111111
00000000
00000000
255.255.0.0
255.255.0.0
00000000
00000000
10101100
00010000
172
16
0
0
Network
Number
•Subnets not in use—the default
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
T
F
U
L
N
I
Subnet Mask with Subnets
Subnet Mask with Subnets
Subnet
Network
Host
6
7
10101100
00010000
00000010
10100000
172.16.2.160
172.16.2.160
11111111
11111111
00000000
11111111
255.255.255.0
255.255.255.0
s
k
r
o
w
t
e
N
10101100
00010000
00000010
00000000
8
2
1
2
9
1
4
2
2
0
4
2
8
4
2
2
5
2
4
5
2
5
5
2
172
16
2
0
Network
Number
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
•Network number extended by eight bits
T
F
U
L
N
I
Subnet Mask with Subnets
Subnet Mask with Subnets
7
7
Subnet
Network
Host
10100000
10101100
00010000
00000010
172.16.2.160
172.16.2.160
11111111
11111111
11000000
11111111
s
k
r
o
w
t
e
N
255.255.255.192
255.255.255.192
10101100
00010000
00000010
10000000
8
2
1
2
9
1
4
2
2
0
4
2
8
4
2
2
5
2
4
5
2
5
5
2
8
2
1
2
9
1
4
2
2
0
4
2
8
4
2
2
5
2
4
5
2
5
5
2
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
172
16
2
128
Network
Number
•Network number extended by ten bits
T
F
U
L
N
I
Broadcast Addresses
Broadcast Addresses
8
7
172.16.3.0
s
k
r
o
w
t
e
N
172.16.4.0
172.16.1.0
172.16.2.0
172.16.3.255
(Directed broadcast)
r
e
t
u
p
m
o
C
d
e
c
n
a
v
d
A
XX
255.255.255.255
(Local network broadcast)
I
172.16.255.255
(All subnets broadcast)
T
F
U
L
N