ip addressing
DESCRIPTION
Learn about ip addressingTRANSCRIPT
1
IP Addressing
(IPv4 ADDRESSES)
2
IP AddressingUniversal Service Concept
Any computer can communicate with any other computer in the world.
Multiple independently owned and operated networks can be interconnected to provide universal service.
Internetworking
Four levels of addresses are used in an internet employing Four levels of addresses are used in an internet employing the TCP/IP protocols: the TCP/IP protocols: physicalphysical, , logicallogical, , portport, and , and specificspecific..
3
Network Identifiers Computers on the Internet are referred to as hosts. Each
host as at least three identifiers: Internet name for humans to use (i.e. garfield.ncat.edu) Internet address, a 32 bit binary number written in decimal
as four bytes (i.e.152.8.240.16) hardware address, such as an Ethernet address (i.e. 00-e0-
63-03-76-c0 for garfield)
4
Internet Names
Hierarchical starting from the right host.subnet.organization.type
Rightmost identifies the type or organization or country edu, com, mil, org, net us, ca, de, uk
5
Internet Architecture An internet consists of a set of networks interconnected by
routers. The internet scheme allows each organization to choose the number and type of networks, the number of routers to use to interconnect them, and the exact interconnection topology
The Internet is a virtual network. the communication system is an abstraction. It provides the illusion of a seamless network where:
Each computer is assigned an address. Any computer can send a packet to any other computer. Internet protocol software hides the details of the network.
Virtual Network
6
Internet Protocol
To achieve universal service among all computers on an internet, routers must agree to forward information from a source on one network to a destination on another.
A common protocol is needed on computers and routers to overcome the differing frame formats and addressing schemes used within each network.
Because each network uses an different and incompatible addressing system, an independent addressing system is needed.
7
IPv4 ADDRESSESIPv4 ADDRESSES
An An IPv4 addressIPv4 address is a is a 32-bit32-bit address that uniquely and address that uniquely and universally defines the connection of a device (for universally defines the connection of a device (for example, a computer or a router) to the Internet.example, a computer or a router) to the Internet.
The address space of IPv4 is 232 or 4,294,967,296.
8
IP Addresses To be able to identify a host on the internet, each host is
assigned an address, the IP address, or Internet Address. The standards for IP addresses are described in RFC 1166
-- Internet Numbers. When the host is attached to more than one network, it is
called multi-homed and it has one IP address for each network interface.
An IP Address is a 32 bit binary number. IP addresses are used by the IP protocol to uniquely
identify a host on the internet.
9
The Dotted Decimal Notation
IP addresses are usually represented in a dotted decimal form). IP address is made of four groups of decimal numbers between
0 - 255 separated by dots. Some of the numbers are special (like 0.0.0.0 or
255.255.255.255) and are used to designate the default gateway, a broadcast or multicast address, or some reserved numbers for the developers to play with
10
Parts of an IP Address
A part of the address designates the network numbers, and the remaining part designates the host number. So, we may say an IP address has the format NETWORK.HOST.
The network number part of the IP address is centrally administered by the Internet Network Information Centre (the InterNIC) and is unique throughout the Internet.
The IP address consists of a pair of numbers: IP address = <network number><host number>
11
Network Number Assignment
One point to note about the split of an IP address into two parts is that this split also splits the responsibility for selecting the IP address into two parts. The network number is assigned by the InterNIC, and the host number by the authority which controls the network.
The host number can be further subdivided: this division is controlled by the authority which owns the network, and not by the InterNIC.
12
Change the following IPv4 addresses from binary notation to dotted-decimal notation.
Example 19.1
SolutionWe replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation.
13
Change the following IPv4 addresses from dotted-decimal notation to binary notation.
Example 19.2
SolutionWe replace each decimal number with its binary equivalent (see Appendix B).
14
Find the error, if any, in the following IPv4 addresses.
Example 19.3
Solutiona. There must be no leading zero (045).b. There can be no more than four numbers.c. Each number needs to be less than or equal to 255.d. A mixture of binary notation and dotted-decimal notation is not allowed.
15
IP Address Classes
Traditionally, the conventions are that there are three main types of IP networks.
Class A Class B Class C There are also: Class D Class E
16
The first bits of the IP address specify how the rest of the address should be separated into its network and host part.
The terms network address and netID are sometimes used instead of network number, but the formal term, used in RFC 1166, is network number. Similarly, the terms host address and hostID are sometimes used instead of host number.
Assigned Classes of Internet Addresses
17
Address Ranges and Network Prefix Class A addresses use 7 bits for the network number giving 126 possible
networks (out of every group of network and host numbers, two have a special meaning). The remaining 24 bits are used for the host number, so each networks can have up to 224 - minus 2 (16,777,214) hosts.
Class B addresses use 14 bits for the network number, and 16 bits for the host number giving 16,382 Class B networks each with a maximum of 65534 hosts.
Class C only 254 hosts (all 0 and 1 combinations are not allowed). 21 bits for the network number and 8 for the host number giving 2,097,150 networks each with up to 254 hosts.
18
Other Address Classes
There is also a Class D address (starts with 1110) used for multicasting, which is used to address groups of hosts in a limited area.
Class E addresses are reserved for future use. Class E (1111) addresses are reserved for the nerds.
19
Special Addresses
IP Address Notation {<network>, <host>} {<network>, <subnet>, <host>} -1 value means a component consisting of all 1’s
{0,0} = This host on this network {0,<host>} = Specific host on this network {-1, -1} = Local broadcast
Broadcast to all hosts on this network {<network>, -1} = Directed broadcast
Broadcast to all hosts on <network>
20
Special Addresses Cont.
{<network>, <subnet>, -1} = Directed broadcast Broadcast to all hosts on <subnet> of <network>
{<network>, -1, -1} = Directed broadcast Broadcast to all hosts on all subnets of <network>
{<127>, <any>} = Loopback address Packet never leaves the NIC Should never appear on the network
21
Find the class of each address.a. 00000001 00001011 00001011 11101111b. 11000001 10000011 00011011 11111111c. 14.23.120.8d. 252.5.15.111
Example 19.4
Solutiona. The first bit is 0. This is a class A address.b. The first 2 bits are 1; the third bit is 0. This is a class C address.c. The first byte is 14; the class is A.d. The first byte is 252; the class is E.
22
In classful addressing, a large part of the available addresses were wasted.
Classful addressing, which is almost obsolete, is replaced with classless addressing.
Table 19.2 Default masks for classful addressing
23
Figure 19.3 shows a block of addresses, in both binary and dotted-decimal notation, granted to a small business that needs 16 addresses.
We can see that the restrictions are applied to this block. The addresses are contiguous. The number of addresses is a power of 2 (16 = 24), and the first address is divisible by 16. The first address, when converted to a decimal number, is 3,440,387,360, which when divided by 16 results in 215,024,210.
Example 19.5
24
Figure 19.3 A block of 16 addresses granted to a small organization
25
In IPv4 addressing, a block of addresses can be defined as x.y.z.t /n in which x.y.z.t defines one of the addresses and the /n defines the mask.
The first address in the block can be found by setting the rightmost 32 − n bits to 0s.
The last address in the block can be found by setting the rightmost 32 − n bits to 1s.
The number of addresses in the block can be found by using the formula 232−n.
The first address in a block is normally not assigned to any device; it is used as the network address that represents the organization to the rest of the world.
26
IP Address Space Shortage
It is clear that a class A address will only be assigned to networks with a huge number of hosts, and that class C addresses are suitable for networks with a small number of hosts. However, this means that medium-sized networks (those with more than 254 hosts or where there is an expectation that there may be more than 254 hosts in the future) must use Class B addresses. The number of small- to medium-sized networks has been growing very rapidly in the last few years and it was feared that, if this growth had been allowed to continue unabated, all of the available Class B network addresses would have been used by the mid-1990s. This is termed the IP Address Exhaustion problem. The problem and how it is being addressed are discussed in The IP Address Exhaustion Problem.
27
IPv4 - Problems
The decision to standardize on a 32 bit address space meant that there were only 232 (4,294,967,296) IPv4 addresses available.
During the early days of the Internet, the seemingly unlimited address space allowed IP addresses to be allocated based on requests rather than its actual need.
The class A, B, and C octet boundaries were easy to understand and implement, but they did not foster efficient allocation of addresses.
28
IPv4 - Problems
Class C, which supports 254 hosts, is too small. Class B, which supports 65534 hosts is too large. In the past, sites with several hundred hosts have been
assigned as single Class B address rather than couple of Class C addresses.
Unfortunately, this has resulted in a premature depletion of the Class B network address space.
29
Private Internets
Another approach to conservation of the IP address space is described in RFC 1597 - Address Allocation for Private Internets. Briefly, it relaxes the rule that IP addresses are globally unique by
reserving part of the address space for networks which are used exclusively within a single organization and which do not require IP connectivity to the Internet. There are three ranges of addresses which have been reserved by IANA for this purpose:
10.0.0.0 A single Class A network 172.16 through 172.31 16 contiguous Class B networks 192.168.0 through 192.168.255 256 contiguous Class C
networks
30
Private Internets Any organization may use any addresses in these ranges
without reference to any other organization. However because these addresses are not globally unique, they cannot be
referenced by hosts in another organization and they are not defined to any external routers.
Routers in networks not using private addresses, particularly those operated by Internet service providers, are expected to quietly discard all routing information regarding these addresses.
Routers in an organization using private addresses are expected to limit all references to private addresses to internal links; they should neither advertise routes to private addresses to external routers nor forward IP datagrams containing private addresses to via external routers.
31
Subnetting Subnetting – Why?
Internet routing tables were beginning to grow. Local administrators had to request another network
number from the Internet before a new network could be installed at their site.
In 1985, RFC 950 defined a standard procedure to support the subnetting, or division, of a single Class A, B, or C network number into smaller pieces.
32
Subnets and Subnet Masks
Allow arbitrary complexity of internetworked LANs within organization
Insulate overall internet from growth of network numbers and routing complexity
Site looks to rest of internet like single network Each LAN assigned subnet number Host portion of address partitioned into subnet number and
host number Local routers route within subnetted network Subnet mask indicates which bits are subnet number and
which are host number
33
Routing Using Subnets
34
Subnetting Subnetting attacked the
expanding routing table problem by ensuring that: the subnet structure of a
network is never visible outside of the organization's private network.
The route from the Internet to any subnet of a given IP address is the same, no matter which subnet the destination host is on. How?
35
Subnetting
Advantages The size of the global
Internet routing table does not grow
The local administrator has the flexibility to deploy additional subnets
Route flapping (i.e., the rapid changing of routes) within the private network does not affect the Internet routing table
36
Extended-Network-Prefix Internet routers use only the network-prefix of the destination
address to route traffic to a subnetted environment. Routers within the subnetted environment use the extended network-prefix to route traffic between the individual subnets.
The extended-network prefix is composed of the classful network-prefix and the subnet-number.
The extended-network-prefix has traditionally been identified by the subnet mask.
37
Extended-Network-Prefix and Subnet Mask if you have the /16 address of 130.5.0.0 and you want to use the
entire third octet to represent the subnet-number, you need to specify a subnet mask of 255.255.255.0.
The bits in the subnet mask and the Internet address have a one-to-one correspondence. The bits of the subnet mask are set to 1 if the system examining the
address should treat the corresponding bit in the IP address as part of the extended-network-prefix.
The bits in the mask are set to 0 if the system should treat the bit as part of the host-number.
38
Subnet Design Considerations
The deployment of an addressing plan requires careful thought on the part of the network administrator.
There are four key questions that must be answered before any design should be undertaken:
1. How many total subnets does the organization need today?
2. How many total subnets will the organization need in the future?
3. How many hosts are there on the organization's largest subnet today?
4. How many hosts will there be on the organization's largest subnet in the future?
39
Extended-Network-Prefix and Subnet Mask
The standards describing modern routing protocols often refer to the extended-networkprefix-length rather than the subnet mask.
The prefix length is equal to the number of contiguous one-bits in the traditional subnet mask. This means that specifying the
network address 130.5.5.25 with a subnet mask of 255.255.255.0 can also be expressed as 130.5.5.25/24.
40
Subnet Example #1
41
Subnet Example #1
42
Defining Host Addresses for Each Subnet According to Internet practices, the host-number field of an IP address
cannot contain all 0-bits or all 1-bits. The all-0s host-number identifies the base network (or subnetwork)
number, while the all-1s host-number represents the broadcast address for the network (or subnetwork).
43
Defining the Broadcast Address for Each Subnet
This is always the case - the broadcast address for Subnet #n is one less than the base address for Subnet #(n+1).
44
IP Configuration Parameters
IP Address Identifies the computer/host Either assigned/configured statically by the administrator or May be assigned dynamically through DHCP
Subnet Mask 32 bit integer, like the IP address Indicates the size of the subnet Used to generate Network Address IP address and Subnet Mask are logically ANDed to produce the
Network ID of the source and detination
Default Gateway The Way Out of the Subnet Router
45
IP Configuration Parameters
DNS Server On the Internet, the domain name system (DNS) stores and associates
many types of information with domain names; most importantly, it translates domain names (computer hostnames) to IP addresses.
46
How IP Operates at a Host
47
2 0 1 .2 2 2 .5 .1 2
2 0 1 .2 2 2 .5 .1 3
2 0 1 .2 2 2 .5 .1 4
2 0 1 .2 2 2 .5 .1 0
N E TWO R K 2 0 1 .2 2 2 .5 .0
2 0 1 .2 2 2 .5 .11
2 0 1 .2 2 2 .5 .1 9
2 0 1 .2 2 2 .5 .2 0
2 0 1 .2 2 2 .5 .2 1
2 0 1 .2 2 2 .5 .2 2
2 0 1 .2 2 2 .5 .1 8
R o u te rS u bn e two rk
2 0 1 .2 2 2 .5 .8
S u bn e two rk
2 0 1 .2 2 2 .5 .1 6E02 0 1 .2 2 2 .5 .9
E12 0 1 .2 2 2 .5 .1 7
R o u t in g Ta ble2 0 1 .2 2 2 .5 .8 E02 0 1 .2 2 2 .5 .1 6 E12 0 1 .2 2 2 .5 .2 4 E22 0 1 .2 2 2 .5 .3 2 E3