IP addresses: Networks and hosts, gateways



IP addresses: Networks and hosts 

An IP address is a 32bit number. It uniquely identifies a host (computer or other device, such as a printer or router) on a TCP/IP network. IP addresses are normally expressed in dotted periods, such as 192.1decimal format, with four numbers separated by 68.123.132. To understand how subnet masks are used to distinguish between hosts, networks, and subnetworks, examine an IP address in binary notation. 

For example, the dotted number 1100 decimal IP address 192.168.123.132 is (in binary notation) the 32bit 00000101000111101110000100. This number may be hard to make sense of, so divide it into four parts of eight binary digits. These 8bit sections are known as octets. The example IP address, then, becomes 11000000.10101000.01111011.10000100. 

This number only most uses, convert the binary address into dotted makes a little more sense, so for decimal format (192.168.123.132). The decimal numbers separated by periods are the octets converted from binary to decimal notation. For a TCP/IP wide area network (WAN) t o work efficiently as a collection of networks, the routers that pass packets of data between networks don't know the exact location of a host for which a packet of information is destined. Routers only know what network the host is a member of and use information stored in their route table to determine how to get the packet to the destination host's network. 

After the packet is delivered to the destination's network, the packet is delivered to the appropriate host. For this process to work, an IP address has two parts. The first part of an IP address is used as a network address, the last part as a host address. 

If you take the example 192.168.123.132 and divide it into these two parts, you get 192.168.123. Network .132 Host or 192.168.123.0 network address. 0.0.0.132 host address.

Subnet mask

The second item, which is required for TCP/IP to work, is the subnet mask. The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local subnet or on a remote network. In TCP/IP, the parts of the IP address that are used as the network and host addresses aren't fixed. Unless you have more information, the network and host addresses above can't be determined. 

This information is supplied in another 32bit number called a subnet mask. The subnet mask is 255.255.255.0 in this example. It isn't obvious what this number means unless you know 255 in binary no ration equals 11111111. So, the subnet mask is 11111111.11111111.11111111.00000000. Lining up the IP address and the subnet mask together, the network, and host portions of the address can be separated:

11000000.10101000.01111011.10000100 - IP address (192.168.123.132)

 11111111.11111111.11111111.00000000 - Subnet mask (255.255.255.0)

The first 24 bits (the number of ones in the subnet mask) are identified as the network address. The last 8 bits (the number of remaining zeros in the subnet mask) are identified as the host address. It gives you the following addresses:

 11000000.10101000.01111011.00000000 - Network address (192.168.123.0)

 00000000.00000000.00000000.10000100 - Host address (000.000.000.132) 

So now you know, for this example using a 255.255.255.0 subnet mask, that the network ID is 192.168.123.0, and the host address is 0.0.0.132. When a packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote network), and it has a destination address of 192.168.123.132, your computer will receive it from the network and process it. Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right. Some other common subnet masks are: 

Decimal

255.255.255.192

Binary 

1111111.11111111.1111111.11000000

Decimal

 255.255.255.224

Binary

 1111111.11111111.1111111.11100000   

Default gateways

 If a TCP/IP computer needs to communicate with a host on another network, it will usually communicate through a device called a router. In TCP/IP terms, a router that is specified on a host, which links the host's subnet to other networks, is called a default gateway. 

This section explains how TCP/IP determines whether or not to send packets to its default gateway to reach another computer or device on the network. When a host attempts to communicate with another device using TCP/IP, it performs a comparison process using the defined subnet mask and the destination IP address versus the subnet mask and its own IP address. 

The result of this comparison tells the computer whether the destination is a local host or a remote host. If the result of this process determines the destination to be a local host, then the computer will send the packet on the local subnet. If the result of the comparison determines the destination to be a remote host, then the computer will forward the packet to the default gateway defined in its TCP/IP properties. It's then the responsibility of the router to forward the packet to the correct subnet.

Network classes

  1.  Internet addresses are allocated by the These IP addresses are div InterNIC . the organization that administers the Internet. ided into classes. The most common of them are classes A, B, and C. Classes D and E exist, but aren't used by end users. Each of the address classes has a different default subnet mask. You can identify the class of an IP address by looking at its first oc tet. Following are the ranges of Class A, B, and C Internet addresses, each with an example address: 
  2. Class A networks use a default subnet mask of 255.0.0.0 and have 0 first octet. The address 10.52.36.11 is127 as their a class A address. Its first octet is 10, which is between 1 and 126, inclusive. 
  3. Class B networks use a default subnet mask of 255.255.0.0 and have 128191 as their first octet. The address 172.16.52.63 is a class B address. Its first octet is 172, which is between 128 and 191, inclusive. 
  4. Class C networks use a default subnet mask of 2 55.255.255.0 and have 192223 as their first octet. The address 192.168.123.132 is a class C address. Its first octet is 192, which is between 192 and 223, inclusive. 

MAC address 

In order to communicate or transfer the data from one computer to another computer, we need some address. In Computer Network various types of addresses are introduced; each works at a different layer. Media Ac cess Control Address is a physical address that works at the Data Link Layer. In this article, we will discuss about addressing DLL, which is MAC Address.

Media Access Control (MAC) Address –

MAC Addresses are unique 48-bits hardware number of a computer, which is embedded into a network card (known as a Network Interface Card) during the time of manufacturing. MAC Address is also known as the Physical Address of a network device. In IEEE 802 standard, Data Link Layer is divided into two sublayers –

  1. Logical Link Control(LLC) Sublayer
  2. Media Access Control(MAC) Sublayer

MAC address is used by the Media Access Control (MAC) sublayer of the Data-Link Layer. MAC Address is worldwide unique since millions of network devices exist and we need to uniquely identify each.

Format of MAC address 

MAC Address is a 12-digit hexadecimal number (6-Byte binary number), which is mostly represented by Colon-Hexadecimal notation. The First 6-digits (say 00:40:96) of MAC Address identifies the manufacturer, called OUI (Organizational Unique Identifier). IEEE Registration Authority Committee assigns these MAC prefixes to its registered vendors.

Here are some OUI of well-known manufacturers 

CC:46:D6 -Cisco

3C:5A:B4 -Google, Inc.

3C:D9:2B -Hewlett Packard

00:9A:CD -HUAWEI TECHNOLOGIES CO.,LTD

The rightmost six digits represent Network Interface Controller, which is assigned by the manufacturer.





Author Spotlight

Santosh Chapagain
Gmail: chapagainsantoshcs@gmail.com
Phone no: +977-9863512955

Post a Comment

1 Comments