Acknowledgements
Note:
This PowerPoint is based on version 2.0 of the Curriculum
If I have not directly quoted Cisco Networking
Academy material, then I
have summarized it. Therefore, the
content of this PowerPoint Presentation is the exclusive property of Cisco
Systems, Inc. and all rights that pertain to the actual curriculum apply.
You may not copy, print, or otherwise use this material for any other purpose
than viewing and taking notes. Other Cisco Certified Academy Instructors (CCAI)
may use it for lecture preparations and classroom presentations in CNAP
licensed classrooms only.
In addition to the Cisco Networking
Academy curriculum, I
have relied heavily on Todd Lammle’s books and material. You can purchase his
products at www.sybex.com.
For those of you who have emailed me in
the past with comments, questions, critiques, and criticism—Thank You!! I can
be reached at allan1962@hotmail.com.
Created 12/2001
IP Addressing


♦
Network—identifies
the network or subnet
♦
Host—identifies
the device on that network/subnet


IP
Address Classes
Class
A: 1.0.0.0 to 127.0.0.0
Network
|
Host
|
Host
|
Host
|
1st
Octet Bits: 0 x x x x x
(The 128 bit
is off.)
Class
B: 128.0.0.0 to 191.255.0.0
Network
|
Network
|
Host
|
Host
|
1st
Octet Bits: 1 0 x x x x
(The 128 bit
is on and the 64 bit is off.)
Class C: 192.0.0.0 to 223.255.255.0
Network
|
Network
|
Network
|
HOst
|
1st
Octet Bits: 1 1
0 x x x
(The 128 and 64
bits are on. The 32 bit is off.)
Reserved
IP Address Classes
Multicasting
Class D: 224.0.0.0 to 239.0.0.0
1st
Octet Bits: 1 1 1 0 x x x x
(The 128, 64,
and 32 bit are on. The 16 bit is off.)
Experimental
Class E: 240.0.0.0 to 255.0.0.0
1st
Octet Bits: 1 1
1 1 x x x x
(The 128, 64,
32, and 16 bit are all on.)
Private
IP Addresses



Class
A: 10.0.0.0
(Favored
by large enterprises because of its flexibility)
Class
B: 172.16.0.0 to 172.31.0.0
(In
the 3rd Octet, the 128, 64, and 32 bit are off. The 16 bit is on.)
Class
C: 192.168.0.0 to 192.168.255.0
(256
separate Class C Addresses)
Why
Subnet?



Four
Subnetting Steps

1. How many bits do I need to borrow?
2. What’s the subnet mask?
3. What’s the “magic number” or
multiplier?
4. What are the first three subnetwork
addresses?

1. How many bits to
borrow?



How many host bits do I have to work
with?







How many subnets or hosts do I need?



I
need x subnets:
2*BB - 2>= X
I
need x hosts:
2*BL - 2>= X


♦
Design
goals specify at least 5 subnets so how many bits do we borrow?
♦
How
many bits in the host portion do we have to work with (HB)?
Since it’s a Class C, we have 8 bits to
work with.
♦
What’s
the BB in our HB = BB + BL formula?
8 = BB + BL
♦
2
to what power will give us at least 5 subnets?
23 - 2 = 6 subnets
♦
How
many bits are left for hosts?
Since 8 = 3 + BL, then BL = 5
♦
So
how many hosts can we assign to each subnet?
25 - 2 = 30 hosts

♦
Design
goals specify no more than 126 hosts per subnet, so how many bits do we need to
leave (BL)?
♦
How
many bits in the host portion do we have to work with (HB)?
Since it’s a Class B, we have 16 bits to
work with.
♦
What’s
the BL in our HB = BB + BL formula?
16 = BB + BL
♦
2
to what power will give us 126 hosts per subnet?
27 - 2 = 126 hosts
♦
How
many bits are left for subnets?
Since 16 = BB + 7, then BB = 9
♦
So
how many subnets can we have?
29 - 2 = 510 subnets
2. What’s the subnet
mask?


1
1 1
---
--- --- ---
--- --- ---
---
128
64 32 16
8 4 2
1
![]() |
We
add up the decimal value of these bits and get 224. That’s the last non-zero octet of our subnet
mask.
So
our subnet mask is 255.255.255.224
Remember:
The subnet mask has all 1s in the network portion.
3. What’s the “magic
number?”

♦
Note: The “magic number” can also be
found by determining the value of the last bit borrowed.


♦
Note: The last bit borrowed was the 32
bit.
Last Non-Zero Octet

♦
Quickly
calculate the last non-zero octet when given the number of bits borrowed or...
♦
Determine
the number of bits borrowed when given the last non-zero octet
Bit
Borrowed
|
Non Zone
Octal
|
1
|
128
|
2
|
192
|
3
|
224
|
4
|
240
|
5
|
248
|
6
|
252
|
7
|
254
|
8
|
255
|
4. What are the
subnets?



♦
1st
subnet: 210.93.45.32
♦
2nd
subnet: 210.93.45.64
♦
3rd
subnet: 210.93.45.96
♦
4th
subnet: 210.93.45.128
♦
5th
subnet: 210.93.45.160
♦
6th
subnet: 210.93.45.192
Host & Broadcast
Addresses

♦
Let’s
look at our 1st subnet: 210.93.45.32
♦
What
is the total range of addresses up to our next subnet, 210.93.45.64?
210.93.45.32 to 210.93.45.63 or 32
addresses
♦
.32
cannot be assigned to a host. Why?
Because it is the subnet’s address.
♦
.63
cannot be assigned to a host. Why?
Because it is the subnet’s broadcast
address.
♦
So
our host addresses are .33 - .62 or 30 host addresses--just like we figured out
earlier.
Practice Your
Subnetting!!

♦
Semester
5’s curriculum assumes the ability to quickly subnet without pencil & paper!
(much like the ability to add and subtract is assumed in Algebra)
♦
You
will need to be able to evaluate an addressing scheme quickly just by looking
at the address and subnet mask.
♦
Furthermore,
Variable Length Subnet Masking (VLSM) becomes much easier if you’ve mastered
subnetting.
♦
To
practice, simply take any network address/design goal scenario and subnet it!!
For example...
ü
192.168.1.0
with at least 30 subnets
ü
172.16.0.0
with at least 500 hosts per subnet
ü
10.0.0.0
with at least 2000 subnets
Depletion
of IPv4

“It is urgent that the implementation
of IP/TCP be begun on all...ARPANET hosts as soon as possible and no later than
1 January 1982.” (RFC 801, p. 2)



Solving the Depletion
Crisis

♦
Class
A is gone and Class B is almost gone
♦
Internet
routing tables are huge!!

♦
Route
Summarization using CIDR Notation
♦
Variable
Length Subnet Masking
♦
Private
Addressing and NAT
♦
IP
Unnumbered on WAN links
♦
IP
version 6


CIDR Notation



♦
27
is the number of 1 bits in the subnet mask.
Therefore, 255.255.255.224
♦
Also,
you know 192 is a Class C, so we borrowed 3 bits!! How do we know that?
Default subnet mask for Class C is
255.255.255.0 or /24
♦
Finally,
you know the magic number is 256 - 224 = 32, so the first useable subnet
address is 192.168.50.32!!

202.151.37.0/26

♦
255.255.255.192

♦
Class
C so 2 bits borrowed

♦
256
- 192 = 64

♦
202.151.37.64

♦
64
+ 64 + 64 = 192, so 202.151.37.192
198.53.67.0/30

♦
255.255.255.252

♦
Class
C so 6 bits borrowed

♦
256
- 252 = 4

♦
4
+ 4 + 4 = 12, so 198.53.67.12

♦
4
+ 4 + 4 - 1 = 11, so 198.53.67.11
200.39.89.0/28

♦
Class
C, so 4 bits borrowed
♦
Last
non-zero octet is 240
♦
Magic
number is 256 - 240 = 16
♦
32
is a multiple of 16 so 200.39.89.32 is a subnet address--the second subnet
address!!

♦
32
+ 16 -1 = 47, so 200.39.89.47
194.53.45.0/29

♦
Class
C, so 5 bits borrowed
♦
Last
non-zero octet is 248
♦
Magic
number is 256 - 248 = 8
♦
Subnets
are .8, .16, .24, .32, ect.
♦
So
194.53.45.26 belongs to the third subnet address (194.53.45.24) and is a host
address.

♦
It
belongs to .24 and the next is .32, so 1 less is .31 (194.53.45.31)
No Worksheet Needed!




♦
Class
C, 2 bits borrowed
♦
256
- 192 = 64, so 221.39.50.64


Bit
Borrowed
|
Non Zone
Octal
|
1
|
128
|
2
|
192
|
3
|
224
|
4
|
240
|
5
|
248
|
6
|
252
|
7
|
254
|
8
|
255
|
Practice On Your Own

♦
Bits
borrowed
♦
Last
non-zero octet
♦
Second
subnet address and broadcast address
- 192.168.15.0/26
- 220.75.32.0/30
- 200.39.79.0/29
- 195.50.120.0/27
- 202.139.67.0/28
- Challenge: 132.59.0.0/19
- Challenge: 64.0.0.0/16
Route
Summarization


♦
See
a real routing
table.

♦
More
efficient routing
♦
reduced
CPU usage
♦
reduced
memory requirements
Route Flapping

♦
Can
be caused by physical or data-link layer problems

♦
The
flapping network’s border router is summarizing and advertising all local
networks as one route.
Route Summarization
Example

♦
199.100.0.0/24
♦
199.100.1.0/24
♦
199.100.2.0/24
♦
199.100.3.0/24







199.100.0.0
|
1100 0111
|
0110 0100
|
0000 00 00
|
0000 0000
|
199.100.1.0
|
1100 0111
|
0110 0100
|
0000 00 01
|
0000 0000
|
199.100.2.0
|
1100 0111
|
0110 0100
|
0000 00 10
|
0000 0000
|
199.100.3.0
|
1100 0111
|
0110 0100
|
0000 00 11
|
0000 0000
|
Bitmask
|
1111 1111
|
1111 1111
|
1111 11
00
|
0000 0000
|
Route Summarization
Example


VLSM
Overview





Example



♦
192.168.1.4/30
♦
192.168.1.8/30
♦
192.168.1.12/30
♦
192.168.1.16/30
♦
192.168.1.20/30
♦
192.168.1.24/30
♦
192.168.1.28/30





The Three-Layer Model

♦
Core,
Distribution, and Access


♦
All
WAN links:
172.16.0.4/30 through 172.16.0.248/30
♦
All
Distribution routers and attached networks:
172.16.1.0/24 through 172.16.255.0/24
♦
All
Access routers and attached networks:
172.16.1.32/27 through 172.16.255.32/27
VLSM & The Three
Layers
VLSM Routing Protocols

Classful
|
Classless
|
RIPv1
|
RIPv2
|
IGRP
|
EIGRP
|
EGP
|
OSPF
|
BGPv3
|
BGPv4
|
RIPv1 versus RIPv2

♦
does
not send subnet mask information
ü
the
receiving router applies its subnet mask or the default
♦
broadcasts
its updates
♦
does
not support authentication

♦
supports
VLSM
♦
multicasts
its updates
♦
supports
authentication
♦
However,
RIPv2 is still limited to 15 hops and only considers hops as its metric.

Router(config)#router rip
Router(config-router)#version 2
VLSM Labs


♦
Note: There are usually multiple correct
solutions.

♦
Mike’s
spreadsheet is an excellent visual aid when designing a VLSM addressing scheme.
Private
Addressing & NAT


♦
ISPs
will only give you a limited number of real IP addresses (if any!). So NAT
configuration also includes the ability to “overload” a real IP.
♦
The
purpose of NAT overloading is to allow multiple local inside addresses to share
a single global outside address.
♦
This
is done by tracking source ports from the transport layer. As packets leave,
not only do they get a real IP but are also tagged with a port number to
identify the session (and host) as packets return from the destination.
♦
For
more detail on NAT, review Semester 6’s Chapter 11 devoted to the subject. We
will not configure NAT this semester.
IP Unnumbered

♦
Serial
interfaces “borrow” an IP address from another interface (typically a LAN
interface)

♦
Only
point-to-point serial interfaces
♦
Both
sides must belong to the same major network with the same subnet mask or…
♦
Different
major network with default subnet masks

♦
Cannot
ping the interface
♦
Cannot
boot a network IOS image over interface
♦
Cannot
use IP security

Router(config)#interface
s0
Router(config-if)#ip
unnumbered e0
DHCP & Easy IP

♦
The
gateway router will respond either with an IP address or a DHCP router address.

Router(config)#ip
dhcp excluded-address [address_range]
ü
Specifies
a range of addresses to be excluded from the dhcp pool
Router(config)#ip
dhcp pool [pool_name]
Router(dhcp-config)#network
[network_address][subnet_mask]
ü
Defines
the name of the dhcp pool and the address to be used to assign IPs
Router(dhcp-config)#default-router
[router_address1]…[router_address8]
ü
Defines
up to 8 routers from which the host can get IP addresses

♦
“Plug
and Play” routing that allows a remote router to get a real IP address from the
ISP
♦
Then
the remote router uses DHCP/NAT to provide access to internal LAN clients.
Helper Addresses

♦
Normally,
routers will not forward UDP requests. This causes a problem if the local
router is not the DHCP server.
♦
Therefore,
we configure the host’s local router with a helper address to which it will
forward UDP requests for services.

Router(config-if)#ip
helper-address [server_address]
ü
Will
forward the 8 UDP services below which includes DHCP
For
UDP services not included in the 8, use the global command…
Router(config)#ip
forward-protocol udp [port_number]
ü
For
UDP services you want to exclude, use no in front of command
UPD Service Forwarded by Helper Command
Service
|
Port
|
Service
|
Port
|
Time
|
37
|
BOOTP/DHCP client
|
68
|
TACAS
|
49
|
TFTP
|
69
|
DNS
|
53
|
NetBIOS name
|
137
|
BOOTP/DHCPserver
|
67
|
NetBIOS
data gram
|
138
|
Internet Protocol,
version 6

♦
Subnetting
(1985)
♦
VLSM
(1987)
♦
CIDR
(1993)



Expressing IPv6


♦
Leading
zeros in each 16-bit value can be omitted
♦
16-bit
values that are all zeros can be completely omitted and replaced with a
double colon
ü
Fully
expressed
–
1080:0000:0000:0000:0008:200C:417A
ü
Omit
leading zeros
–
1080:0:0:0:8:800:200C:417A
ü
Omit
16-bit zeros
–
1080::8:800:200C:417A
♦
Don’t
yet know hex? It’s coming back to haunt you!!
Lab Notes

♦
You
initially configure the network with VLSM and RIPv1 only to discover you do not
have full connectivity
♦
Enter
the command version 2 and you get convergence
♦
Also,
you configure IP unnumbered and view the routing table

♦
Three
different VLSM scenarios you must solve by assigning every network an
appropriate address for a limited pool of available addresses

♦
Using
two routers and two hosts, you get good practice at using DHCP to get your
hosts’ an IP address
♦
You
also use a helper address to allow a remote host to get an IP address
0 comments:
Post a Comment