IP ADDRESSING

advertisement
An IP address is a numeric identifier assigned to each machine on an IP network.
IP Terms
Bit
(Binary digit) either a 1 or a 0.
Byte =
8 bits.
Octet -
Always 8 bits. Base-8 addressing scheme.
Network address The designation used in routing to send packets to a remote network,
Ex.10.0.0.0, 172.16.0.0, and 192.168.10.0.
Broadcast address Used by applications and hosts to send information to all nodes on a
Network.
Ex. 255.255.255.255, which is all networks, all nodes;
172.16.255.255, which is all subnets and hosts on network 17.16.0.0
10.255.255.255, which broadcasts to all subnets and hosts on
Network 10.0.0.0.
The Hierarchical IP Addressing Scheme
An IP address consists of 32 bits of information. These bits are divided into four sections, referred to as
octets or bytes, each containing 1 byte (8 bits).
You can depict an IP address using one of three methods:
1) Dotted-decimal,
as in 172.16.30.56
2) Binary,
as in 10101100.00010000.00011110.00111000
3) Hexadecimal,
as in 82 39 1E 38
IMP Points (About IP Address)
1) Software address or logical address
2) Combination of Network Address & Host Address
3) Consists of 32 Bits
8bit . 8bit . 8bit . 8bit
xxxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
00000000.00000000.00000000.00000000 = 0.0.0.0
11111111.11111111.11111111.11111111 = 255.255.255.255
Dotted Binary
Dotted Decimal
Classes of Networks
8 bits
8 bits
8 bits
8 bits
Class A
Network
Host
Host
Host
Class B
Network
Network
Host
Host
Class C
Network
Network
Network
Host
Class D
Multicast
Class E
Research
FIGURE: Classes of Networks
Network Address Range:
Class A
(To calculate n/w address range)
Rule: The first bit of the first byte must always be 0.
Class A
Network
Host
Host
0xxxxxxx
00000000=0
(Turn the other 7 bits all off)
01111111=127
(Turn the other 7 bits all on)
Host
So, a Class A network range in the first octet between 0 and 127.
IP address range 0.0.0.0
127.255.255.255
Class B
Rule: The first two bit of the first byte must always be 1 0
Class B
Network
Network
Host
Host
10xxxxxx
10000000=128
(Turn the other 6 bits all off)
10111111=191
(Turn the other 6 bits all on)
Class B network address range is from 128 to 191 in first octet.
IP address range 128.0.0.0
191.255.255.255
Class C
Rule: The first three bit of the first byte must always be 1 1 0
Class C
Network
Network
Network
110xxxxx
11000000=192
(Turn the other 5 bits all off)
11011111=223
(Turn the other 5 bits all on)
Host
Class C network address range is from 192 to 223 in first octet.
IP address range 192.0.0.0
223.255.255.255
Class D
Rule: The first four bit of the first byte must always be 1 1 1 0
Class D
8bit
8bit
8bit
8bit
1110xxxx
11100000=224
(Turn the other 4 bits all off)
11101111=239
(Turn the other 4 bits all on)
Class D network address range is from 224 to 239 in first octet.
IP address range 224.0.0.0
239.255.255.255
Class E
Rule: The first four bit of the first byte must always be 1 1 1 1
Class E
8bit
8bit
8bit
8bit
1111xxxx
11110000=240
(Turn the other 4 bits all off)
11111111=255
(Turn the other 4 bits all on)
Class E network address range is from 240 to 255 in first octet.
IP address range 240.0.0.0
255.255.255.255
Network Addresses: Special Purpose
Some IP addresses are reserved for special purposes, and network administrators shouldn’t assign these
addresses to hosts.
FUNCTION
ADDRESS
Network address of all 0s
Mean “this network or segment.”
Network address of all 1s
Mean “all network
Host address of all 0s
Mean “this host”
Host address of all 1s
Mean “all host”
Network 127.0.0.1
Reserved for loopback test
Entire IP address set to all 0s
( 0.0.0.0)
Used by Cisco routers to define
the default route.
Entire IP address set to all 1s
(255.255.255.255)
Broadcast
TABLE: Reserved IP Addresses
Actual Range of IP Addresses
1)Class A
Network
Host
Host
0.0.0.0
127.255.255.255
Network Address Range
Earlier Range is 0-127
But, 0 is reserved to designate the default route and
127 is reserved for loopback test.
So, the actual range of network addresses 1 to 126
Host Address Range
Earlier Range is 0.0.0
255.255.255
But, host address of all 0s and all 1s are reserved,
So, the actual range of host addresses 0.0.1
255.255.254
Actual IP Address Range
1.0.0.1
126.255.255.254
2)Class B
Host
Network Network
Host
Host
128.0.0.0
192.255.255.255
Network Address Range
Earlier Range is 128.0
192.255
But, Nothing is reserved
So, the actual range of network addresses 128.0
192.255
Host Address Range
Earlier Range is 0.0
255.255
But, host address of all 0s and all 1s are reserved,
So, the actual range of host addresses 0.1
255.254
Actual IP Address Range
128.0.0.1
191.255.255.254
3)Class C
Network Network Network
Host
192.0.0.0
223.255.255.255
Network Address Range
Earlier Range is 128.0.0
192.255.255
But, nothing is reserved
So, the actual range of network addresses 192.0.0
223.255.255
Host Address Range
Earlier Range is 0.0
255.255
But, host address of all 0s and all 1s are reserved,
So, the actual range of host addresses 1 - 254
Actual IP Address Range
192.0.0.1
223.255.255.254
Class
Format
No.
of
N/W
Bits
No.
of
Host
Bits
No. of
Reserved
Bits
A
N.H.H.H
8
24
1(0)
B
N.N.H.H
16
16
C
N.N.N.H
24
8
N/W
Address
Range
Host
Address
Range
IP Address
Range
No. of
Networks
No. of
Hosts
No. of IP
Addresses
1-126
0.0.1 255.255.254
1.0.0.1 126.255.255.254
126
224 2=16777214
126*16777214
2(10)
128.0 191.255
0.1 –
255.254
128.0.0.1 191.255.255.254
16384
216 -2=65534
16384*65534
3(110)
192.0.0 223.255.255
1 - 254
192.0.0.1 223.255.255.254
2097150
28-2=254
2097150*254
Subnetting
A one larger network breaks into many smaller networks is known as subneting.
Benefits of Subnetting:
1) Simplified management
It’s easier to identify and isolate network problems in a group of smaller connected networks
than within one gigantic network
2) Optimized network performance
This is a result of reduced network traffic.
3) Reduced network traffic
The smaller broadcast domains you create the less network traffic on that network segment.
Subnet Masks
A subnet mask is a 32-bit 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.
Class
Format
Default Subnet Mask
A
N.H.H.H
255.0.0.0
B
N.N.H.H
255.255.0.0
C
N.N.N.H
255.255.255.0
TABLE: Default Subnet Mask
Note: You can define any subnet mask below any class range.
Subnetting Class C Addresses
In a Class C address, only 8 bits is available for defining the hosts.
Rule:
1) Subnet bits start at the left and go to the right, without skipping any single bit.
This means that subnet masks can be
XXXXXXXX
10000000=128 Illegal /25
11000000=192
/26
11100000=224
/27
11110000=240
/28
11111000=248
/29
11111100=252
/30
11111110=254 Illegal /31
2) You cannot have only single bit for subnetting, which would be illegal.
Then valid subnet masks are
255.255.255.192
255.255.255.224
255.255.255.240
255.255.255.248
255.255.255.252
A] The Binary Method:
Subnetting a Class C Address
Ex. 255.255.255.192.
192=11000000
2 bits for subnetting,
6 bits for defining the hosts in each subnet.
Rule: The subnet bits can’t be both off or on at the same time,
00000000=0
(all host bits off)
Illegal (According to rule)
01000000=64 (all host bits off)
10000000=128 (all host bits off)
11000000=192 (all host bits off)
Then valid subnets are 0,64,128,192
TABLE: Subnet 64
Illegal (According to rule)
Subnet Bit
Host Bit
Meaning
00
000000=0
The Network Address
00
000001=1
First Valid Host
00
111110=62
Last Valid Host
00
111111=63
The Broadcast Address
TABLE: Subnet 64
TABLE: Subnet 64
Subnet Bit
Host Bit
Meaning
01
000000=64
The Network Address
01
000001=65
First Valid Host
01
111110=126
Last Valid Host
01
111111=127
The Broadcast Address
TABLE: Subnet 128
Subnet Bit
Host Bit
Meaning
10
000000=128
The Network Address
10
000001=129
First Valid Host
10
111110=190
Last Valid Host
10
111111=191
The Broadcast Address
TABLE: Subnet 192
Subnet Bit
Host Bit
Meaning
11
000000=192
The Network Address
11
000001=193
First Valid Host
11
111110=254
Last Valid Host
11
111111=255
The Broadcast Address
B] Alternate Method:
Subnetting a Class C Address
To solve this, you need to do answer only four questions:
Questions:
1. How many subnets?
2. What are the valid subnets?
3. How many hosts?
4. What are the valid hosts?
(In each subnet)
(In each subnet)
Answers:
1. No. of Subnets =2x
where X = No. of subnet bits
2. 256–Subnet Mask=Base Number (First valid subnet)
Keep adding the base no. to itself until you reach the subnet mask
i.e. Add On
3. No. of Hosts = 2y–2
where Y = No. of Host bits
4. Valid hosts are the numbers between the subnets, minus all 0s and all
1s.
Ex. Class C Addresses
1] 255.255.255.192
192 = 11000000
No. of subnet bits X=2,
No. of host bits Y=6
1) No. of subnets = 22
=4
2) 256–192=64, (first valid subnet) base number
0.0+64=64,64+64=128. 128+64=192
Then valid subnets are 0.64,128 and 192
3) No. of hosts (per subnet) = 26–2
= 62
4) Valid Hosts
2] 255.255.255.224
224= 111 00000
No. of subnet bits X=3,
No. of host bits Y=5
1) No. of subnets = 23
=8
2) 256–224=32, (first valid subnet) base number
Then valid subnets are 0,32, 32+32=64, 64+32=96, 96+32=128,
128+32=160, 160+32=192, 192+64=224
3) No. of hosts (per subnet) = 25–2
= 30
4) Valid Hosts
3] 255.255.255.240
240= 1111 0000
No. of subnet bits X=4,
No. of host bits Y=5
1) No. of subnets = 24
= 16
2) 256–240=16, (first valid subnet) base number
Then valid subnets are
0,16. 16+16=32. 32+16=48. 48+16=64. 64+16=80. 80+16=96. 96+16=112.
112+16=128. 128+16=144. 144+16=160. 160+16=176. 176+16=192.
192+16=208. 208+16=224. 224+16=240
3) No. of hosts (per subnet) = 24–2
= 14
4) Valid Hosts
4] 255.255.255.128
Earlier stated that only one subnet bit was illegal and not to use it.
Breaking the rule, this mask can be used when you need two subnets, each with 126 hosts.
The standard questions don’t work here,
To use this, use ip subnet-zero command on the global configuration mode to tell your router to break
the rules and use a 1-bit subnet mask.
128 = 1000000
No. of subnet bits X=1, i.e. either 0 or 1
Therefore valid subnets are
00000000 = 0
10000000 = 128
And No. of host bits Y=7
Then Valid Hosts are in each subnet
Subnetting Class B Addresses
In a Class B address, 16 bits is available for defining the hosts.
Net.Net.Host.Host
10000000.00000000=255.255.128.0
Subnet Mask Bits
Illegal
/17
11000000.00000000=255.255.192.0
/18
11100000.00000000=255.255.224.0
/19
11110000.00000000=255.255.240.0
/20
11111000.00000000=255.255.248.0
/21
11111100.00000000=255.255.252.0
/22
11111110.00000000=255.255.254.0
/23
11111111.00000000=255.255.255.0
/24
11111111.10000000=255.255.255.128
/25
11111111.11000000=255.255.255.192
/26
11111111.11100000=255.255.255.224
/27
11111111.11110000=255.255.255.240
/28
11111111.11111000=255.255.255.248
/29
11111111.11111100=255.255.255.252
/30
11111111.11111110=255.255.255.254 Illegal
/31
11111111.11111111=255.255.255.255 Broadcast
Ex: Class B Addresses
1] 255.255.192.0
192.0 = 11000000.00000000
/32
No. of subnet bits X=2,
No. of host bits Y=14
1) No. of subnets = 22
=4
2) 256–192=64, (first valid subnet) base number
64+64=128. 128+64=192 (Invalid-it is subnet mask),
Then valid subnets are 0.0,64.0,128.0 and 192.0
3) No. of hosts (per subnet) = 214–2
= 16382
4) Valid Hosts
2] 255.255.240.0
240.0 = 11110000.00000000
No. of subnet bits X=4,
No. of host bits Y=12
1) No. of subnets = 24
= 16
2) 256–240=32, (first valid subnet) base number
Then valid subnets are 0.0,16.0, 32.0,48.0 and so on up to 224.0
3) No. of hosts (per subnet) = 212–2
= 4096
4) Valid Hosts (for first 3 subnets)
3] 255.255.255.192
255.192 = 11111111.11000000
1. 210=1024 subnets.
2. 256–192=64 and 128. However, as long as all the subnet bits on the
third are not all off, then subnet 0 in the fourth octet is valid. Also, as
long as all the subnet bits in the third octet are not all on, 192 is valid
in the fourth octet as a subnet.
The subnets are 0.64, 0.128, 0.192, 1.64, 1.128, and 1.192 …
3. 26–2=62 hosts.
Subnetting Class A Addresses
Net.Host.Host.Host
10000000.00000000.00000000=255.128.0.0
Subnet Mask Bits
Illegal
/9
11000000.00000000.00000000=255.192.0.0
/10
11100000.00000000.00000000=255.224.0.0
/11
11110000.00000000.00000000=255.240.0.0
/12
11111000.00000000.00000000=255.248.0.0
/13
11111100.00000000.00000000=255.252.0.0
/14
11111110.00000000.00000000=255.254.0.0
/15
11111111.00000000.00000000=255.255.0.0
/16
11111111.10000000.00000000=255.255.128.0
/17
11111111.11000000.00000000=255.255.192.0
/18
11111111.11100000.00000000=255.255.224.0
/19
11111111.11110000.00000000=255.255.240.0
/20
11111111.11111000.00000000=255.255.248.0
/21
11111111.11111100.00000000=255.255.252.0
/22
11111111.11111110.00000000=255.255.254.0
/23
11111111.11111111.00000000=255.255.255.0
/24
11111111.11111111.10000000=255.255.255.128
/25
11111111.11111111.11000000=255.255.255.192
/26
11111111.11111111.11100000=255.255.255.224
/27
11111111.11111111.11110000=255.255.255.240
/28
11111111.11111111.11111000=255.255.255.248
/29
11111111.11111111.11111100=255.255.255.252
/30
11111111.11111111.11111110=255.255.255.254 Illegal
/31
11111111.11111111.11111111=255.255.255.255 B.C
/32
Ex. Class A Addresses
1] 255.255.0.0
255.0.0= 111111111.00000000.00000000
No. of subnet bits X=8,
1) No. of subnets = 28 – 2
= 254
No. of host bits Y=10
2) 256–255=1 (first valid subnet) base number
1, 2, 3, 4, 5, 6……………254.
255 (Invalid-it is subnet mask),
Then Valid subnets are 1.0.0, 2.0.0 and so on
3) No. of hosts (per subnet) = 216 –2
= 65534
4) Valid Hosts (for first & last subnet)
*********************************************************************************
Download