Professional Documents
Culture Documents
2 - IP Addressing
2 - IP Addressing
Albert Espinal S.
IP Addressing
IP Addressing is a logical addressing scheme at
the Network Layer of the OSI Model.
Like all Network Layer addressing schemes (IPX,
AppleTalk, DECnet, CLNS, etc.), IP addresses have
two parts:
♦ Network—identifies the network or subnet
♦ Host—identifies the device on that network/subnet
An IP Address’ 32 bits are expressed in 4 octets
(called dotted-decimal notation).
IP addresses are divided into five class types
depending upon the value of bit positions in the
first octet.
IP Address Classes
Class A: 1.0.0.0 to 127.0.0.0
Network Host Host Host
0 ___
1st Octet Bits: ___ X ___
X ___
X ___
X ___
X ___
X ___
X
(The 128 bit is off.)
1 ___
1st Octet Bits: ___ 0 ___
X ___
X ___
X ___
X ___
X ___
X
(The 128 bit is on and the 64 bit is off.)
1 ___
1st Octet Bits: ___ 1 ___
0 ___
X ___
X ___
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
1 ___
1st Octet Bits: ___ 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
1 ___
1st Octet Bits: ___ 1 ___
1 ___
1 ___
X ___
X ___
X ___
X
(The 128, 64, 32, and 16 bit are all on.)
Private IP Addresses
Private IP Addresses cannot exist on the public Internet.
Your gateway router uses Name Address Translation (NAT)
to give outbound packets a “legitimate” IP source address.
Private Addressing and NAT are discussed later.
Class A: 10.0.0.0
(Favored by large enterprises because of its flexibility)
1 1 1
128 64 32 16 8 4 2 1
Bits Non-Zero
Borrowed Octet
1 128
2 192
3 224
4 240
5 248
6 252
7 254
8 255
Practice On Your Own
Below are some practice problems. Take out a
sheet of paper and calculate...
♦ Bits borrowed
♦ Last non-zero octet
♦ Second subnet address and broadcast address
1. 192.168.15.0/26
2. 220.75.32.0/30
3. 200.39.79.0/29
4. 195.50.120.0/27
5. 202.139.67.0/28
6. Challenge: 132.59.0.0/19
7. Challenge: 64.0.0.0/16
Depletion of IPv4
IP became ARPA’s protocol for host-to-host
communications on January 1, 1982.
“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)
199.100.1.0/24
t
199.100.0.0/22
0/16 rne
Advertised to ISP 0. te
0 0. o In
1
Autonomous 9 9. ed t
1 ti s
r
System d ve
ISP A
199.100.2.0/24
199.100.3.0/24
VLSM Overview
You may have noticed in your CCNA studies that
addressing a WAN link is often a waste of host
addresses.
VLSM allows you to subnet a subnet!
WAN links only need 2 addresses for hosts.
Therefore, using VLSM would yield a CIDR
notation of /30 on WAN links.
In addition, with the ip subnet-zero
command enabled by default on Cisco IOS 12.0
and higher, you can now use subnet zero.
VLSM Example
You have a small Class C network with 6 LANs &
30 hosts (192.168.1.0/27)
NO MORE ADDRESSES for WAN links!!
Solution: Use subnet zero and subnet it further:
♦ 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
You now have enough addresses for 7 WAN links.
VLSM Example
.32/27
The graphic shows how
you can have your 6
subnets with 30 hosts and
.64/27 still have subnets leftover
.4/30
AS for WAN links.
.96/27
192.168.1.0
The hub router would then
.8/30
summarize all the subnets
as 192.168.1.0/24
.128/27
.12/30
This simple demonstration
.160/27 of VLSM hides its true
power... SCALABILITY!!
Let’s explore that power.
.192/27
The Three-Layer Model
Remember our three layers from Ch. 1?
♦ Core, Distribution, and Access
With VLSM, route summarization and the
appropriate routing protocol, we can scale our
network making routing much more efficient.
Using the address 172.16.0.0, we could do the
following, summarizing up to the Core Layer:
♦ 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
Core Layer 172.16.0.0/16 Route sent to ISP
Distribution Layer
172.16.1.0/24 172.16.2.0/24 172.16.3.0/24
Access Layer
Classful Classless
RIPv1 RIPv2
IGRP EIGRP
EGP OSPF
BGPv3 BGPv4
RIPv1 versus RIPv2
RIPv1...
♦ does not send subnet mask information
the receiving router applies its subnet mask or the default
♦ broadcasts its updates
♦ does not support authentication
RIPv2...
♦ supports VLSM
♦ multicasts its updates
♦ supports authentication
♦ However, RIPv2 is still limited to 15 hops and only
considers hops as its metric.
Private Addressing & NAT
As discussed earlier, private IP addresses cannot exist on
the Internet.
Therefore, we use Name Address Translation (NAT) to
dynamically give packets a real IP address.
♦ 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.
IP Unnumbered
IP Unnumbered is used to conserve more space on WAN
links.
♦ Serial interfaces “borrow” an IP address from another interface
(typically a LAN interface)
Rules for using IP unnumbered:
♦ 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
Drawbacks to using IP unnumbered:
♦ Cannot ping the interface
♦ Cannot boot a network IOS image over interface
♦ Cannot use IP security
Configuring IP Unnumbered
Router(config)#interface s0
Router(config-if)#ip unnumbered e0
DHCP & Easy IP
Hosts configured to dynamically obtain their
IP addresses will send a DHCP broadcast
upon booting.
♦ The gateway router will respond either with an
IP address or a DHCP router address.
Cisco’s Easy IP
♦ “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.
DHCP operation
The client sends a DHCPDISCOVER broadcast to
all nodes
The server sends a DHCPOFFER unicast to client
The client sends a DHCPREQUEST broadcast to all
nodes
The server sends a DHCPACK unicast to client
Helper Addresses
DHCP uses BootP’s UDP port numbers 67 & 68 to
broadcast for an IP 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.
UDP Services Forwarded by Helper Command
Service Port Service Port
Time 37 BOOTP/DHCP client 68
TACAS 49 TFTP 69
DNS 53 NetBIOS name 137
BOOTP/DHCP server 67 NetBIOS datagram 138
Internet Protocol, version 6
IPv4 will eventually perish even with…
♦ Subnetting (1985)
♦ VLSM (1987)
♦ CIDR (1993)
The proliferation of IP addressable devices will
eventually exceed IPv4’s limit of 4 billion
addresses.
IPv6 is a 128 bit address. But because of the
success of NAT and private IPs, IPv4 will not go
away for some time.
IPv6 will require network administrators to re-
engineer their enterprises with new software and
new hardware.