Saturday, November 18, 2006
IP Addressing

An IP (Internet Protocol) address is a unique identifier for a node or host connection on an IP network. An IP address is a 32 bit binary number usually represented as 4 decimal values, each representing 8 bits, in the range 0 to 255 (known as octets) separated by decimal points. This is known as "dotted decimal" notation.

Example: 140.179.220.200

It is sometimes useful to view the values in their binary form.

140     .179     .220     .200  10001100.10110011.11011100.11001000  

Every IP address consists of two parts, one identifying the network and one identifying the node. The Class of the address and the subnet mask determine which part belongs to the network address and which part belongs to the node address.

Address Classes

There are 5 different address classes. You can determine which class any IP address is in by examining the first 4 bits of the IP address.
  • Class A addresses begin with 0xxx, or 1 to 126 decimal.
  • Class B addresses begin with 10xx, or 128 to 191 decimal.
  • Class C addresses begin with 110x, or 192 to 223 decimal.
  • Class D addresses begin with 1110, or 224 to 239 decimal.
  • Class E addresses begin with 1111, or 240 to 254 decimal.

Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for internal testing on a local machine. [You can test this: you should always be able to ping 127.0.0.1, which points to yourself] Class D addresses are reserved for multicasting. Class E addresses are reserved for future use. They should not be used for host addresses.

Now we can see how the Class determines, by default, which part of the IP address belongs to the network (N) and which part belongs to the node (n).

  • Class A -- NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn
  • Class B -- NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn
  • Class C -- NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn

In the example, 140.179.220.200 is a Class B address so by default the Network part of the address (also known as the Network Address) is defined by the first two octets (140.179.x.x) and the node part is defined by the last 2 octets (x.x.220.200).

In order to specify the network address for a given IP address, the node section is set to all "0"s. In our example, 140.179.0.0 specifies the network address for 140.179.220.200. When the node section is set to all "1"s, it specifies a broadcast that is sent to all hosts on the network. 140.179.255.255 specifies the example broadcast address. Note that this is true regardless of the length of the node section.

kat bawah nie soalan yang En. Kamal bagi kt suma orang.. caranya ialah 2 pc dihubungkan dengan IP address yang dan try ping antara satu sama lain berdasarkan IP yg diberi. Hasilnya adalah seperti di bawah:

  IP A                                  IP B
_______________________________________
                            |
192.168.1.1         |    192.168.1.30    (Reply)     
                            |
192.168.1.32       |    192.168.1.33    (Invalid)     
                            |     
192.168.1.94       |    192.168.1.97     (Destination Host Unreachable)
                            |
192.168.1.97       |    192.168.1.127    (Invalid)
                            |
192.168.1.225     |    192.168.1.254    (Reply)


Posted at 10:48 pm by detomaso99

 

Leave a Comment:

Name


Homepage (optional)


Comments





Previous Entry Home Next Entry





detomaso99
March 2nd 1982  (Age 27)
Male
Sungai Petani
   

<< November 2006 >>
Sun Mon Tue Wed Thu Fri Sat
 01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30


If you want to be updated on this weblog Enter your email here:




rss feed