0% found this document useful (0 votes)
41 views31 pages

Day 4

Uploaded by

hagala4120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views31 pages

Day 4

Uploaded by

hagala4120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Number/Numeral System

Number system is also known as Numeral system. Most of us heard binary, Decimal,
Hexadecimal etc. Representation of any number changes, as we change the base. So
base is the number of digits or combination of digits and letters.
Commonly used number system:
Decimal – Base 10 – System uses 10 digits from 0 ,1, 2,3,4,5,6,7,8, and 9
Binary – Base 2 – Digits are either 1 or 0
HexaDecimal – Base 16 – system uses 16 digits from 0 to 9 and A,B,C,D,E, and F.
Conversion from Binary to Decimal to Hexadecimal

Nibble is 4 bit and byte is 8 bit. Following shows a decimal value of each bit location in a nibble and a byte.
Nibble 8 4 2 1
Byte 128 64 32 16 8 4 2 1

Numbers are placed in value spot; starting from right and moving left with each spot having double the value
of the previous spot.

Binary to Decimal conversion chart as follows:


Hexadecimal addressing is completely different than binary or decimal – it’s converted by
reading nibbles, not bytes. Cisco likes to put 0x in front of characters so you know
that they are a hex value.
For e.g. Hex 0xB5
We will split into nibble B and 5
B = 11 = 1011
5=5=0101
Binary = 10110101
Decimal = 181

Convert binary 01010101 to Decimal and Hex.


We will split into nibble 0101 and 0101
0101=5
0101=5
So Hexadecimal is 0x55
Decimal = 85 [64+16+4+1)

Convert Decimal 128 into Binary and Hex


We will convert to binary first and it will be 10000000
Split binary into nibble 1000 and 0000
Hex 0x80 [8 =1000 and 0=0000]
• Convert 192.168.10.15 in binary format

• Convert 172.16.20.55 in binary format

• Convert 11000110.11010011.00111001.11010001 in decimal format

• Convert 11001100.00110011.10101010.01010101 in decimal format

• Convert 10000100.11010010.10111000.10100110 in decimal format

• Convert 11011000.00011011.00111101.01110110 in Hexadecimal format

• Convert 11001010.11110101.10000011.11101011 in Hexadecimal format


IP Address
IP address is a unique address or logical address that identifies a device on the
network. IP stands for Internet Protocol address. It is written and displayed in
human-readable notations For example 192.168.0.1 in IPv4 and
2001:db8:0:1234:0:567:8:1 in IPv6.

IP address space is globally managed by IANA(Internet Assigned Number


Authority) and by local internet registries such as ISP

IP address serves two principal functions: 1. It identifies the HOST or more


specifically it’s network interface. 2. Location of the HOST in the network.

IP network may be divided into sub networks in both IPv4 and IPv6. For this
purpose, an IP address is recognized as consisting of two parts:
- Network prefix in the higher order bit
-Remaining bit is called Host bit or rest field or Interface identifier(IPv6)
IP Address Hierarchy
• An IP address consist of 32bits. These bits are divided into 4 section referred as
Octet or byte, each containing 1 byte or 8 bits.
• 32 bit IP address is structured or hierarchical. It is structured by network and host
or by network, subnet and host.
• Designer of Internet decided to create classes of network based on network size.
For smaller number of node – they created Class C and for Large number of node
they created Class B. Class distinction between large and small is predictably called
Class B.
Class A
Designer of IP address scheme said that the first bit of the first byte in Class A network address must
always be OFF i.e 0.
0000 0000 = 0
0111 1111 = 127
So IP address range in Class A is 0-127
127 is reserved for loopback and so the Class A IP range will be 0-126

Class B
RFC state that first bit of the first byte must always be turned on but the second bit must always be
turned off.
1000 0000 = 128
1011 1111 = 191
Class B IP range 128-191

Class C
RFC define the first 2 bit of the first octet must always be turned on but the third bit must always be
turned off.
1100 0000 = 192
1101 1111 = 223
Class C IP range 192-223

Follows the similar pattern for Class D and Class E. IP range for Class D 224-239 is reserved for multicast
and Class E 240-255 are reserved for scientific/Research purpose. So we don’t need them.
Subnetting
Subnet Mask: Subnet mask is a 32bit value that allows the recipient of IP packets to
distinguish the network ID portion of the IP address from the host ID portion of the IP
address.
32-bit subnet mask composed of 1s and 0s. 1s in the subnet mask represent Network or
Subnet address and 0s represents Hosts. Default subnet mask:
Class A: Decimal - 255.0.0.0 Binary : 11111111.00000000.00000000.00000000
Class B: Decimal - 255.255.0.0 Binary: 11111111.11111111.00000000.00000000
Class C: Decimal - 255.255.255.0 Binary :11111111.11111111.11111111.00000000

Default Gateway : A gateway is a network node that serves as an access point to another
network.
Power of 2
2n Decimal 2n Decimal
21 2 211 2048 Subnetting: Subnetting means you divide
large network into smaller networks or
22 4 212 4096 logical partition of an IP network or you
23 8 213 8192 borrow bits from the host portion of the IP
address and reserve them to define
24 16 214 16384 subnet.
25 32 215 32,768
26 64 216 65,536
27 128 217 131,072
28 256
29 512
210 1024
Historical Classful Network Architecture

Private IP Address : These IP addresses are non-routable and reserved, as it is not unique
Addresses. All addresses outside private IP address range are considered public.
Bit Wise Representation
IP address - Reservation
IP address are reserved for special purpose. So they can’t be assigned to nodes.
Address Functions
Network Address of all 0s Interpreted “This Network or Segment” For e.g.
0.0.0.110 for sending broadcast messages to the
network.
Network Address of all 1s Interpreted “All Network”
Network 127.0.0.0 Reserved for loopback test. It allow to test packet
without generating network traffic
Node address of all 0s Interpreted “Network Address” For e.g. 17.16.0.0
or 10.0.0.0
Node address of all 1s Interpreted “All Nodes” on Network or Broadcast
address.
0.0.0.0 Designate default route “Any Network” or
Unspecified.
255.255.255.255 Broadcast messages to all network
169.254.0.0 APIPA [Automatic Private IP Addressing]/Link-Local
address
224.0.0.0 to 224.0.0.255 Local Subnetwork
• What is the class C address range in Decimal and binary?
• What is the valid range of a class A network address?
• What is 127.0.0.1 address used for?
• How do you find the network address from the listed IP address?
• How do you find the broadcast address from a listed IP address?
• What is the class A private IP address space?
• What is the class B private IP address space?
• What is the class C private IP address space?
• What are all the available characters that you can use in hexadecimal addressing?
Classless Inter-Domain Routing [CIDR]
• IETF (Internet Engineering Task Force) Introduce CIDR in 1993 to replace the classful
addressing system.
• CIDR is basically the method that ISP(Internet Service Provider) use to allocate a number of IP
addresses to customer either home or office. They provide addresses in certain block size.
• When you receive block of addresses from ISP for e.g. 192.168.10.32/28. This tells you what
your subnet mask is 255.255.255.240
For e.g. Class A default subnet mask is 255.0.0.0 and in binary 11111111 and CIDR format it will
be /8.
Slash notation means how many bits are turned on, so the maximum could be /32.

Subnet Mask CIDR Subnet Mask CIDR Subnet Mask CIDR


255.0.0.0 /8 255.255.0.0 /16 255.255.254.0 /23
255.128.0.0 /9 255.255.128.0 /17 255.255.255.0 /24
255.192.0.0 /10 255.255.192.0 /18 255.255.255.128 /25
255.224.0.0 /11 255.255.224.0 /19 255.255.255.192 /26
255.240.0.0 /12 255.255.240.0 /20 255.255.255.224 /27
255.248.0.0 /13 255.255.248.0 /21 255.255.255.240 /28
255.252.0.0 /14 255.255.252.0 /22 255.255.255.248 /29
255.254.0.0 /15 255.255.254.0 /23 255.255.255.252 /30
Subnet bits start at the left and go to the right without skipping bits. For example we
can take Class C which has only 8 bits available for Hosts .

Binary Decimal CIDR


0000 0000 0 /24
1000 0000 128 /25
1100 0000 192 /26
1110 0000 224 /27
1111 0000 240 /28
1111 1000 248 /29
1111 1100 252 /30

To determine the number of subnets, valid hosts, and broadcast addresses of subnet
for 192.168.1.0/26
How many subnet 2x = number of subnets. X is the number of masked bit
1100 0000 = 22 = 4 subnets.
How many host per subnet 2y= number of host per subnet. Y is the number of
unmarked bits. Valid host will be 2y-2 [ 1 for Network and 1 for broadcast]
26-2 is 64-2=62 Hosts per subnet
Valid Subnets = 256- subnet mask = block size
256-192=64 block size
4 subnets = 0 64 128 192

Broadcast address for each subnet will be number right before the next subnet. For e.g.
0 subnet will have a broadcast address 63 because next segment is 64

Valid Host are the number between subnet and broadcast. For e.g. If 0 is the subnet and
63 is broadcast so the valid host range is 1-62

For e.g. 192.168.10.0/25.


1. How many subnets?
2. How many host per subnet?
3. What are the valid subnets?
4. What’s the broadcast address for each subnet?
5. What are valid host?
Solution:
How many subnets =21 because CIDR notation /25 means 1 bit borrowed from host. 2
subnets.
How many Host per subnet = 27 because there are 7 bits left. 126 Host per subnet (128-
2).
Valid Subnets = 256-128 = 128 block size
2 subnets = 0 128

Broadcast Address = For 0 subnet broadcast address is 127 and For 128 subnet
broadcast address is 255

Subnet 1 Subnet 2
Subnet 0 128
First Host 1 129
Last Host 126 254
Broadcast 127 255

Above diagram shows implementation of 192.168.10.0/25 logical network


Sample Practice exercise for Class C
1. 192.168.10.0/26
1100 0000
Subnet (2x) = 22 = 4 subnet
Host Per Subnet (2y-2) = 26-2 = 62 hosts per subnet
Valid Subnet = 256-192= 64 block Size

Subnet 1 Subnet 2 Subnet 3 Subnet 4


Subnet 0 64 128 192
First Host 1 65 129 193
Last Host 62 126 190 254
Broadcast 63 127 191 255

2. 192.168.10.0/27

3. 192.168.10.0/28

4. 192.168.10.0/29
Subnetting for Class B network
Process of subnetting class B is same as class C, except that you have more host bits
and you start in 3 octet and for 4 octet add 0 to network portion and 255 to
broadcast.
For e.g. 172.16.0.0/19
11100000.00000000
Subnet (2x) = 23=8 Subnets
Host Per Subnet (2y-2)= 213-2=8190
Valid Subnet =256-224=32 Block size
Subnet 1 Subnet 2 Subnet 3 Subnet 4 …. Subnet 8
Subnet 0.0 32.0 64.0 96.0 224.0
First Host 0.1 32.1 64.1 96.1 224.1
Last Host 31.254 63.254 95.254 127.254 255.254
Broadcast 31.255 63.255 95.255 127.255 255.255
Practice for Class B
1. What is the subnet and broadcast address of the subnet in which
172.16.10.33/27 resides?
Soln: Look at the 4 octect i.e. 33
Valid Subnet = 256-224 = 32
So 32 +32 =64 and 33 falls under 32-64
Subnet: 172.16.10.32
Broadcast : 172.16.10.63

2. What is the subnet and broadcast address of IP address 172.16.66.10/18?


Soln: Here we have to focus on third octet i.e. 66
Valid subnet= 256-192= 64
Subnet: 172.16.64.0
Broadcast : 172.16.127.255

3. What is the subnet and broadcast address is the IP address 172.16.45.14/30?


4. What is the subnet and broadcast address is the IP address 172.16.88.255/20?
5. A router receives a packet on an interface with a destination address of
172.16.46.191/26. What will the router do with this packet ?
Subnetting for Class A
Process of subnetting class A is same as class B and C but there are 24 bits to play with
instead of the 16 in a class B and 8 in a class C address
For e.g. 10.0.0.0/16
11111111.00000000.00000000
Subnet (2x) = 28= 255 Subnets
Host Per Subnet (2y-2)= 216-2=65534
Valid Subnet =256-255=1 Block size . So 0,1,2,3 will be in second octet
Subnet 1 Subnet 2 Subnet 3 Subnet 4 …. Subnet ..
Subnet 0.0.0 1.0.0 2.0.0 3.0.0 255.0.0
First Host 0.0.1 1.0.1 2.0.1 3.0.1 255.0.1
Last Host 0.255.254 1.255.254 2.255.254 3.255.254 255.255.254
Broadcast 0.255.255 1.255.255 2.255.255 3.255.255 255.255.255
2. 10.0.0.0/20
11111111.11110000.00000000
Subnet (2x) = 212= 4096 Subnets
Host Per Subnet (2y-2)= 212-2=4094
Valid Subnet =256-240=16 Block size

Subnet 1 Subnet 2 Subnet 3 Subnet 4 …. Subnet ..


Subnet 0.0.0 0.16.0 0.32.0 0.48.0 255.240.0
First Host 0.0.1 0.16.1 0.32.1 0.48.1 255.240.1
Last Host 0.15.254 0.31.254 0.47.254 0.63.254 255.255.254
Broadcast 0.15.255 0.31.255 0.47.255 0.63.255 255.255.255
VLSM (Variable Length Subnet Mask)
• Until now, we have practiced subnetting used FLSM(Fixed length subnet mask)
• This means that all of the subnet use the same prefix length.
• VLSM is the process of creating subnets of different sizes, to make your use of
network addresses more efficient
• VLSM is more complicated than FLSM
To create VLSM for the above diagram, you need to follow the below steps:
1. Assign the largest subnet at the start of the address space
2. Assign the second largest subnet after it.
3. Repeat the process until all subnets have been assigned.
For e.g. from the diagram above, the order would be –
a. 25Hosts
b. 12Hosts
c. 10Hosts
d. 6Hosts
e. 2Hosts
Solution: 192.168.10.0
For 25 Hosts we would need 192.168.10.0/27
For 12 Hosts we would need 192.168.10.32/28
For 10 Hosts we would need 192.168.10.48/28
For 6 Hosts we would need 192.168.10.64/29
For 2 Hosts we would need 192.168.10.72/30
• Your boss needs you to design a subnet mask for 172.16.0.0
network that allows for at least 600 subnets and 45 hosts
address. What subnet mask you use?
• What is the last valid host on subnet 192.16836.64/27?
• You need to assign your router the first valid host address on
the 4th subnet of network 192.168.740/27?
• Network 192.168.10.0 needs to be divided into 6 subnet, with
atleast 25 hosts in each subnet. What subnet mask would you
use to accomplish this design goal?
• What is the broadcast address for subnet 192.168.42.128/25?
• What is the broadcast address of network 172.16.16.0/20?
• You need to assign a server the last valid host address on the
subnet 172.19.144.0/24. What IP address you would assign?
Route Summarization
Route Summarization also called route aggregation or supernetting, allowing routing
protocol to advertise many network as one address. The purpose of this is to reduce the
size of routing tables on router to save memory, which shortens the amount of time for
IP to parse the routing table and find the path to a remote network.
In supernetting, multiple networks are combined into a bigger network termed as
supernetwork or Supernet.

Classless routing protocol such as RIPv2, EIGRP, IS_IS, and OSPF supports route
summarization based on subnet addresses, including VLSM addressing. Classless
support summarization on an any boundary.
Classfulrouting protocol such as RIPv1, and IGRP automatically summarize routes on the
classful network boundary and do not support summarization on any other bit
boundaries.
Implement Route Summarization/Supernet
Route Summarization [How to Supernet a network]
1. Convert all IP in binary
2. Find matching bits from left to right
3. Re-write the matching numbers and add remaining 0s . This will be your New
Network ID.
4. Calculate the new subnet mask.

Route summarization for following network:


192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
Solution : Convert IP into Binary
11000000.10011000.00000000.00000000
11000000.10011000.00000001.00000000
11000000.10011000.00000010.00000000
Matching bit from left to right
11000000.10011000.00000000.00000000
11000000.10011000.00000001.00000000
11000000.10011000.00000010.00000000
Rewrite matching numbers
11000000.10011000.11111100.00000000
IP subnet-zero
Ip subnet-zero commands allow you to use the first subnet and the last subnet in your
network design. If IP subnet zero is enabled. By default , IP subnet zero command is
enabled by default from IOS 12.0 onward
For example, if we subnet 192.168.1.0/24 network into 4 subnets:
192.168.1.0/26, 192168.1.64/26, 192.168.1.128/26, and 192.168.1.192/26

You can implement ip subnet zero on point-to-point serial interface only. In here, you
use /31 subnet where we only 2 IP’s which can be implemented on router directly
connected to each other via serial interface.

You might also like