Professional Documents
Culture Documents
IP Addressing
Virtual Networks
Internetworking software builds a single, seamless virtual network out of multiple physical networks
Universal addressing scheme Universal service
All details of physical networks hidden from users and application programs
IP Protocol Objectives
Connect physical networks of every possible type (even future network technologies not yet developed ) Scale to a WAN connecting many hosts
To succeed, IP has to make minimal assumptions about the physical networks it connects
Internet Addresses
Each interface on the internet must have a unique Internet Address, or IP address. An IP address is a 32 bit number. Usually written using Dotted Decimal Notation Example: 2365328673 as an unsigned integer is 1000 1100 1111 1100 0000 1101 0010 0001 in binary 8C FC 0D 21 in hex 140.252.13.33 in dotted decimal
Details of IP Addresses
Assigned per interface, not per host, hence... Routers always have multiple IP addresses. Three kinds of IP Addresses unicast: destined for a single host broadcast: destined for all hosts on a local net (not all hosts on the internet) multicast: destined for all hosts in a specific multicast group. (We will concentrate for now on unicast addresses)
Classes of IP Addresses
Class
7 bits 24 bits
A 0 B 10 C 1 10
netid
14 bits
hostid
16 bits
netid
21 bits
hostid
8 bits
netid
28 bits
hostid
27 bits
D 1110 E 1 1110
A: 0.0.0.0 to 127.255.255.255 B: 128.0.0.0 to 191.255.255.255 C: 192.0.0.0 to 239.255.255.255
Centre
Details of IP Addresses
Assigned by a central authority the Network Information Center, or InterNIC (rs.internic.net) assigns network ids for the entire internet. Local system administrator gets a network id from the InterNIC, then assigned Ids to individual interfaces on each host. The hostid portion may be broken down by a local system administrator into subnet and host. Special case addresses:
Used during bootstrap Identifies a network broadcast on specified net broadcast on local net testing
DNS
gloin.cis.udel.edu 128.175.201.5
The network interface and hosts are known to the protocols by their IP addresses, e.g. 128.175.201.5 Humans work better with hostnames, such as gloin.cis.udel.edu or brahms.udel.edu Domain Name System (DNS): a distributed database for mapping between hostnames and IP addresses. Details not in this discussion; it suffices that there is a library function we can call to translate. gethostbyname() gethostbyaddr() Most applications accept either one.
ADVANTAGE PRO Chennais Premier Networking Training Centre
Routers
The solution:
short term: Subnetting Classless Interdomain Routing (CIDR) addresses routing table growth problem long term: IPv6 (128-bit addresses)
ADVANTAGE PRO Chennais Premier Networking Training Centre
Subnetting
IP addressing has only two levels of hierarchy Subnetting - Add another level to address/routing hierarchy: subnetworks
Subnetting
3 levels of hierarchy: Netid, subnetid, hostid Subnets are visible only within the local site Masking: process that extracts address of physical network from an IP address. Subnet masks define variable partition of host part of Class A and B addresses
Class B Address 00000000 111111111111111111111111 Subnet Mask (255.255.255.0) Network Number SubnetID HostID Subnetted Address PRO Chennais Premier Networking Training ADVANTAGE
Centre
Masking
To find network or subnetwork address, apply (perform AND) the mask to the IP address
Straight Method In the straight method, we use binary notation for both the address and the mask and then apply the AND operation to find the subnet address.
ADVANTAGE PRO Chennais Premier Networking Training Centre
Example 1
What is the subnetwork address if the destination address is 200.45.34.56 and the subnet mask is 255.255.240.0?
Solution
11001000 00101101 00100010 00111000 11111111 11111111 11110000 00000000 11001000 00101101 00100000 00000000 The subnetwork address is 200.45.32.0.
ADVANTAGE PRO Chennais Premier Networking Training Centre
Short-Cut Method ** If the byte in the mask is 255, copy the byte in the address. ** If the byte in the mask is 0, replace the byte in the address with 0. ** If the byte in the mask is neither 255 nor 0, we write the mask and the address in binary and apply the AND operation.
ADVANTAGE PRO Chennais Premier Networking Training Centre
Example 2
What is the subnetwork address if the destination address is 19.30.80.5 and the mask is 255.255.192.0?
Solution
Example 2
Figure 5-6
Figure 5-7
Example 3
A company is granted the site address 201.70.64.0 (class C). The company needs six subnets. Design the subnets.
Solution
in
the
default
Solution (Continued)
The company needs six subnets. This number 6 is not a power of 2. The next number that is a power of 2 is 8 (23). We need 3 more 1s in the subnet mask. The total number of 1s in the subnet mask is 27 (24 + 3). The total number of 0s is 5 (32 27). The mask is
ADVANTAGE PRO Chennais Premier Networking Training Centre
Solution (Continued)
11111111 11111111 11111111 11100000 or 255.255.255.224 The number of subnets is 8. The number of addresses in each subnet is 25 (5 is the number of 0s) or 32.
ADVANTAGE PRO Chennais Premier Networking Training Centre
Example 3
Example 4
A company is granted the site address 181.56.0.0 (class B). The company needs 1000 subnets. Design the subnets.
Solution
Solution (Continued)
The company needs 1000 subnets. This number is not a power of 2. The next number that is a power of 2 is 1024 (210 ). We need 10 more 1s in the subnet mask. The total number of 1s in the subnet mask is 26 (16 + 10). The total number of 0s is 6 (32 26).
ADVANTAGE PRO Chennais Premier Networking Training Centre
Solution (Continued)
The mask is 11111111 11111111 11111111 11000000 or 255.255.255.192. The number of subnets is 1024. The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.
ADVANTAGE PRO Chennais Premier Networking Training Centre
Example 4