Each computer on the Internet having a unique IP address is known as a HOST. IP address is a logical address and used for routing packets over an IP network.
IP addresses are written using decimal numbers separated by decimal points. This is called dotted decimal notation of expressing IP addresses.
The different classes of IP addresses is as below:
|Class||Format||Leading Bit Pattern||Network address Range||Maximum networks||Maximum host/nodes|
|A||N.H.H.H||0||188.8.131.52 to 184.108.40.206||127||16,777,214|
|B||N.N.H.H||10||220.127.116.11 to 18.104.22.168||16,384||65,534|
|C||N.N.N.H||110||22.214.171.124 to 126.96.36.199||20,971,52||254|
|D||N.A.||N.A.||188.8.131.52 to 184.108.40.206||N.A.||N.A.|
The following are the advantages of subnetting:
Classful addressing: RIPv1, IGRP are examples of classful routing protocols. It is important to know that classful routing protocols do not exchange subnet information during routing information exchanges. The summarization is always done automatically at major network boundaries.
Examples on subnetting:
Example 1:You are designing an IP addressing scheme for a corporate network. The subnet uses 220.127.116.11/24. What are the valid host addresses available, excluding subnet zero and bradcast address.
Solution: An address where all host part bits are 0 refers to the (this) network, and an address where all bits of the host part are 1 is called a broadcast address. This refers to all hosts on the specified network simultaneously. Thus, 18.104.22.168 is not a valid host address, but refers to all hosts on network 22.214.171.124.
The valid host addresses - 126.96.36.199 through 188.8.131.52
Example 2: What is the directed broadcast address for an IP network 184.108.40.206 with default subnet mask?
Solution: This is a Class C network with default subnet mask, which is 255.255.255.0. The directed broadcast should reach all Hosts on the intended network (or subnet, if subnetted). Therefore, by putting all 1s for the host potion of the IP address, we get 220.127.116.11.
Example 3: You have three physical LAN segments, each with 10 Hosts. All three segments are connected to three different interfaces on your router. What is the minimum number of subnets required?
Solution: Since there are three segments, you need to have three subnets.
Example 4: You are asked to evolve a TCP/IP addressing scheme for your Organization. How many network numbers (subnet number) must you allow when you design the network for your organization? (Choose 2 best answers)
Solution: You need to assign a different network number for each subnet. Also, you need to set aside one network number for each WAN connection.
Example 5: You are given an IP address 18.104.22.168. What is the default subnet mask?
Solution: The IP address 22.214.171.124 belongs to Class B network.
The default subnet mask for different classes of IP networks are as given below:
Class A network: 255.0.0.0
Class B network 255.255.0.0
Class C network 255.255.255.0
Example 6: You have a router with two ports, each having distinct IP address. Both ports are connected to two distinct subnets (segments). The first subnet has 12 clients and a server. The second subnet has 14 clients and a server. What is the total number of IP addresses required?
Solution: The number of distinct IP's required are
1) One each per client computer
2) One each per server computer
3) One each per router interface.
There are 2 servers + 26 clients + 2 router interfaces. Therefore, the total number of IP addresses required are 30. Loopback address is an IP number (127.0.0.1) that is designated for the software loopback interface of a computer. The loopback interface has no hardware associated with it, and is a logical interface only.
Example 7: What is the decimal equivalent of the binary number 1110 0011?
Solution: Calculate the decimal equivalent based on the above predefined values.
Given binary number is : 1110 0011
1*(2^7) + 1*(2^6) + 1*(2^5) + 0*(2^4) + 0*(2^3) + 0*(2^2) + 1*(2^1) + 1*(2^0) = 1*128 + 1*64 + 1*32 + 0*16 + 0*8 + 0*4 + 1*2 + 1*1
therefore decimal equivalent of 1110 0011 is 227
Note: Binary number is the sum of the digits multiplied with 2n.
Example 8: What is the binary equivalent of decimal number 52?
1. Is 52 greater than or equal to 128? => No => Put a 0 in the 128 column.
2. Is 52 greater than or equal to 64? => No => Put a 0 in the 64 column.
3. Is 52 greater than or equal to 32? => Yes => Put a 1 in the 32 column, and subtract 32 from 52. => 52 - 32 = 20.
4. Is 20 greater than or equal to 16? => Yes => Put a 1 in the 16 column, and subtract 16 from 20. => 20 - 16 = 4.
5. Is 4 greater than or equal to 8? => No => Put a 0 in the 8 column.
6. Is 4 greater than or equal to 4? => No => Put a 1 in the 4 column, and subtract 4 from 4. =>4-4=0
7. Is 0 greater than or equal to 2? => No => Put a 0 in the 2 column.
8. Is 0 greater than or equal to 1? => No => Put a 0 in the 1 column.
Example 9: What is the decimal equivalent of hexadecimal F8CE?
Solution: Hexadecimal numbers are numbers with the base 16. It uses 16 different digits to represent the numbers. It is denoted as h16, where h is a hexadecimal number. It may be combination and alphabets and numbers. It uses numbers from 0 to 9 and alphabets A to F(11-15). Hexadecimal number is the sum of the digits multiplied with 16n. The table below shows conversion values from binary, octal, decimal, and hexadecimal.
F-15 , C-12, E-14
F8CE= 15x163+8x162+12x161+14x160 = 61440+2048+192+14= 63694
Classless routing protocols: RIPv2, EIGRP, OSPF, BGPv4, and IS-IS are examples of classless routing protocols. In classless routing protocols, subnet information is exchanged during routing updates. This results in more efficient utilization of IP addresses. The summarization in classless networks is manually controlled.
VLSM: RIPv1 and IGRP are true distance-vector routing protocols and can't do much, really-except build and maintain routing tables and use a lot of bandwidth. RIPv2,OSPF, IS-IS, EIGRP, and BGP. These routing protocols support VLSM because the routing protocols send the subnet mask as part of any routing update. EIGRP, and OSPF use Autonomous System (AS) numbers.
IPv6 Addressing: IANA (Internet Assigned Numbers Authority) is the organization under the Internet Architecture Board (IAB) of the Internet Society that oversees the allocation of Internet Protocol addresses to Internet service providers (ISPs). ICANN (a non governmental organization) has now assumed responsibility for the tasks formerly performed by IANA. ISPs in turn allot IP addresses to small companies, and businesses.
The IPv6 protocol defines a set of headers, including the basic IPv6 header and the IPv6 extension headers. The following figure shows the fields that appear in the IPv6 header and the order in which the fields appear. IPv4 addresses use the last 32 bits of the IPv6 address.
IPv6 packet is 128 bits long. It will have basic packet header, and optional extension header. The next header field within an extension header points to the next header in the chain.
IPv6 header contains the following things:
The extension header may include the following:
IPv6 hosts supports the following:
3 types of addresses are supported in IPv6:
1. Unicast: one-to-one with various scopes (i.e.: Global, Link, Unique Local, Compatible)
2. Anycast: one-to-nearest (allocated from unicast)
3. Multicast: one-to-many
Broadcast has disappeared as a term, but is considered one form of multicast.
In an IPv6 network, a host can auto-configure its IP address without the help of a DHCP server.
IPv6 to ipv4 transport:
4to6 refers to tunneling of IPv4 in IPv6: It is an Internet inter-operation mechanism allowing Internet Protocol version 4 (IPv4) to be used in an IPv6 only network. 4in6 uses tunneling to encapsulate IPv4 traffic over configured IPv6 tunnels as defined in RFC 2473
6to4 tunneling: It is an IPv6 transition mechanism described in RFC 3056. It enables encapsulation of IPv6 packets into IPv4 for transport across an IPv4 network. 6to4 tunneling allows for automatic IPv6-to-IPv4 address translation, and treats the underlying IPv4 network as one big non-broadcast multi-access (NBMA) network, rather than a collection of independent point-to-point links. A 6-to-4 tunnel works similarly to a manual tunnel, except that the tunnel is set up automatically. 6-to-4 tunnels use IPv6 addresses that concatenate 2002::/16 with the 32-bit IPv4 address of the edge router, creating a 48-bit prefix.
Dynamic Host Configuration Protocol version 6 (DHCP6): is a network protocol for configuring Internet Protocol version 6 (IPv6) hosts with IP addresses, IP prefixes and other configuration data required to operate in an IPv6 network.
Miredo is a Teredo tunneling client designed to allow full IPv6 connectivity to computer systems which are on the IPv4-based Internet but which have no direct native connection to an IPv6 network.
Example: The MAC address of a node is 00-0F-66-41-29-C3.
The appropriately formed IPv6 interface id using EUI-64 format
The EUI-64 format interface ID is derived from the 48-bit MAC address by inserting the hex FFFE between the organizationally unique identifier (OUI) field (the upper three bytes) and the vendor code (the lower three bytes) of the MAC address. The seventh bit in the first byte of the resulting interface ID, corresponding to the Universal/Local (U/L) bit, is set to binary 1.
IPv6 Multicast Addresses used by different routing protocols:
Multicast Address Node Local:
The following are true about IPv6 address format:
1. The total length of IPv6 address is 128 bits
2. The first 48 bits of the IPv6 global unicast addresses are used for global routing at the Internet Service Provider (ISP) level.
3. 16 bits (after the first 48-bit global unicast address) are used for subnetting, allowing organizations to subdivide their network
4. Multicast addresses are in the range FF00::/8.
Unicast 6to4 addresses (2002::/16): IPv6 uses 6to4 addresses to communicate between two IPv6/IPv4 nodes over the IPv4 Internet. A 6to4 address combines the prefix 2002::/16 with the 32 bits of the public IPv4 address of the node to create a 48-bit prefix - 2002:WWXX:YYZZ::/48, where WWXX:YYZZ is the colon-hexadecimal representation of w.x.y.z, a public IPv4 address. Therefore, the IPv4 address 126.96.36.199 translates into a 6to4 address prefix of 2002:9D3C:5B7B::/48.
Unicast site-local addresses: IPv6 unicast site-local addresses are similar to IPv4 private addresses. The scope of a site-local address is the internetwork of an organization's site. (You can use both global addresses and site-local addresses in your network.) The prefix for site-local addresses is FEC0::/48.
Unicast unspecified address: The IPv6 unicast unspecified address is equivalent to the IPv4 unspecified address of 0.0.0.0. The IPv6 unspecified address is 0:0:0:0:0:0:0:0:, or a double colon (::).
Unicast loopback address: The IPv6 unicast loopback address is equivalent to the IPv4 loopback address, 127.0.0.1. The IPv6 loopback address is 0:0:0:0:0:0:0:1, or ::1
Multicast addresses from FF01:: through FF0F:: are reserved, well-known addresses. To identify all nodes for the node-local and link-local scopes, the following multicast addresses are defined:
FF01::1 (node-local scope all-nodes address)
FF02::1 (link-local scope all-nodes address)
To identify all routers for the node-local, link-local, and site-local scopes, the following multicast addresses are defined:
FF01::2 (node-local scope all-routers address)
FF02::2 (link-local scope all-routers address)
FF05::2 (site-local scope all-routers address)
DHCP: DHCP is a successor to BOOT/P protocol. DHCP allows us to dynamically assign IP addresses, subnet mask,default gateway to hosts on a network. In other words, DHCP allows us to IP configure the client computers on a network dynamically at boot time. You have to assign the IP address for your DHCP server statically. A DHCP server can't assign an IP address to itself. Similarly, some other servers which need static assignment of IP addresses are your DNS server, WINS server, and Default gateway. You must assign the IP address of the DHCP Server manually.
Multicast Domain Name Service (MDNS) is an example of a technology that can resolve computer names to their corresponding IP address on a local subnet, without the aid of a DNS server or a WINS server.
BootP and DHCP are dynamic approaches to assigning routable IP addresses to networked devices.
APIPA: Short for Automatic Private IP Addressing is a feature that allows DHCP clients to automatically self-configure an IP address and subnet mask when a DHCP server isn't available. When a DHCP client boots up, it first looks for a DHCP server in order to obtain an IP address and subnet mask. If the client is unable to find the information, it uses APIPA to automatically configure itself. The IP address range is 169.254.0.1 through 169.254.255.254. The client also configures itself with a default class B subnet mask of 255.255.0.0. A link-local IP address is a non-routable IP address usable only on a local subnet. APIPA is an example of a technology that assigns link-local IP addresses.
Windows 98 and later versions have an Automatic Private IP Addressing (APIPA) feature that will automatically assign an Internet Protocol address to a computer on which it installed. This occurs when the TCP/IP protocol set to obtain it's IP address automatically from a Dynamic Host Configuration Protocol server, and when there is no DHCP server present or not available.
The Internet Assigned Numbers Authority (IANA) has reserved private IP addresses in the range of 169.254.0.0 -169.254.255.255 for Automatic Private IP Addressing
After the network adapter has been assigned an automatic IP address, a computer can communicate with any other computers on the local network that are also configured by APIPA or have static IP address manually set to the 169.254.x.y (where x.y is the client's unique identifier) address range with a subnet mask of 255.255.0.0.
Microsoft windows 7 defaults to APIPA if a client is configured to automatically obtain IP address information and that client fails to obtain IP address information from a DHCP server.
RIPng, OSPFv3, and EIGRPv6 support IPv6 addressing. Prior versions of OSPF such as OSPFv1 and OSPFv2 does not support IPv6. Similarly, RIP, RIPv2, EIGRP (prior to EIGHTv6) does not support IPv6 addressing. RIPng for IPv6 offers the same benefits as RIP-2 and IPv6 OSPF is an IETF proposed standard.