Ccna Cisco Certified Network Associate لبقتسملا تاراهم ةردابم بردملا ـمسا جاحلا ىيحي
Ccna Cisco Certified Network Associate لبقتسملا تاراهم ةردابم بردملا ـمسا جاحلا ىيحي
If we move the line all the way to the right we’re now using /31 (or
255.255.255.254)
This leaves one bit for the host address, with a possible value of 0 or 1
It borrows 7 bits for the network address
This gives us 128 subnets (27) which accommodate 2 hosts each
Class C /31
Subnet
.Let’s say we’ve been allocated Class C 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
Let’s move the line back a place. We’re now using /30 (or 255.255.255.252)
This leaves 2 bits for the host address, 22 = 4, minus 2 for the network and
broadcast address = 2 possible hosts
It borrows 6 bits for the network address
This gives us 64 subnets (26) which accommodate 2 hosts each
Class C /30
Subnet
.Notice that the line is after the 4. The network address goes up in values of 4
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
Let’s move the line back a place. We’re now using /29 (or 255.255.255.248)
This leaves 3 bits for the host address, 23 minus 2 = 6 possible hosts
It borrows 5 bits for the network address
This gives us 32 subnets (25) which accommodate 6 hosts each
Class C /29
Subnet
.Notice that the line is after the 8. The network address goes up in values of 8
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0
128 + 64 = 192
So the subnet mask is 255.255.255.192
Practice Question
Answer
Next let’s calculate the address range for this subnet
Write out 198.22.45.173/26
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0 1 1 0 1 1 0 1 0 1 1 0 1
128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0
Note that when we subnet a Class C address the magic is all going to
happen in the last subnet
So we didn’t really need to write out the 198.22.45 part
Variable Length Subnet Masks
VLSM
Early routing protocols only supported Fixed Length Subnet Masking
(FLSM) where all subnets had to be the same size. You couldn’t have a
subnet with 14 hosts and another subnet with 64 hosts in the same
network.
All modern routing protocols support Variable Length Subnet Masking.
This allows us to size subnets differently according to how many hosts
they have.
Subnetting
Considerations
How many locations do we have in the network?
How many hosts are in each location?
What are the IP addressing requirements for each location? (Should
different departments or types of host be in different subnets?)
What size is appropriate for each subnet? (Don’t waste addresses, but
leave room for growth.)
Network Topology
Diagram
Sales: Sales:
14 Hosts 7 Hosts
New York Boston
The router interfaces
need IP addresses
.so count as hosts
The router interface Point to point link:
PCs = 14 hosts 13 + 2 Hosts
Eng: Eng:
28 Hosts 28 Hosts
In the real world you want a scalable design – you will likely allocate spare
subnets for future growth, and leave space in the subnets for additional
hosts.
In the CCNA exam do exactly what the question asks, don’t worry about
whether it’s best practice or not.
Engineering
Departments
The Engineering departments in both sites have 28 hosts.
For our example we’ve been told that the departments will not grow and
we need to use the smallest subnets possible to maximise our address
space.
calculate the optimal subnet mask for the Engineering
departments.
Also determine the network and broadcast addresses that will be allocated
to both Engineering departments, and the range of host addresses.
Engineering
Departments
We’ve been allocated 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
You also need to allocate address space for your router loopback
interfaces, we’ll talk about those later. (Not required in our example.)
New York to Boston
Link
The last subnet is the link between the New York and Boston routers.
Pause the video here and calculate the optimal subnet mask.
Also determine the network and broadcast addresses that we will allocate,
and the range of host addresses.
New York to Boston
Link
We’ve been allocated 200.15.10.0/24
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
If we subnet this into /29 subnets, we have 3 bits for host addressing.
This allows 6 hosts per network (23 - 2) , the same as if we used /29
with a Class C address.
Because we were allocated a Class B /16 address range, we have 13
bits for network addresses
This allows 8192 subnets (213)
Example 1 – Class B on 4th
Octet
128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1
1 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0
Private Private
10.10.10.0/24 172.18.5.0/24
RFC 1918 Example
2
Bank A Internet
Bank B
Public Public
175.11.0.0/24 196.14.10.0/24
Private Private
192.168.10.0/24 192.168.10.0/24
The IPv4 Global Address Space
Problem
The designers of IPv4 did not envision the explosive growth of its use
4.3 billion addresses seemed more than enough
The protocol is not particularly efficient in its use of the available
space, with many addresses being wasted
IPv6
The Internet authorities started to predict address exhaustion in the
late 1980’s, and IPv6 was developed in the 90’s as the long term
solution
IPv6 uses a 128 bit address, compared to IPv4’s 32 bit address
IPv6 provides more than 7.9×1028 times as many addresses as IPv4
The IPv6 Problem and
NAT
There is not a seamless migration path from IPv4 to IPv6
NAT (Network Address Translation) was implemented as a temporary
workaround to mitigate the lack of IPv4 addresses until organisations
had time to migrate to IPv6
An organisation can use private IP addresses on their inside network,
but still grant their hosts Internet access by translating them to their
outside public IP address
Many hosts on the inside can share a few or a single public IP address
on the outside
Private Addresses and
NAT
Office A Office B
Internet
Public Public
175.11.0.1/28 196.14.10.25/29
14 Addresses 6
Addresses
Private Private
192.168.10.0/24 192.168.10.0/24
Hosts 200 100
Hosts
END of DAY2