TCP&subnetting
TCP&subnetting
TCP&subnetting
Cisco Certified
Network Associate
(CCNA)
CCNA
Module-2:-
Understanding and
configuring TCP/IP
CCNA Overview
• Classful IP Addressing
• Subnetting a Network
• Planning IP Addressing
• Assigning TCP/IP Addresses
CCNA Objectives
• Introduction to TCP/IP
• Internet addresses
• Obtaining an IP address
CCNA
Introduction to TCP/IP
CCNA History and Future of TCP/IP
Internet Addresses
CCNA •Planning IP Addressing
• Addressing Guidelines
• Assigning Network IDs
• Assigning Host IDs
CCNA Addressing Guidelines
IP
IP Address
Address are
are by
by TCP/IP
TCP/IP v-4.0
v-4.0
There
There are
are 55 Classes
Classes of
of IP
IP Addressing
Addressing
Class
Class A,
A, BB && CC are
are used
used for
for General
General Networking
Networking
Class
Class DD isis for
for Multicasting
Multicasting Purpose
Purpose
Class
Class EE isis for
for IETF’s
IETF’s own
own use
use
IP
IP Address
Address has
has two
two Part:-
Part:-
1. Network
2. Host
CCNA Addressing Guidelines
The
The First
First Number
Number in
in the
the Network
Network ID
ID Cannot
Cannot Be
Be 127
127
The
The Host
Host ID
ID Cannot
Cannot Be
Be All
All 255s
255s
The
The Host
Host ID
ID Cannot
Cannot Be
Be All
All Zeros
Zeros
IP
IP Addresses
Addresses are
are Represented
Represented inin Dotted
Dotted Decimal
Decimal Format
Format
Dotted
Dotted Decimal
Decimal isis by
by Four Octet ((w.x.y.z
Four Octet w.x.y.z))
IP
IP v-4.0
v-4.0 isis 32
32 bit
bit Addressing
Addressing Format
Format
CCNA Addressing Guidelines
11stst Octet
Octet (w)
(w) isis for
for the
the Identification
Identification of
of Class
Class
Each
Each Octet
Octet have
have 88 bit
bit value
value
The
The Values
Values are
are from
from 0-255
0-255 inin each
each octet
octet
••The
The Subnet
Subnet Mask
Mask isis used
used to
to Identify
Identify the
the Network
Network Part
Part
••The
The Network
Network ID
ID should
should be
be Constant
Constant for
for aa Particular
Particular Network
Network
The
The Host
Host ID
ID Must
Must Be
Be Unique
Unique to
to the
the Local
Local Network
Network ID
ID
CCNA Assigning Network IDs
1 2
Router
3
10.0.0.0 192.168.2.0 172.16.0.0
CCNA Assigning Host IDs
1 10.0.0.1
10. 0.0.1 172.16. 0.1
172.16. 0.1 2
Router
10.0.0.10
10 .0.0.10 172.16. 0.10
172.16. 0.10
192.168.2.11
192.168.2.
192.168.2.10
192.168.2 .10
10.0.0.11
10 .0.0.11 172.16. 0.11
172.16. 0.11
192.168.2.11
192.168.2 .11
10.0.0.12
10 .0.0.12 172.16. 0.12
172.16. 0.12
3
10.0.0.0 192.168.2.0 172.16.0.0
CCNA IP Addressing
• An IP address is a 32-bit sequence of 1s and 0s.
• To make the IP address easier to use, the address is
usually written as four decimal numbers separated by
periods.
• This way of writing the address is called the dotted
decimal format.
CCNA Decimal and Binary
Conversion
CCNA IPv4 Addressing
CCNA Class A, B, C, D, and E IP
Addresses
CCNA Reserved IP Addresses
• Certain host addresses are
reserved and cannot be
assigned to devices on a
network.
• An IP address that has
binary 0s in all host bit
positions is reserved for the
network address.
• An IP address that has
binary 1s in all host bit
positions is reserved for the
network address.
CCNA Public and Private IP
Addresses
• No two machines that connect to a public network can have
the same IP address because public IP addresses are global and
standardized.
• However, private networks that are not connected to the
Internet may use any host addresses, as long as each host
within the private network is unique.
• RFC 1918 sets aside three blocks of IP addresses for private,
internal use.
• Connecting a network using private addresses to the Internet
requires translation of the private addresses to public
addresses using Network Address Translation (NAT).
CCNA Introduction to Subnetting
• To create a subnet address, a network
administrator borrows bits from the host field
and designates them as the subnet field.
CCNA
•Subnetting a Network
• Subnets
• Subnet Masks
• Determining Local and Remote Hosts
CCNA Analogy
Dividing the barrel of apples
into small barrels or baskets
100 Apples does not give us any more
apples…
CCNA Analogy
10 barrels x 10 apples = 100 apples
10 10 10
100 Apples
(10 * 10) 10
10 10
10 10 10
Before subnetting:
• In any network (or subnet) we can
98 Apples
not use all the IP addresses for
(100 – 2) host addresses.
8 8 8
(less 2) (less 2) (less 2)
80 Apples 8
8 8
10 * (10 - 2) (less 2) (less 2) (less 2)
8 8 8
(less 2) (less 2) (less 2)
---
8 X 8 8
(less 2) (less 2) (less 2)
64 Apples 8
8 8
8 * (10 - 2) (less 2) (less 2) (less 2)
8 8 8
(less 2) (less 2) (less 2)
Hub Hub
CCNA Subnet Masks
IP
Address 10.50.100.
10.50.100. 200
Subnet
Mask 255.255.255.
255.255.255. 0
Network
ID 10.50.100.
10.50.100. 0
CCNA
Determining Local and Remote
Hosts
1 Example 1 2
Local Hosts
A D
192.168.1.100
192.168.1.100
B E
192.168.2.100
192.168.2.100
Router
C F
Subnet
Mask 255.255.0.0
255.255.0.0
CCNA
Classless Inter-Domain Routing
(CIDR)
63,534 2000
Wasted Allocated
CCNA
Limitations of Classful IP
Addressing
Adds Multiple Entries to Routing Tables
Network
Network ID
ID Host
Host ID
ID
Class C 255 255 255 0
w x y z
Company Network IDs
192.168.1.0
192.168.1.0 Internet
192.168.2.0
192.168.2.0
192.168.3.0
192.168.3.0
Portion of Internet Routing Tables
192.168.4.0
192.168.4.0 192.168.1.0 255.255.255.0 192.168.1.1
192.168.2.0 255.255.255.0 192.168.2.1
192.168.5.0
192.168.5.0 192.168.3.0 255.255.255.0 192.168.3.1
192.168.4.0 255.255.255.0 192.168.4.1
192.168.6.0
192.168.6.0 192.168.5.0 255.255.255.0 192.168.5.1
192.168.7.0 192.168.6.0 255.255.255.0 192.168.6.1
192.168.7.0 192.168.7.0 255.255.255.0 192.168.7.1
192.168.8.0
192.168.8.0 192.168.8.0 255.255.255.0 192.168.8.1
CCNA Defining CIDR
IP Address in Dotted w x y z
Decimal Notation
10.217.123.7
4 Values
Network
Network ID
ID Host
Host ID
ID
32 Values
IP Address in Binary Notation
1*128
1*128 1*64
1*64 0*32
0*32 1*16
1*16 1*8
1*8 0*4
0*4 0*2
0*2 1*1
1*1
128
128 6464 3232 16
16 88 44 22 11
128
128 64
64 00 16
16 88 00 00 11
Decimal Value 255
Example
217
217
CCNA •Binary Subnet Masks
Binary
BinaryRepresentation
Representation Decimal
DecimalRepresentation
Representation
11111111
11111111 255
255
11111110
11111110 254
254
11111100
11111100 252
252
11111000
11111000 248
248
11110000
11110000 240
240
11100000
11100000 224
224
11000000
11000000 192
192
10000000
10000000 128
128
00000000
00000000 00
CCNA Subnet Mask Table
IP 10
10 .. 217
217 .. 123
123 .. 77
Address
00001010
00001010 11011001
11011001 01111011
01111011 00000111
00000111
Subnet 255
255 .. 255
255 .. 240
240 .. 00
Mask
11111111
11111111 11111111
11111111 11110000
11110000 00000000
00000000
Number of Subnet
Mask Bits (ones) 88 ++ 88 ++ 44 ++ 00 == 20
20
IP Address in
CIDR Notation 10.217.123.7/20
10.217.123.7/20
CCNA Calculating the Network ID
IP Address in CIDR Notation: 10.217.123.7/20
IP 10
10 .. 217
217 .. 123
123 .. 77
Address
00001010
00001010 11011001
11011001 01111011
01111011 00000111
00000111
Subnet 255
255 .. 255
255 .. 240
240 .. 00
Mask
11111111
11111111 11111111
11111111 11110000
11110000 00000000
00000000
Network
ID
00001010
00001010 11011001
11011001 01110000
01110000 00000000
00000000
Network ID in
CIDR Notation 10.217.112.0/20
10.217.112.0/20
CCNA Determining Subnets
Example
Split into 4 Network the IP Address given below:-
200.100.1.0
255.255.255.0
Formula:- 2n –2 > No. of Network/No. of Site/Subnets
21-2 > 0 N/W Bit = 24+3
22-2 > 2 Host Bit = 5
23-2 > 6
Subnet Mask – 255.255.255.224
IP Address;- 200.100.1.111 00000 or 256
001 = 32 -224
010 = 64 32
011 = 96
100 = 128
110 = 160
111 = 224 (Not Valid)
CCNA Available Host IDs
Subnet Mask
Network
Network ID
ID Host
Host ID
ID
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 00 0 0 0 0 0 0
After Subnetting
Routing Table for Router B
220.78.168.0
220.78.168.0 220.78.168.0 255.255.255.0 220.78.168.1
220.78.168.64
220.78.168.64
220.78.168.128
220.78.168.128
220.78.168.192
220.78.168.192
220.78.169.0
220.78.169.0
Router
220.78.169.64
220.78.169.64 A
Router B
220.78.169.128
220.78.169.128
220.78.169.192
220.78.169.192
220.78.170.0
220.78.170.0
220.78.170.64
220.78.170.64
CCNA Supernetting
220.78.168.0
220.78.168.0 Router A Router B
VLSM (Variable Length Subnet
CCNA Mask)
INT.COM
DEL- 29 – 2 = 512
Subnet Mask- 255.255.11111111.00000000
255.255.254.0
CCNA IPv4 versus IPv6
• IP version 6 (IPv6)
has been defined and
developed.
• IPv6 uses 128 bits
rather than the 32 bits
currently used in IPv4.
• IPv6 uses hexadecimal
numbers to represent
the 128 bits.
IPv4
CCNA
Obtaining an IP Address
CCNA Obtaining an Internet Address
• Static addressing
–Each individual device must be configured with an IP
address.
• Dynamic addressing
–Reverse Address Resolution Protocol (RARP)
–Bootstrap Protocol (BOOTP)
–Dynamic Host Configuration Protocol (DHCP)
–DHCP initialization sequence
–Function of the Address Resolution Protocol
–ARP operation within a subnet
CCNA •Assigning TCP/IP Addresses
• Static IP Addressing
• Automatic IP Addressing
• Viewing TCP/IP Configuration
• Viewing TCP/IP Configuration Using
Ipconfig
CCNA Static IP Addressing
Internet Protocol (TCP/IP) Properties
General
Advanced...
OK Cancel
CCNA Static Assignment of IP
Addresses
• Each individual
device must be
configured with an
IP address.
CCNA Automatic IP Addressing
Internet Protocol (TCP/IP) Properties
General
Subnet mask :
Default gateway:
Advanced...
OK Cancel
CCNA Viewing TCP/IP Configuration
Internet Protocol (TCP/IP) Properties
General
Advanced...
OK Cancel
CCNAViewing TCP/IP Configuration
Command Prompt
Using Ipconfig
Microsoft Windows 2000 [version 5.00.2195]
(C) Copyright 1985-1999 Microsoft Corp.
C:\>ipconfig
C:\>_
Reverse
CCNA Address Resolution
Protocol (RARP)
RARP REQUEST
MAC HEADER IP HEADER
MESSAGE
Destination Destination
FF-FF-FF-FF-FF-FF 255.255.255.255 What is my IP
Source Source address?
FE:ED:FD:23:44:EF ????????
CCNA BOOTP IP
Problem 2
• Host IP Address: 10.10.10.193
• Network Mask: 255.255.255.0
• Subnet Mask: 255.255.255.240
Problem 3
• Host IP Address: 10.10.10.193
• Network Mask: 255.255.255.0
• Subnet Mask: 255.255.255.252
CCNA Review
• Classful IP Addressing
• Subnetting a Network
• Planning IP Addressing
• Assigning TCP/IP Addresses
CCNA Practice Session