Professional Documents
Culture Documents
IP Addressing
IP Addressing
2
IPv4 Addressing
• IPv4: 32-bit addresses
• Usually written in dotted notation, e.g. 192.168.21.76
• Each number is a byte
• Stored in Big Endian order
0 8 16 24 31
Decimal 192 168 21 76
Hex C0 A8 15 4C
0 31
Pfx Network Host
1-126
0 2 8 16 24 31
Example: NEU
Class B 10 Network Host
129.10.*.*
128-191
0 3 8 16 24 31
Example:
Class C 110 Network Host
216.63.78.*
192-223 5
Address Classes
Way too big
Class Prefix Network Bits Number of Classes Hosts per Class
Bits
A 1 7 27 – 2 = 126 224 – 2 = 16,777,214
(0 and 127 are reserved) (All 0 and all 1 are reserved)
B 2 14 214 = 16,398 216 – 2 = 65,534
(All 0 and all 1 are reserved)
C 3 21 221 = 2,097,512 28 – 2 = 254
(All 0 and all 1 are reserved)
Total: 2,114,036
7
Private IP addresses
• Private IP addresses can be used on the private network of any
organization in the world and are not globally unique.
• There are three ranges of addresses that can be used in a private
network (e.g. your home LAN or office)
• 10.0.0.0 – 10.255.255.255
• 172.16.0.0 – 172.31.255.255
• 192.168.0.0 – 192.168.255.255
Internet routers are configured to discard any packets coming from the
private IP address ranges, so these addresses are not routable on the
Internet.
• a single broadcast domain – all hosts are in
the same broadcast domain. A broadcast
Subnetting sent by any device on the network will be
processed by all hosts, creating lots of
unnecessary traffic.
• network security – each device can reach
any other device on the network, which can
present security problems. For example, a
server containing sensitive information
shouldn’t be in the same network as user’s
workstations.
• organizational problems – in a large
networks, different departments are usually
grouped into different subnets. For example,
you can group all devices from the
Accounting department in the same subnet
and then give access to sensitive financial
data only to hosts from that subnet.
• Case 2
• Long version: 0000:0000:0001:AAAA:BBBC:A222:BBBA:0001
Shortened version: ::1:AAAA:BBBC:A222:BBBA:1
Types of IPv6 addresses
• Unicast – represents a single interface. Packets addressed to a unicast
address are delivered to a single interface.
• Anycast – identifies one or more interfaces. For example, servers that
support the same function can use the same unicast IP address.
Packets sent to that IP address are forwarded to the nearest server.
Anycast addresses are used for load-balancing. Known as “one-to-
nearest” address.
• Multicast – represent a dynamic group of hosts. Packets sent to this
address are delivered to many interfaces. Multicast addresses in IPv6
have a similar purpose as their counterparts in IPv4.
Unicast addresses represent a single interface. Packets
addressed to a unicast address will be delivered to a specific
network interface.
• global unicast – similar to IPv4 public IP addresses. These addresses
are assigned by the IANA and used on public networks. They have a
prefix of 2000::/3, (all the addresses that begin with binary 001).
• unique local – similar to IPv4 private addresses. They are used in
private networks and aren’t routable on the Internet. These
addresses have a prefix of FD00::/8.
• link local – these addresses are used for sending packets over the
local subnet. Routers do not forward packets with this addresses to
other subnets. IPv6 requires a link-local address to be assigned to
every network interface on which the IPv6 protocol is enabled. These
addresses have a prefix of FE80::/10.
IPv6 global unicast addresses
• A global IPv6 address consists of two parts:
• subnet ID – 64 bits long. Contains the site prefix (obtained from a Regional
Internet Registry) and the subnet ID (subnets within the site).
• interface ID – 64 bits long. typically composed of a part of the MAC address
of the interface.
IPv6 unique local addresses
• A unique local IPv6 address is constructed by appending a randomly
generated 40-bit hexadecimal string to the FD00::/8 prefix. The subnet field
and interface ID are created in the same way as with global IPv6 addresses.
• A graphical representation of an unique local IPv6 address:
IPv6 link-local addresses
• Link-local addresses have a prefix of FE80::/10. They are mostly used
for auto-address configuration and neighbour discovery.
IPv6 multicast addresses
• IPv6 multicast addresses start with FF00::/8. After the first 8 bits there are 4 bits
which represent the flag fields that indicate the nature of specific multicast
addresses. Next 4 bits indicate the scope of the IPv6 network for which the
multicast traffic is intended. Routers use the scope field to determine whether
multicast traffic can be forwarded. The remaining 112 bits of the address make up
the multicast Group ID.