Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

TCP&subnetting

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 73

CCNA

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

• The U.S. Department of


Defense (DoD) created the
TCP/IP reference model
because it wanted a network
that could survive any
conditions.
• Some of the layers in the
TCP/IP model have the same
name as layers in the OSI
model.
CCNA Application Layer

• Handles high-level protocols, issues of


representation, encoding, and dialog control.
• The TCP/IP protocol suite combines all
application related issues into one layer and
ensures this data is properly packaged
before passing it on to the next layer.
CCNA Application Layer Examples
CCNA Transport Layer

Five basic services:


• Segmenting upper-layer application data
• Establishing end-to-end operations
• Sending segments from one end host to
another end host
• Ensuring data reliability
• Providing flow control
CCNA Transport Layer Protocols
CCNA Internet Layer
The purpose of the Internet layer is to send
packets from a network node and have them
arrive at the destination node independent of the
path taken.
CCNA Network Access Layer
• The network access layer is concerned with all of the issues that an IP
packet requires to actually make a physical link to the network media.
• It includes the LAN and WAN technology details, and all the details
contained in the OSI physical and data link layers.
CCNA Comparing the OSI Model and
TCP/IP Model
CCNASimilarities of the OSI and TCP/IP
Models
• Both have layers.
• Both have application layers, though they
include very different services.
• Both have comparable transport and network
layers.
• Packet-switched, not circuit-switched,
technology is assumed.
• Networking professionals need to know both
models.
CCNADifferences of the OSI and TCP/IP
Models
• TCP/IP combines the presentation and session
layer into its application layer.
• TCP/IP combines the OSI data link and
physical layers into one layer.
• TCP/IP appears simpler because it has fewer
layers.
• TCP/IP transport layer using UDP does not
always guarantee reliable delivery of packets
as the transport layer in the OSI model does.
CCNA Internet Architecture

• Two computers, anywhere in the world,


following certain hardware, software,
protocol specifications, can communicate,
reliably even when not directly connected.
• LANs are no longer scalable beyond a
certain number of stations or geographic
separation.
CCNA

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

• It is the same as taking a barrel of 10


100 apples and dividing it into 10
barrels of 10 apples each.
CCNA Analogy
100 – 2 apples = 98 Usable Apples

Before subnetting:

 
• In any network (or subnet) we can
98 Apples
not use all the IP addresses for
(100 – 2) host addresses.
                                                              

• We lose two addresses for every


network or subnet.
1. Network Address - One address is
reserved to that of the network.
2. Broadcast Address – One address
is reserved to address all hosts in
that network or subnet.
CCNA 10 barrels x 8 apples = 80 apples

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)

• In subnetting we will see that we


8
continue to lose two apples per subnet,
one for the address and one for the
broadcast.
CCNA 10 barrels x 8 apples = 80 apples

---
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)

• We “might” also lose the last basket of apples,


subnet, as it contains the broadcast address for the
entire network.
X ---
8

• In older networks, we “might” also lost the first


basket, subnet, as it contained the address of the
entire network, but this is usually no longer the
case.
CCNA
Subnets
Subnet 1 Subnet 2
1 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)

• Limitations of Classful IP Addressing


• Defining CIDR
• Sub netting
• Super netting
• VLSM
CCNA
Limitations of Classful IP
Addressing
Wastes IP Addresses
Network
Network ID
ID Host
Host ID
ID
Class B 255 255 0 0
w x y z

Network of 2000 Computers


Assigned 65,534 IP Addresses

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

00001010 11011001 01111011 00000111


CCNA •Binary IP Addresses

• Converting to Binary Format


• Converting to Binary Format Using a
Calculator
CCNA Converting to Binary Format
Binary Notation (Base 2)

2277 2266 2255 2244 2233 2222 2211 2200


8 Bits
128
128 64
64 32
32 16
16 88 44 22 11
11 11 11 11 11 11 11 11
11 11 00 11 11 00 00 11

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

• Subnet Mask Bits


• CIDR Notation
• Calculating the Network ID
CCNA Subnet Mask Bits

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

No. of Bit 128 64 32 16 8 4 2 1 Subnet


Bit Value 0 0 0 0 0 0 0 0 Value
1 128 1 0 0 0 0 0 0 0 128
2 64 1 1 0 0 0 0 0 0 128+64=192
3 32 1 1 1 0 0 0 0 0 128+64+32=224
4 16 1 1 1 1 0 0 0 0 128+64+32+16=240
5 8 1 1 1 1 1 0 0 0 128+64+32+16+8=248
6 4 1 1 1 1 1 1 0 0 128+64+32+16+8+4=252
7 2 1 1 1 1 1 1 1 0 128+64+32+16+8+4+2=254
8 1 1 1 1 1 1 1 1 1 128+64+32+16+8+4+2+1=255
CCNA CIDR Notation

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

Number of Host IDs : 2n - 2


CCNA Subnetting Use

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

Routing Table for Router B


After Supernetting:
220.78.168.0 255.255.255.0 220.78.168.1

220.78.168.0
220.78.168.0 Router A Router B
VLSM (Variable Length Subnet
CCNA Mask)
INT.COM

DELHI MUMBAI CHENNAI HYD


500 CLIENTS 2000 50 5
CLIENTS CLIENTS

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

You can get IP settings assigned automatically if your network


supports this capability. Otherwise, you need to ask your
network administrator for the appropriate IP settings.
Obtain an IP address automatically
Use the following IP address:
IP address: 192 . 168 . 1 . 200

Subnet mask : 255 . 255 . 255. 0

Default gateway: 192. 168 . 1 . 1

Obtain DNS server address automatically


Use the following DNS server addresses:
Preferred DNS server:
Alternate DNS server:

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

You can get IP settings assigned automatically if your network


supports this capability. Otherwise, you need to ask your
network administrator for the appropriate IP settings.
Obtain an IP address automatically
Use the following IP address:
IP address:

Subnet mask :

Default gateway:

Obtain DNS server address automatically


Use the following DNS server addresses:
Preferred DNS server:
Alternate DNS server:

Advanced...

OK Cancel
CCNA Viewing TCP/IP Configuration
Internet Protocol (TCP/IP) Properties

General

You can get IP settings assigned automatically if your network


supports this capability. Otherwise, you need to ask your
network administrator for the appropriate IP settings.
Obtain an IP address automatically
Use the following IP address:
IP address: 192 . 168 . 1 . 200

Subnet mask : 255 . 255 . 255. 0

Default gateway: 192. 168 . 1 . 1

Obtain DNS server address automatically


Use the following DNS server addresses:
Preferred DNS server:
Alternate DNS server:

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

Windows 2000 IP Configuration

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . :


IP Address. . . . . . . . . . . . : 192.168.1.200
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

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

• The Bootstrap Protocol (BOOTP) operates


in a client/server environment and only
requires a single packet exchange to obtain
IP information.
• BOOTP packets can include the IP address,
as well as the address of a router, the
address of a server, and vendor-specific
information.
Dynamic
CCNA Host Configuration
Protocol
• Allows a host to obtain an IP address using
a defined range of IP addresses on a DHCP
server.
• As hosts come online, contact the DHCP
server, and request an address.
CCNA Problems in Address
Resolution
• In TCP/IP communications, a datagram on a local-area
network must contain both a destination MAC address and
a destination IP address.
• There needs to be a way to automatically map IP to MAC
addresses.
• The TCP/IP suite has a protocol, called Address
Resolution Protocol (ARP), which can automatically
obtain MAC addresses for local transmission.
• TCP/IP has a variation on ARP called Proxy ARP that will
provide the MAC address of an intermediate device for
transmission outside the LAN to another network segment.
CCNA Address Resolution Protocol
(ARP)
• Each device on a network maintains
its own ARP table.
• A device that requires an IP and
MAC address pair broadcasts an
ARP request.
• If one of the local devices matches
the IP address of the request, it sends
back an ARP reply that contains its
IP-MAC pair.
• If the request is for a different IP
network, a router performs a proxy
ARP.
• The router sends an ARP response
with the MAC address of the
interface on which the request was
received, to the requesting host.
CCNA Your Turn!
Problem 1
• Host IP Address: 10.10.10.193
• Network Mask: 255.255.0.0
• Subnet Mask: 255.255.255.0

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

• Classless Inter-Domain Routing (CIDR )


• Binary IP Addresses
• Binary Subnet Masks
• IP Address Allocation Using CIDR
• Subnetting
• Supernetting
• Variable Length of Subnet mask
CCNA Review

• Classful IP Addressing
• Subnetting a Network
• Planning IP Addressing
• Assigning TCP/IP Addresses
CCNA Practice Session

You might also like