Professional Documents
Culture Documents
CCNA1-CH11-IPV4 Addressing-New
CCNA1-CH11-IPV4 Addressing-New
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.
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.
Subnet Mask: 1st octet 2nd octet 3rd octet 4th octet
255.0.0.0 or /8 Network Host Host 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.
192.168.1.0
Network Host
8
Subnet Masks …
Given the subnet mask , underline the network portion of each
address:
9
Types of Addresses
◆ 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
12
Range of hosts
◆ Host addresses are all addresses between the network address and the broadcast
address.
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
Range of addresses
172.1.16.1 10101100.00000001.00010000.00000001
…
172.1.31.254 10101100.00000001.00011111.11111110
14
Subnet Masks: Non-Natural 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)
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
◆ 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
◆ IP address, subnet mask, default gateway, and other configuration information are
all assigned.
18
Dynamic Assignment
For IPV4 , this is done using Dynamic Host Configuration Protocol (DHCP).
In an IPv4 network, the hosts can communicate one of three different ways:
• 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.
24
More about broadcasting
◆ 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.
◆ Divided into reserved link local addresses and globally scoped addresses.
26
Multicast Addresses
For example:
One hosts sends packets to
the multicast IP address
224.10.10.5/24.
◆ Default Route - The IPv4 default route is 0.0.0.0. Used when a more specific
route is not available.
◆ 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
Answer:
• 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.
• 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
36
Class B addresses
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!
37
Class C addresses
8 bits
Number between 192 - 223 With 8 bits available for hosts, there a 2 8
possible addresses. That’s 256 nodes!
38
IPv4 Address Classes
Class D Addresses
Class E Addresses
39
Examples
40
Classful IP Addressing
◆ No medium size host networks , subnet masks are not sent “Default”.
◆ The first octet of the address determined the class , networks & hosts
41
Who assigns IP Network Addresses?
◆ Public addresses are required on the Internet and they must be unique.
42
Assignment of IP Addresses
43
Regional Internet Registries (RIR)
44
Subnetting
IP Addresses – First look
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.1.1/
24 172.16.10.3/24 172.16.40.29/
172.16.20.103/24 172.16.30.111/24
24
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.
◆ 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 :
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.
◆ 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
■ 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.
◆ 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 address:
• All 0 bits in the host portion.
◆ Broadcast address:
• All 1 bits in the host portion.
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?
172 16 0 0
◆ 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.
◆ 65,534 host addresses, one for network address and one for broadcast address.
64
With subnetting:
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.
•We have 7 bits for hosts forming 126 Host per subnet.
◆ 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)
69
VLSM (Variable Length Subnet Masks)
Subnetting a subnet
◆ 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.
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
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
255.255.255.224 255.255.255.252
Original Sub-Subnet
Subnet Mask Mask
11100000 111111 00
◆ 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.
◆ 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
◆ 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.
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.
Instructor
Student
Admin
WAN
Given 192.168.1.0/24
Subnet plan with VLSM
A
D
C
Problem #2
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 allocation of network layer address space within the corporate network
needs to be well designed.
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.