1 of 27

Module 11: IPv4 Addressing

CCNA Routing and Switching:

Introduction to Networks v7.0 (ITN)

This Slides is prepared by:

Eng. Rawan Aljamal

​

Cisco Certified CCNA Instructor Trainer

​

1

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

2 of 27

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.

2

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

3 of 27

IPv4 Address Structure

IPv4 address is a 32-bit (4 bytes) hierarchical address that is usually represented in dot-decimal notation, consisting of four decimal numbers, each ranging from 0 to 255, separated by dots.

​

3

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

4 of 27

Network and Host Portions

  • An IPv4 address is made up of a network portion and a host portion.

4

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

5 of 27

The Subnet Mask

  • To identify the network and host portions of an IPv4 address, the subnet mask is compared to the IPv4 address bit for bit, from left to right.
  • The actual process used to identify the network portion from host portion is called ANDing.

​

​

​

​

​

​

​

​

​

5

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

6 of 27

Determining the Network: Logical AND

  • To identify the network address, the host IPv4 address is logically ANDed, bit by bit, with the subnet mask to identify the network address.

​

  • A subnet mask is a bit pattern that masks the host portion of an IP address, leaving only the network portion visible for routing decisions.

/24

1

1

1

0

1

0

1

0

0

0

0

0

AND Truth Table

6

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

7 of 27

The Prefix Length or CIDR Notation (Classless Inter-Domain Routing)

  • A prefix length is a less cumbersome methodطريقة أقل تعقيدًا used to identify a subnet mask address.
  • The prefix length is the number of bits set to 1 in the subnet mask.

Subnet Mask

32-bit Address

Prefix Length

255.0.0.0

11111111.00000000.00000000.00000000

/8

255.255.0.0

11111111.11111111.00000000.00000000

/16

255.255.255.0

11111111.11111111.11111111.00000000

/24

255.255.255.128

11111111.11111111.11111111.10000000

/25

255.255.255.192

11111111.11111111.11111111.11000000

/26

255.255.255.224

11111111.11111111.11111111.11100000

/27

255.255.255.240

11111111.11111111.11111111.11110000

/28

255.255.255.248

11111111.11111111.11111111.11111000

/29

255.255.255.252

11111111.11111111.11111111.11111100

/30

7

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

8 of 27

Network, Host, and Broadcast Addresses

Within each network are three types of IP addresses:

    • Network address is the address where all host bits equals to zeros.
    • Host addresses is the address where all host bits are mix zeros and ones.
    • Broadcast address is the address where all host bits equal to ones.

​

Network Portion

Host Portion

Host Bits

Subnet mask 

255.255.255.0 or /24

255 255 255�11111111 11111111 11111111

0�00000000

​

Network address 

192.168.10.0 or /24

192 168 10�11000000 10100000 00001010

0�00000000

All 0s

First address 

192.168.10.1 or /24

192 168 10�11000000 10100000 00001010

1�00000001

All 0s and a 1

Last address 

192.168.10.254 or /24

192 168 10�11000000 10100000 00001010

254�11111110

All 1s and a 0

Broadcast address

192.168.10.255 or /24

192 168 10�11000000 10100000 00001010

255�11111111

All 1s

8

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

9 of 27

Legacy Classful Addressing

In Classful Addressing, the subnet mask is determined based on the value in the first octet of the IP address.

Class Name

First Octet Content in Binary

Network Range (first octet)

Network – Host Configuration

Subnet Mask

Number of Hosts per Network

Class A

0xxxxxxx

0 -127

N . H . H . H

255.0.0.0 or /8

2^24 = 16,777,216‬

Class B

10xxxxx

128 -191

N . N . H . H

255.255.0.0 or /16

2^16 = 65,536‬

Class C

110xxxxx

192 -223

N . N . N . H

255.255.255.0 or /24

2^8 = 256

Class D

1110xxxx

224-239

Reserved for Multicasting purposes

Class E

1111xxxx

240-255

Reserved for experimental work

9

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

10 of 27

Legacy Classful Addressing

  • Class A and B networks have a very large number of host addresses, and Class C networks have very few host addresses.
  • Classful addressing wasted many IPv4 addresses.
  • Classful address allocation was replaced with classless addressing which ignores the rules of classes (A, B, C).
  • In classless addressing, the subnet mask as well as the network and host portions are determined according to the wanted network size.

10

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

11 of 27

Unicast

  • Unicast transmission is sending a packet to one destination IP address.
  • For example, the PC at 172.16.4.1 sends a unicast packet to the printer at 172.16.4.253.

11

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

12 of 27

Multicast

  • Multicast transmission is sending a packet to a multicast address group.
  • For example, the PC at 172.16.4.1 sends a multicast packet to the multicast group address 224.10.10.5.
  • IPv4 has reserved the 224.0.0.0 to 239.255.255.255 addresses as a multicast range.

12

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

13 of 27

Broadcast

  • Broadcast transmission is sending a packet to all other destination IP addresses.
  • For example, the PC at 172.16.4.1 sends a broadcast packet to all IPv4 hosts.
  • A broadcast may be limited or directed. A directed broadcast is sent to all hosts on a specific network. For example, say that a host on the 172.16.4.0/24 network sends a packet to 172.16.4.255. A limited broadcast is sent to 255.255.255.255.

​

​

13

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

14 of 27

Public and Private IPv4 Addresses

  • Private addresses are common blocks of addresses used by most organizations to assign IPv4 addresses to internal hosts. Private addresses are not globally routable.
  • The private IPv4 addresses were introduced to deal with the depletion of IPv4 address space. Private IPv4 addresses are not unique and can be used internally within any network.

​

​

​

​

​

​

  • Network Address Translation (NAT) translates private IPv4 addresses to public IPv4 addresses before routing to the internet.
  • NAT is typically enabled on on the router that connects the internal network to the ISP network.

Network Address and Prefix

RFC 1918 Private Address Range

10.0.0.0/8

10.0.0.0 - 10.255.255.255

172.16.0.0/12

172.16.0.0 - 172.31.255.255

192.168.0.0/16

192.168.0.0 - 192.168.255.255

14

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

15 of 27

Special Use IPv4 Addresses

Loopback addresses

  • 127.0.0.0 /8 (127.0.0.1 to 127.255.255.254)
  • Commonly identified as only 127.0.0.1
  • Used on a host to test if TCP/IP is operational.

Link-Local addresses

  • 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254)
  • Commonly known as self-assigned addresses.
  • Assigned by Automatic Private IP Addressing (APIPA) feature used by Windows DHCP clients to self-configure when no DHCP servers are available.

DHCP (Dynamic Host Configuration Protocol) is a protocol that provides quick, automatic, and central management for the distribution of IP addresses within a network.

15

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16 of 27

Network Segmentation (Subnetting)

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

17 of 27

Reasons for Segmenting Networks

  1. Subnetting reduces overall network traffic and improves network performance.
  2. It enables an administrator to implement different security policies within subnets.
  3. It reduces the number of devices affected by abnormal broadcast traffic due to malicious intent, for example.
  4. Organization purposes as follows:

Location

Group or Function

Device Type

17

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

18 of 27

Broadcast Domains and Network Segmentation

  • Many protocols use broadcasts or multicasts (e.g., ARP use broadcasts to locate other devices, hosts send DHCP discover broadcasts to locate a DHCP server.)

​

  • Switches propagate broadcasts out all interfaces except the interface on which it was received.
  • The only device that stops broadcasts is a router. Routers do not propagate broadcasts.

​

  • Each router interface connects to a broadcast domain. broadcasts are only propagated within that specific broadcast domain.

18

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

19 of 27

Problems with Large Broadcast Domains

  • A problem with a large broadcast domain is that these hosts can generate excessive مُبَالَغ فيه broadcasts and negatively affect the network. Large number of broadcast messages leads to network congestion and slower performance.

​

  • The solution is to reduce the size of the network to create smaller broadcast domains using subnetting.

​

  • Dividing the network address 172.16.0.0 /16 into two subnets of 200 users each:
              • 172.16.0.0 /24
              • 172.16.1.0 /24.

Broadcasts are only propagated within the smaller broadcast domains.

19

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

20 of 27

Subnets and Subnet Masks

Subnetting : Dividing the network into small networks or subnets by borrowing bits from the host bits.

​

20

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

21 of 27

IPv4 Address Conservation

  • Given the topology with 192.168.1.0/24 network.
  • 7 subnets are required (i.e, four LANs and three WAN links) and the largest number of host is in Building D with 28 hosts.
  • A /27 mask would provide 8 subnets of 30 host IP addresses and therefore support this topology.

​

​

​

21

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

22 of 27

Subnetting Formulas

  • To calculate the number of subnets that can be created from the bits borrowed:

​

​

​

​

The possible number of subnets that can be created when borrowing 1, 2, 3, 4, 5, or 6 bits.

​

​

​

​

​

​

22

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

23 of 27

Subnetting Formulas

  • To calculate the number of hosts that can be supported:

​

​

​

There are two addresses that cannot be assigned to a host, the network address and the broadcast address, so we must subtract 2.

  • Therefore, borrowing 1 host bit toward the network results in creating 2 subnets, and each subnet can have a total of 126 hosts assigned.
  • There are 7 host bits remaining, so the calculation is 2^7 = 128-2 = 126. This means that each of the subnets has 126 valid host addresses.

23

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

24 of 27

Device Address Assignment

Within a network, there are different types of devices that require addresses:

  • End user clients – Most use DHCP to reduce burden on network support staff and entry errors. IPv6 clients can obtain address information using DHCPv6 or SLAAC.
  • Servers and peripherals – These should have a predictable static IP address.
  • Intermediary devices – Devices are assigned addresses for network management, monitoring, and security.
  • Gateway – Routers and firewall devices have an IP address assigned to each interface that serves as the gateway for the hosts in that 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.

24

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

25 of 27

IPv4 Addressing in Packet Tracer

25

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

25

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

25

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

26 of 27

Suggested Lab Work

Solve the work sheet, it will help you to understand the Subnetting and VLSM concepts.

Page #

Activity Name

11.5.5

Subnet an IPv4 Network

11.7.5

Subnetting Scenario

11.9.3

VLSM Design and Implementation Practice

11.10.1

Design and Implement a VLSM Addressing Scheme

26

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

27 of 27

27

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential