Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 100

Chapter 11

IPv4 Addressing
IPv4 Address

◆ The Internet Protocol (IPv4 and IPv6) is the most widely-used Layer 3 data
carrying protocol.
◆ Each device on a network must be uniquely addressed.
◆ Identify packets source and destination addresses.
◆ IPv4 is 32 bits in length and difficult for human to remember.
◆ Therefore, We use the ( dotted decimal notation) to represent the value of each
byte (octet) of the IP address in decimal.

10101001 11000111 01000101 1000100


169 . 199 . 69 . 137
Dividing Networks from Hosts

The subnet mask associated with the IP identifies the network address from
the host address. The Network number is the “ higher “ portion of the
addresses , the Host number is the lower portion of this address.

• Any subnet mask bit that is a 1 means that the associated address bit
belongs to the network number.

• Any subnet mask bit that is a 0 means that the associated address bit
belongs to the host number.

IP Address 192. 168. 1. 2


Subnet Mask 255. 255. 255. 0
Binary IP Address 11000000 10101000 00000001 00000010
Binary Subnet Mask 11111111 11111111 11111111 00000000
Why the mask matters: Number of hosts!

There are two methods of expressing a subnet mask.

192.168.1.2 255.255.255.0 Or 192.168.1.2 / 24

Subnet Mask: 1st octet 2nd octet 3rd octet 4th octet
255.0.0.0 or /8 Network Host Host Host

255.255.0.0 or /16 Network Network Host Host

255.255.255.0 or /24 Network Network Network Host

◆ The more host bits in the subnet mask means the more hosts in the network.
◆ Subnet masks do not have to end on “natural octet boundaries”

6
IP Addressing – The Subnet Mask

The network portion of the IP address assigned to all hosts on a network segment
must be the same.

• All hosts on a segment have the same subnet mask.


• Each device is identified by a unique host portion.
Routers forward packets between networks based on the destination network and host “IP” addresses.

Network Address: 192.168.1.0


Subnet Mask: 255.255.255.0 = Prefix Length: /24

192.168.1.0
Network Host

Network Address in binary:


11000000.10101000.00000001.00000000
Subnet Mask in binary:
11111111.11111111.11111111.00000000

8
Subnet Masks …
Given the subnet mask , underline the network portion of each
address:

Network Address Subnet Mask


172.0.0.0 255.0.0.0
172.16.0.0 255.255.0.0
192.168.1.0 255.255.255.0
192.168.0.0 255.255.0.0
192.168.0.0 255.255.255.0
10.1.1.0 /24
10.2.0.0 /16
10.0.0.0 /16

◆ The other portion of the address is the host portion for


which represents the (host addresses)

9
Types of Addresses

Subnet Mask: 255.255.255.0

◆ Network address - have all 0’s in the host portion , this address refers to the
network.
◆ Broadcast address - have all 1’s in the host portion , used to send data to all
hosts in the network.
◆ Host addresses - Assigned to the end devices in the network , can not have all
0’s or all 1’s in the host portion.

10
How do we calculate network address, broadcast address and host
addresses?

11
Range of hosts
Host Addresses in binary

192.168.1.0 (net) 11000000.10101000.00000001.00000000


255.255.255.0(SM) 11111111.11111111.11111111.00000000
192.168.1.1 11000000.10101000.00000001.00000001
192.168.1.254 11000000.10101000.00000001.11111110
192.168.1.255 11000000.10101000.00000001.11111111
(broadcast)

10.0.0.0 (net) 00001010.00000000.00000000.00000000


/16 (SM) 11111111.11111111.00000000.00000000
10.0.0.1 00001010.00000000.00000000.00000001
10.0.255.254 00001010.00000000.11111111.11111110
10.0.255.255 00001010.00000000.11111111.11111111
(broadcast)

12
Range of hosts

◆ Host addresses are all addresses between the network address and the broadcast
address.

◆ What is the range of host addresses for each network?

Network Address Subnet Mask Broadcast Address Range of hosts

172.0.0.0 255.0.0.0 172.255.255.255 172.0.0.1 to 172.255.255.254


172.16.0.0 255.255.0.0 172.16.255.255 172.16.0.1 to 172.16.255.254
192.168.1.0 255.255.255.0 192.168.1.255 192.168.1.1 to
192.168.1.254
192.168.0.0 255.255.0.0 192.168.255.255 192.168.0.1 to
192.168.255.254
192.168.0.0 255.255.255.0 192.168.0.255 192.168.0.1 to
192.168.0.254
10.1.1.0 /24 10.1.1.255 10.1.1.1 to 10.1.1.254
10.2.0.0 /16 10.2.255.255 10.2.0.1 to 10.2.255.254
10.0.0.0 /16 10.0.255.255 10.0.0.1 to 10.0.255.254

13
Subnet Masks: Non-Natural Boundaries
Subnet masks do not have to end on natural octet boundaries

172.1.20.0 10101100.00000001.00010100.00000000
255.255.240.0 11111111.11111111.11110000.00000000

The network address is 172.1.16.0

Range of addresses

172.1.16.1 10101100.00000001.00010000.00000001

172.1.31.254 10101100.00000001.00011111.11111110

172.1.31.255 10101100.00000001.00011111.11111111 (broadcast)

Number of hosts: 212 – 2 = 4,096 – 2 = 4,094 hosts

14
Subnet Masks: Non-Natural Boundaries

Subnet masks do not have to end on natural octet boundaries

192.168.1.0 11000000.10101000.00000001.00000000
255.255.255.224 11111111.11111111.11111111.11100000

192.168.1.1 11000000.10101000.00000001.00000001

192.168.1.30 11000000.10101000.00000001.00011110

192.168.1.31 11000000.10101000.00000001.00011111
(broadcast)

Number of hosts: 25 – 2 = 32 – 2 = 30 hosts

15
Addresses for User Devices

◆ Hosts are assigned IP addresses from the range of available addresses in the
network.
◆ These IP addresses can be assigned either:
• Statically
• Dynamically
Static IP addressing

◆ Manually configured on a host by the network administrator.

◆ At a minimum, “ IP address, subnet mask, and default gateway” are configured.

◆ Useful for printers, servers, and other networking devices that need to be
accessible to clients on the network all the time with no conflict.

17
Dynamic Assignment of Addresses

◆ Assigned automatically by the (DHCP) server.

◆ Reduces network support burden and entry errors.

◆ IP address, subnet mask, default gateway, and other configuration information are
all assigned.

◆ Another benefit of DHCP is that an address is not permanently assigned to a host


but is only "leased" for a period of time. If the host is powered down or taken off
the network, the address is returned to the pool for reuse.

◆ An address pool, is assigned to the DHCP clients on a network.

18
Dynamic Assignment

For IPV4 , this is done using Dynamic Host Configuration Protocol (DHCP).

• The DHCP server requires that a block of addresses, called an address


pool, is used for assigning to the DHCP clients on a network.
• Addresses are leased for devices for a specific amount of time.
20
Dynamic Addressing
Dynamic vs. Static IP Addressing Quiz

Desktop computer Server Router Switch

Laptop IP phone Printer RADIUS server

AP PDA iTouch Fridge

Static IP Address Dynamic (DHCP) IP Address


Unicast, Multicast, and Broadcast
Types of Communication

In an IPv4 network, the hosts can communicate one of three different ways:

• Unicast - Sending a packet from one host to an individual host.

• Broadcast - Sending a packet from one host to all hosts in the network to locate
special unknown services/devices or to provide information i.e. “routing info.” to all
the hosts on the network.

◆ Broadcasts affect network performance as all users receiving broadcasts should


process it . Router improves performance by blocking broadcasts.

◆ The broadcast reply is normally a Unicast.

◆ Broadcast packets are usually restricted to the local network.

24
More about broadcasting

◆ There are two types of broadcasting :

◆ Direct Broadcast : to all members of a specific remote network from the


sender i.e. (172.30.255.255). Routers can be configured to allow these
broadcasts.
◆ A device that is not directly connected to the destination network forwards an
IP directed broadcast in the same way it would forward unicast IP packets
destined to a host on that network. When a directed broadcast packet reaches
a router that is directly connected to the destination network, that packet is
broadcast on the destination network.

◆ Note: Because of security concerns and prior abuse from malicious users,
directed broadcasts are turned off by default starting with Cisco IOS
Release 12.0 with the global configuration command no ip directed-
broadcasts.

◆ Limited Broadcast : to all members of the local network of the sender


(255.255.255.255) , routers do not allow those broadcasts. Hence , router
ports domains are called broadcast domains. 25
Type of Communication

◆ Multicast (224.0.0.0 to 239.255.255.255) – Conserve bandwidth by sending a


packet to selected members of the multicast group using multicast address.
i.e. Routing information exchange , News feeds.

◆ Divided into reserved link local addresses and globally scoped addresses.

• Reserved link local addresses - 224.0.0.0 to 224.0.0.255 .

◆ Used for multicast groups on a local network.


◆ Packets to these destinations are always transmitted with a time-to-live
(TTL) value of 1. “A router should never forward them”.

• Globally scoped addresses - 224.0.1.0 to 239.255.255.255.

◆ Used to multicast data across the Internet.


◆ For example, 224.0.1.1 has been reserved for Network Time Protocol
(NTP) to synchronize the time-of-day clocks of network devices.

26
Multicast Addresses

For example:
One hosts sends packets to
the multicast IP address
224.10.10.5/24.

Multicast clients subscribe to


the multicast group and listen
for packets destined to
224.10.10.5.
Broadcast Addresses

Directed broadcast is sent to all


hosts on a specific network. An
example destination IPv4 address
is 192.168.1.255 /24.

Limited broadcast is to all hosts


on the local network. These
packets use a destination IPv4
address 255.255.255.255.
Private vs. Public Addresses
Private Addresses

◆ Most IPv4 addresses are public IP addresses.


• These are reachable IPv4 addresses on the Internet.
• However, Packets with a source or destination private IP address are
not propagated by Internet routers.
◆ Internet routers / firewalls block or translate these addresses.
• Private addresses are usually converted to public IP addresses using NAT
(Network Address Translation)
Private Addresses

▪ Private addresses are defined in RFC 1918.


▪ The private address blocks are:
• 10.0.0.0 /8: 10.0.0.0 to 10.255.255.255
• 172.16.0.0 /12: 172.16.0.0 to 172.31.255.255
• 192.168.0.0 /16: 192.168.0.0 to 192.168.255.255
● RFC 6598, IANA reserved 100.64.0.0/10 known as shared address space.
• Similar to RFC 1918, but intended only for use in service provider networks.
Other Special Addresses

◆ Network and Broadcast Addresses- Cannot be assigned to hosts.

◆ Default Route - The IPv4 default route is 0.0.0.0. Used when a more specific
route is not available.

◆ Loopback address: 127.0.0.1


• 127.0.0.0 – 127.255.255.255
• Creates a shortcut for TCP/IP applications and services on the same device
to communicate with each others. Hosts use to direct traffic to themselves
using this address.

◆ Link-Local addresses: 169.254.0.0/16


• 169.254.0.0 – 169.254.255.255
• Host can automatically assign itself an address if no IP configuration is
available. TTL value 1 only. Do not go outside the local network.

◆ TEST-NET addresses:
• 192.0.2.0 to 192.0.2.255 (192.0.2.0 /24)
Special Addresses

TEST-NET Addresses
192.0.2.0 to 192.0.2.255 (192.0.2.0 /24)
Used in documentation and network examples.
Addresses within this block should not appear
on the Internet.
Classful Subnetting
IPv4 Addresses

Which bits refer to the network number?


Which bits refer to the host number?

Answer:

◆ Older technology - Classful IP Addressing

• Value of first octet determines the network portion and the host portion.
• Used with classful routing protocols like RIPv1. (Doesn’t send the mask
with networks)
• The Cisco IP Routing Table is structured in a classful manner.

◆ Newer technology - Classless IP Addressing

• The subnet mask determines the network portion and the host portion and
is sent with the routes.
• Value of first octet does NOT matter (older classful IP addressing)
• Hosts and Classless Inter-Domain Routing (CIDR).
• Used within the Internet and in most internal networks.

35
Class A addresses

Default Mask: 255.0.0.0 (/8)


First octet is between 0 – 127, begins with 0

Network Host Host Host

bits 8 bits 8 bits 8


With 24 bits available for hosts, there a 2 24
Number between 0 - 127 possible addresses. That’s 16,777,216 nodes!

◆ There are 126 class A network addresses.


• 0 and 127 have special meaning and are not used.
◆ 16,777,214 host addresses, one for network address and one for broadcast
address.
◆ Only large organizations such as the military, government agencies, universities,
and large corporations have class A addresses.
◆ For example ISPs have 24.0.0.0 and 63.0.0.0
◆ Class A addresses account for 2,147,483,648 of the possible IPv4 addresses.

36
Class B addresses

Default Mask: 255.255.0.0 (/16)


First octet is between 128 – 191, begins with 10

Network Network Host Host

bits 8 bits 8

Number between 128 - 191 With 16 bits available for hosts, there a 2 16
possible addresses. That’s 65,536 nodes!

◆ There are 16,384 (214) class B networks.


◆ 65,534 host addresses, one for network address and one for broadcast address.
◆ Class B addresses represent 25% of the total IPv4 unicast address space.
◆ Class B addresses are assigned to large organizations including corporations (such
as Cisco, government agencies, and school districts).

37
Class C addresses

Default Mask: 255.255.255.0 (/24)

First octet is between 192 – 223, begins with 110

Network Network Network Host

8 bits

Number between 192 - 223 With 8 bits available for hosts, there a 2 8
possible addresses. That’s 256 nodes!

◆ There are 2,097,152 possible class C networks.


◆ 254 host addresses, one for network address and one for broadcast address.
◆ Class C addresses represent 12.5% of the total IPv4 unicast address space.

38
IPv4 Address Classes

Class D Addresses

◆ Begins with binary 1110 in the first octet.


◆ First octet range 224 to 239.
◆ Used to represent multicast groups.

Class E Addresses

◆ First octet of an IP address begins with 1111.


◆ Reserved for experimental purposes and should not be used for addressing.

39
Examples

1. 192.168.1.3 Class C Default Mask: 255.255.255.0

Network: 192.168.1.0 Broadcast: 192.168.1.255


Hosts: 192.168.1.1 through 192.168.1.254

2. 1.12.100.31 Class A Default Mask: 255.0.0.0

Network: 1.0.0.0 Broadcast: 1.255.255.255


Hosts: 1.0.0.1 through 1.255.255.254

3. 172.30.77.5 Class B Default Mask: 255.255.0.0

Network: 172.30.0.0 Broadcast: 172.30.255.255


Hosts: 172.30.0.1 through 172.30.255.254`

40
Classful IP Addressing

◆ No medium size host networks , subnet masks are not sent “Default”.

◆ Wasted many addresses, which exhausted the availability of IPv4 addresses.

◆ The first octet of the address determined the class , networks & hosts

41
Who assigns IP Network Addresses?

◆ Internet Assigned Numbers Authority (IANA) (http://www.iana.net) is the


master holder of the IP addresses.

◆ Public addresses are required on the Internet and they must be unique.

◆ IANA allocated IP addresses to various other registries to manage for particular


purposes or for regional areas.

• Regional Internet Registries (RIRs).


• The ISP loans or rents these addresses to the organization.
• ISP also provides DNS services, e-mail services, and a website.

42
Assignment of IP Addresses

◆ The Internet Assigned Numbers Authority (IANA) manages and allocates


blocks of
◆ IPv4 and IPv6 addresses to five Regional Internet Registries (RIRs).

◆ RIRs are responsible for


◆ allocating IP addresses to ISPs
◆ who provide IPv4 address
◆ blocks to smaller ISPs and
◆ organizations.

43
Regional Internet Registries (RIR)

◆ The 5 RIR’s are:

• AfriNIC (African Network Information Centre) - Africa Region .


• APNIC (Asia Pacific Network Information Centre) - Asia/Pacific Region.
• ARIN (American Registry for Internet Numbers) - North America Region.
• LACNIC (Latin-American and Caribbean IP Address Registry) .
• RIPE NCC (Europe, the Middle East, and Central Asia ). http://www.ripe.net

44
Subnetting
IP Addresses – First look

Network Address 172.16.0.0

172.16.10.100/16 Gateway: 172.16.1.1

Network Address
192.168.1.0/30
172.16.10.55/16
ISP Gateway: 172.16.1.1

Internet
192.168.1.2/30 172.16.1.1/
192.168.1.1/ 16 172.16.10.3/16 Gateway: 172.16.1.1
30

◆ All hosts in the same network will typically have the same default gateway IP
address.

◆ The ipconfig or ifconfig commands at the command line are used in windows
and Linux .

46
Subnets Network Address 172.16.0.0/16

172.16.30.0/24 172.16.40.0/24
172.16.10.0/24 172.16.20.0/24

172.16.20.77/24 172.16.30.39/24 172.16.40.123/24


172.16.10.100/24

172.16.10.55/24 172.16.20.96/24 172.16.40.51/24


172.16.30.10/24

172.16.1.1/
24 172.16.10.3/24 172.16.40.29/
172.16.20.103/24 172.16.30.111/24
24

172.16.10.1/24 172.16.20.1/24 172.16.30.1/24 172.16.40.1/24

◆ Networks can be subdivided into subnets based on Geographic location,


Purpose, Ownership rather than being in a flat vast global network design
providing several benefits .

47
Communication Between Subnets
◆ A router is required to subnet a network.
• Each router interface is on a different subnet.
• Devices on a subnet use the router interface as the default gateway.

Each router interface is in


a different subnet and in
its own broadcast domain.
Note:
•The term “subnet” and “network” are interchangeable.
•Most networks are a subnet of some larger address
Reasons for Subnetting block.

◆ Segmenting networks in subnets creates smaller groups of devices and


services in order to:
• Control traffic by containing broadcast traffic within subnetwork
• Reduces overall network traffic and improves network performance

◆ Specifically, subnets:
• Creates smaller broadcast domains.
• Limit the amount of traffic on the other network segments.
• Provide low-level security.
• Can be created to match the physical layout or administrative structure
of the organization.
• Can be reserved for future growth.
Why Separate Hosts into Networks?

• Performance
• Security
• Address Management
Performance
• Large numbers of hosts on a single network results in :

• Large amount of actual Data

• Large amount of the overhead “broadcasts”.

• Switches forward broadcasts to each device connected to a switch port.

A
Broadcasts and broadcast domain
◆ Managing the size of broadcast domains by dividing a network into subnets
ensures that network and host performances are not degraded to unacceptable
levels.
◆ In this context, each network is called a broadcast domain.
Performance

A B
• Routers block
broadcasts unless
specifically
configured to
X X
forward them.

• Replacing the
switch in the
diagram with a
router, creates two
separate IP sub-networks and two broadcast domains.

• Broadcasts are now contained within each network.


Designing a Network Addressing Scheme

◆ LAN subnets are typically assigned from the private address ranges.
• 10.0.0.0 with a subnet mask of 255.0.0.0
• 172.16.0.0 with a subnet mask of 255.240.0.0
• 192.168.0.0 with a subnet mask of 255.255.0.0

◆ Create standards for IP address assignments within each subnet range


such as:
• Routers are assigned the first available host addresses in the range
• Printers and servers will be assigned static IP addresses
• User will receive IP addresses from DHCP servers using /24 subnets
• Group hosts that are accessible from the Internet into their own
subnet.
Security

Security between networks is implemented in an intermediary device (a router or


firewall appliance) at the perimeter of the network.
Subnets and Subnet Masks

■ Subnetting : Dividing the network into small networks or subnets by borrowing


bits from the host bits.

■ In class C networks , you can't have /31 or /32 since you will have then only two
network addresses one for the network number and one for the broadcast . No
host can have it's IP as the network address or the broadcast address.

56
Subnets

◆ To create subnet, we borrow bits from the host portion of the network
address.

◆ For example, for network 192.168.1.0/24:

Network portion Host portion

Address 192. 168. 1. 0000 0000

Mask 255. 255. 255. 0000 0000

◆ With no bits borrowed, the host portion of the network address and the
subnet mask are all 0 bits.
Subnets
◆ If we borrowed 1 bit from the host portion …

Network portion Host


portion

Address 192. 168. 1. 0000 0000

Mask 255. 255. 255. 1000 0000

◆ We could create two subnets:

Network portion Host


portion

Net 0 192. 168. 1. 0000 0000 = 192.168.1.0


=
Mask 255. 255. 255. 1000 0000
255.255.255.128

Network portion Host


portion

Net 1 192. 168. 1. 1000 0000 = 192.168.1.128

Mask 255. 255. 255. 1000 0000 = 255.255.255.128


Each subnet has a:

◆ Network address:
• All 0 bits in the host portion.

1st Network Address Host portion


2nd Network Address Host portion

192. 168. 1. 0 000 0000 192. 168. 1. 1 000 0000

192. 168. 1. 0 192. 168. 1. 128

◆ Broadcast address:
• All 1 bits in the host portion.

Broadcast Address Host portion


Broadcast Address Host portion

192. 168. 1. 0 111 1111 192. 168. 1. 1 111 1111

192. 168. 1. 127 192. 168. 1. 255


Each subnet has a:

◆ First host address:


• All 0 bits plus a right-most 1 bit in the host portion.

1st Host Address Host portion


2nd Host Address Host portion

192. 168. 1. 0 000 0001 192. 168. 1. 1 000 0001

192. 168. 1. 1 192. 168. 1. 129

◆ Last Host address:

• All 1 bits plus a right-most 0 bit in the host portion.

Broadcast Address Host portion


Broadcast Address Host portion

192. 168. 1. 0 111 1110 192. 168. 1. 1 111 1110

192. 168. 1. 126 192. 168. 1. 254


Configuring Subnets in an IPv4 Network
◆ For example, to configure R1:
• G0/0: 192.168.1.0 /25
• G0/1: 192.168.1.128 /25

R1(config)#
R1(config)# interface gigabitethernet 0/0
R1(config-if)# ip address 192.168.1.1 255.255.255.128
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
R1(config)# interface gigabitethernet 0/1
R1(config-if)# ip address 192.168.1.129 255.255.255.128
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
What is subnetting?

Network Network Host Host

172 16 0 0

Network Network Subnet Host

◆ Subnetting does NOT give you more hosts, but actually costs you hosts.

◆ You lose two host IP Addresses for each subnet, one for the subnet IP address and
one for the subnet broadcast IP address.

◆ In older technology, you would have lost the first subnet, as the subnet IP address
is the same as the network IP address. (This subnet can be used in most
networks.)

62
Subnet Example
Network address 172.16.0.0 with /16 Base Network Mask.
Using Subnets: Subnet Mask 255.255.255.0 or /24.

Subnet addresses: All 0’s in host portion

Network Network Subnet Hosts


Broadcast
172 16 0 1 254 255
172 16 1 1 254 255

172 16 2 1 254 255

172 16 3 1 254 255


172 16 Etc. 1 254 255
172 16 254 1 254 255

172 16 255 1 254 255

63 256 Subnets 28 Each subnet has 254 hosts, 28 – 2


Host IP Address: 172.16.3.50

• A host of the 172.16.3.0 /24 network

With NO subnetting: /16 network

Network First Host Last Host Broadcast


172.16.0.0 172.16.0.1 172.16.255.254 172.16.255.255

◆ 65,534 host addresses, one for network address and one for broadcast address.

64
With subnetting:

Network First Host Last Host Broadcast


Hosts
172.16.0.0 172.16.0.1 172.16.0.254 172.16.0.255 254
172.16.1.0 172.16.1.1 172.16.1.254 172.16.1.255 254
172.16.2.0 172.16.2.1 172.16.2.254 172.16.2.255 254
172.16.3.0 172.16.3.1 172.16.3.254 172.16.3.255 254
172.16.4.0 172.16.4.1 172.16.4.254 172.16.4.255 254
172.16.5.0 172.16.5.1 172.16.5.254 172.16.5.255 254
172.16.6.0 172.16.6.1 172.16.6.254 172.16.6.255 254
172.16.7.0 172.16.7.1 172.16.7.254 172.16.7.255 254

172.16.254.0 172.16.254.1 172.16.254.254 172.16.254.255 254
172.16.255.0 172.16.255.1 172.16.255.254 172.16.255.255 254
---

65,024
Total address = 256 subnets * (256 hosts – 2)
= 256 * 254
= 65,024

NOTE:
65 It is common for some network administrator to not use the last subnet.
Example 1: For the 100.0.0.0 network , what are the four
networks created by the subnet mask 255.192.0.0 or /10?
Example: For the network 172.20.0.0 we need 500 subnets , as many hosts per
subnet as possible.

◆ How many bits we need to borrow.

◆ What is the subnet mask?

◆ How many hosts we have for each subnet

◆ For the subnet (36) find


• Its network address
• Its broadcast address
• The host ranges

◆ For the IP address 172.20.100.11


• At which subnet this Ip locate.
• What is the network address for this IP?
• What is the broadcast address for this IP?
Solution:

28 =256, 29 =512, 210=1024.

•We need 500 subnets, so we need to borrow 9 bits.

•Basically this is a class B network but we borrowed 9 bits more 255.255.11111111.10000000 =


255.255.255.128

•We have 7 bits for hosts forming 126 Host per subnet.

•For subnet 36: 172.20.00000000.0XXXXXXX (subnet zero), 172.20.00010010.0XXXXXXX (subnet


36)

1.Network address is 172.20.18.0 Broadcast address is 172.20.18.127


2.The host Range is 172.20.18.1 to 172.20.18.255

•The IP address 172.20.100.11 = 172.20.01100100.00001011

1.This is in subnet 200.


2.The network address for this subnet is =172.20.100.0
3.The Broadcast address is =172.20.100.127
Calculating the number subnets needed “Subnetting the subnet”

Given the following Network subnet 172.16.1.0/24

◆ You are requested to subnet this subnet to have as many subnets as possible,
60 hosts per subnet

172.16.1. 0 0 0 0 0 0 0 0
255.255.255. 1 1 0 0 0 0 0 0
Network
6 host bits
◆ This means that the new Subnet Mask is : 255.255.255.192 (/26)

• Number of Hosts per subnet: 6 bits, 64-2 hosts, 62 hosts


• Number of Subnets: 2 bits or 4 subnets

69
VLSM (Variable Length Subnet Masks)
Subnetting a subnet

“ Different parts of the network might use different


subnets”
VLSM
◆ If you know how to subnet, you can do VLSM.
◆ Some protocols support VLSM and called classless just like EIGRP, OSPF others
cannot support VLSM and called Class full just like RIP and IGRP.

◆ Example: 10.0.0.0/8
• Subnet in /16 subnets:
• 10.0.0.0/16
• 10.1.0.0/16
• 10.2.0.0/16
• 10.3.0.0/16
• Etc.

◆ Subnet one of the subnets (10.1.0.0/16)


◆ 10.1.0.0/24
◆ 10.1.1.0/24
◆ 10.1.2.0/24
◆ 10.1.3.0/24
◆ etc

71
Host can only be a member of
VLSM the subnet. Host can NOT be a
member of the network that
was subnetted.

!YES

10.2.1.55/24

10.2.1.55/16

!NO
All other /16 subnets
are still available for
use as /16 networks or
to be subnetted.

72
Calculating the number subnets/hosts needed
Variable Length Subnet Masking (VLSM)

192.168.20.64/27 192.168.20.192/27

192.168.20.0/27 192.168.20.128/27

192.168.20.32/27 192.168.20.96/27 192.168.20.160/27

7 Networks with 30 usable


addresses for each network

Wasted 28 addresses on
each WAN link
Variable Length Subnet Masking (VLSM)

192.168.20.32/27 192.168.20.96/27

192.168.20.0/27 192.168.20.64/27

192.168.20.192/30 192.168.20.196/30 192.168.20.200/30


Variable Length Subnet Masking (VLSM)

255.255.255.224 255.255.255.252
Original Sub-Subnet
Subnet Mask Mask
11100000 111111 00

192.168.20.0 00000000 110000 00 192.168.20.192


192.168.20.32 00100000 110001 00 192.168.20.196
192.168.20.64 01000000 110010 00 192.168.20.200
192.168.20.96 01100000 110011 00 192.168.20.204
192.168.20.128 10000000 110100 00 192.168.20.208
192.168.20.160 10100000 110101 00 192.168.20.212
192.168.20.192 11000000 110110 00 192.168.20.216
192.168.20.224 11100000 110111 00 192.168.20.220
Summarization “ Supernetting”

◆ Summary of the updates rather than sending all updates , for same or
different subnet masks. “most efficient way to advertise many routes in
one advertisement instead of individually.

.and divided to subnets 100.0.0.0/8


When you are asked to summarize group of routes choose
the similar parts between routes up to the difference.

◆ 172.16.32.0 through 172.16.50.0


◆ 172.16.00100000
◆ 172.16.00110010
◆ 172.16.32.0 is the summarization of those …..And so on.
Example: In Figure below, there are five networks connected to router R1. What’s
the best summary address to R2?

◆ The best summarization is 172.1.4.0 using a mask of 255.255.252.0,IP


addresses forwarded with this summary are 172.1.4.1 through 172.1.7.255.
◆ Example: In Figure below, the Ethernet networks connected to router R1 are
being summarized to R2 as 192.168.144.0/20. Which range of IP addresses will
R2 forward to R1 according to this summary?

◆ The IP addresses that will be forwarded are


◆ 192.168.144.1 through 192.168.159.255.
◆ 192.168.10010000.00000001 192.168.
10011111.11111111
Broadcast and network addresses , make sure these are not assigned to
hosts.

The router interface


IP here is a wrong IP
since it represents the
subnetwork address
for all devices on the
network.
◆ Example: Sales department can’t get to
ServerA in the mark. The client said she can
ping her gateway. By looking at the figure,
can you determine the problem?

◆ By looking at the figure, you can determine


that the default gateway on the Lab_B
router is incorrect. That address is the
broadcast address of the 64 subnet, so
there’s no way it could be a valid host.

◆ 95 is 010 11111
Example: A user in the Sales LAN can’t get to ServerB. Using ping , the
host can communicate to the local network but not to the remote network.
Find and define the IP addressing problem.

Solution: ServerB has been configured with the broadcast address of the
subnet. It is 01010111
:Example

A subnet assigned on a segment is 192.168.20.24/29, and the router needs to be


assigned the first usable address and the server the last valid host ID. What are the
IP address, mask, and default gateway assigned to the server?

◆ To answer this, you must know that a /29 is a 255.255.255.248 mask. The subnet
is known as 24, the next subnet is 32, so the broadcast address of the 24 subnet is
31, which makes the valid host range 25–30.

◆ Server IP address: 192.168.20.30


◆ Server mask: 255.255.255.248
◆ Default gateway: 192.168.20.25 (router’s IP address)
VLSM Trick

Always satisfy the requirements of the BIGGEST LAN FIRST


and then work your way down ….
◆ Example: You have one Class C network ID and you need to provide one
usable subnet per city while allowing enough usable host addresses , What is
your mask?
Example: 192.168.10.0 mask is 255.255.255.224

1. How many subnets: we are borrowing three bits more than default class C = 2 3= 8
subnets assuming IP subnet zero command.

2. How many hosts per subnet: we have here 5 bits for hosts forming 2 5 -2=30 hosts.

3. Valid subnets are

◆ 192.168.10.000 {00000-1111}, NW=192.168.10.0 – Broadcast is 192.168.10.31


◆ 192.168.10.001 {00000-1111}, NW=192.168.10.32 – Broadcast is 192.168.10.63
◆ 192.168.10.010 {00000-1111}, NW=192.168.10.64 – Broadcast is 192.168.10.95
◆ 192.168.10.011 {00000-1111}, NW=192.168.10.96 – Broadcast is 192.168.10.127
◆ 192.168.10.100 {00000-1111}, NW=192.168.10.128 – Broadcast is 192.168.10.159
◆ 192.168.10.101 {00000-1111}, NW=192.168.10.160 – Broadcast is 192.168.10.191
◆ 192.168.10.110 {00000-1111}, NW=192.168.10.192 – Broadcast is 192.168.10.223
◆ 192.168.10.111 {00000-1111}, NW=192.168.10.224 – Broadcast is 192.168.10.255
Example: For the figure beside, assuming a Class C network and using /28, 4 bits are
used for subnetting to give 14 hosts per subnet.
Example: From the list of IP addresses on the right of the figure, which
IP address will be placed in each router’s FastEthernet 0/0 interface and
serial 0/1 of RouterB?
Now try solving with VLSM considered

What we have and what do we need

◆ Given IP address 172.16.0.0/21


◆ That’s 172.16.0.0 to 172.16.7.255
◆ 4 subnets needed:
• Student LAN has 481 hosts
• Instructor LAN has 69 hosts
• Administrator LAN has 23 hosts
• WAN has 2 hosts
172.16.0.0 172.16.1.0 172.16.2.0 172.16.3.0

Instructor
Student
Admin

WAN
Given 192.168.1.0/24
Subnet plan with VLSM

Network Subnet address Host range Broadcast address

B 192.168.1.0/27 192.168.1.1 - 192.168.1.30 192.168.1.31

E 192.168.1.32/27 192.168.1.33 - 192.168.1.62 192.168.1.63

A 192.168.1.64/28 192.168.1.65 - 192.168.1.78 192.168.1.79

D 192.168.1.80/28 192.168.1.81 - 192.168.1.94 192.168.1.95

C 192.168.1.96/30 192.168.1.97 - 192.168.1.98 192.168.1.99


Visual
B
One octet
available

A
D

C
Problem #2

◆ Which IPv4 subnetted addresses represent valid host addresses? (Choose


three.)
• 192.168.4.127 /26
• 192.168.4.155 /26
• 192.168.4.193 /26
• 192.168.4.95 /27
• 192.168.4.159 /27
• 192.168.4.207 /27
Problem #3

◆ Given the IP address and subnet mask of 192.168.4.64 255.255.255.224,


which of the following would describe this address?

• This is a useable host address.


• This is a broadcast address.
• This is a network address.
• This is not a valid address
Problem #4

27/ 192.168.10.30

192.168.10.33Host address:
Subnet Mask:
255.255.255.224
Default Gateway:
192.168.10.30

◆ Host A is connected to the LAN, but it cannot get access to any resources on the
Internet. What could be the cause of the problem?

• The host subnet mask is incorrect.


• The default gateway is a network address.
• The default gateway is a broadcast address.
• The default gateway is on a different subnet from the host.
The Need for Structure Network Design

◆ The allocation of network layer address space within the corporate network
needs to be well designed.

◆ There are three primary considerations when planning address allocation.

• Preventing Duplication of Addresses - Each host in an internetwork


must have a unique address.

• Providing and Controlling Access - Some devices such as servers,


printers, and routers require static IP addresses.

• Monitoring Security and Performance – A properly planned and


documented network addressing scheme makes it easier to troubleshoot.
Device Address Assignment
Within a network, there are different types of devices that require addresses:

End user clients - Most networks allocate IPv4 addresses to client devices
dynamically, using Dynamic Host Configuration Protocol (DHCP). This reduces
the burden on network support staff and virtually eliminates entry errors.
With DHCP, addresses are only leased for a period of time, and can be
reused when the lease expires. This is an important feature for networks that
support transient users and wireless devices. Changing the subnetting
scheme means that the DHCP server needs to be reconfigured, and the
clients must renew their IPv4 addresses. IPv6 clients can obtain address
information using DHCPv6 or SLAAC.

Servers and peripherals - These should have a predictable static IP address.


Use a consistent numbering system for these devices.
Device Address Assignment
Servers that are accessible from the internet - Servers that need to be
publicly available on the internet must have a public IPv4 address, most
often accessed using NAT. In some organizations, internal servers (not publicly
available) must be made available to the remote users. In most cases, these
servers are assigned private addresses internally, and the user is required to
create a virtual private network (VPN) connection to access the server. This
has the same effect as if the user is accessing the server from a host within
the intranet.

Intermediary devices - These devices are assigned addresses for network


management, monitoring, and security. Because we must know how to
communicate with intermediary devices, they should have predictable,
statically assigned addresses.

Gateway - Routers and firewall devices have an IP address assigned to each


interface which serves as the gateway for the hosts in that network. Typically,
the router interface uses either the lowest or highest address in the network.

When developing an IP addressing scheme, it is generally recommended that you


have a set pattern of how addresses are allocated to each type of device. This
benefits administrators when adding and removing devices, filtering traffic
based on IP, as well as simplifying document
THE END

You might also like