IP Addressing - Bryan Marshall

Download Report

Transcript IP Addressing - Bryan Marshall

IP Addressing
IP v4
• 32 bit address (bbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb)
• 4 Bytes (B.B.B.B)
• 4,294,967,296 (232) unique addresses
• 18 million private addresses
• 270 million multicast addresses
What is a bit?
• 0|1
• On or Off
• 11110000.10101010.00001111.01101100
Class first octet Network ID
Host ID
# of networks
# of hosts
A
1 - 126
a
b.c.d
126
16,777,214
B
128 - 191
a.b
c.d
16,384
65,534
C
192 - 223
a.b.c
d
2,097,151
254
• Class A -NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn
• Class B -NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn
• Class C -NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn
Special Rules
1. First octet 127 represents the local computer, regardless of what
network it is really in. This is useful when testing internal
operations.
2. Octets 0 and 255 are not acceptable values in some situations, but
0 can be used as the second and/or third octet (e.g. 10.2.0.100).
Private Networks
The 24-bit Block
A 10.0.0.0 to
10.255.255.255
The 20-bit Block
B
172.16.0.0 to 172.31.255.255
The 16-bit Block
C
192.168.0.0 to 192.168.255.255
Static vs Dynamic
• When a computer uses the same IP address every time it connects to
the network, it is known as a Static IP address.
• In contrast, in situations when the computer's IP address changes
frequently (such as when a user logs on to a network through dialup
or through shared residential cable) it is called a Dynamic IP address.
Assignment Methods
• Manually
• Static IP addresses are manually assigned to a computer by an administrator.
• DHCP Server
• This contrasts with dynamic IP addresses, which is assigned either randomly
or arbitrarily assigned by a server using Dynamic Host Configuration Protocol.
More DHCP
• IP addresses assigned using DHCP may stay the same for long periods
of time, they can generally change.
• Dynamically assigned static IP Addresses
• A DHCP server is used, but it is specifically configured to always assign the
same IP address to a particular computer, and never to assign that IP address
to another computer.
• This allows static IP addresses to be configured in one place, without having
to specifically configure each computer on the network in a different way.
Converting Binary (10101110.01101111.00000001.00000000)
to Decimal (174.110.1.0)
128
64
32
16
8
4
2
1
On
Off
On
Off
On
On
On
Off
1
0
1
0
1
1
1
0
128 +
0+
32 +
0+
8+
4+
2+
0 = 174
128
64
32
16
8
4
2
1
Off
On
On
Off
On
On
On
On
0
1
1
0
1
1
1
1
0+
64 +
32 +
0+
8+
4+
2+
1 = 110
128
64
32
16
8
4
2
1
Off
Off
Off
Off
Off
Off
Off
On
0
0
0
0
0
0
0
1
0+
0+
0+
0+
0+
0+
0+
1=1
128
64
32
16
8
4
2
1
Off
Off
Off
Off
Off
Off
Off
Off
0
0
0
0
0
0
0
0
0+
0+
0+
0+
0+
0+
0+
0=0
You Do It
1.
2.
3.
4.
5.
10001111
11111111
10101010
10000011
10111010
IP v6
• 32 hex numbers organized into 8 quartets
• Separated by colons (:)
• Each quarter is 16 bits
• Leading zeros omitted.
• Double colon for 0 quartets
• FEC0:0:0:0:78CD:1283:F398:23AB
• FEC0::78CD:1283:F398:23AB
IP v6
• Address has two parts
• Prefix (64 bit) ISP, geographic region …
• Interface ID (64 bit)
• Could use MAC address as the automatic host ID
• NAT-PT (protocol translation) which will convert the IPv6 packet
header into a IPv4 packet header.
IPv6 IP Addressing
• Practice identify good addresses
1.
2.
3.
4.
168:192:1::15
::1:1:6789:34:33:2
ABCD:ABCD:4323:7::98FX
7890:1234::5432::ADEG
Convert Hex to Binary
• 1234
• 9:11F0
• FF:23
Router Config
•
•
•
•
•
•
•
•
•
•
•
enable
config t
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
exit