TCP IP Addressing Scheme

Document Sample
TCP IP Addressing Scheme Powered By Docstoc
					                          TCP /IP Addressing Scheme
The following is an overview of IP addressing.
•   Network (and internetwork) layer protocol.
•   Unique numeric address for every device (host) attached to an internetwork
    (PC, Server, Workstation, Router, Bridge, Printer etc…)
•   Address space administered by globally by InterNIC.
    Within Ireland - at IEDR.
•   Address is a 32 bit binary number Total address space 232 devices !
•   Part of the address identifies the network to which a device is attached. The rest of
    the address identifies the device (uniquely) on that network.
•   Address space divided into five classes. First three classes as follows :

Class A
•   The first eight bits of the 32-bit IP address identify the network. The remaining 24
    bits identify individual hosts on the network.
•   The first bit of the network portion of the address has a value of zero.
•   So (loosely speaking), there are 27 Class A networks, each of which can have up
    to 224 hosts attached (a lot of hosts !).
•   However, Network addresses 00000000 is not allowed and network address
    01111111 has been reserved for loopback testing, so there are in fact 27 - 2 (i.e
    126) Class A networks.
•   In addition, host addresses containing all 0's (reserved for the network address)
    and host addresses containing all 1's (reserved for IP broadcast) are not allowed,
    so every Class A network can have 224 - 2 devices attached to it (16,777,214).

                 0           7 8                             31
Class A :        0 Net ID                  Host ID


Class B
•   The first sixteen bits of the 32-bit IP address identify the network. The remaining
    16 bits identify individual hosts on the network.
•   The first two bits of the network portion of the address have values of one and
    zero respectively. Thus, there are 14 remaining configurable bits in the network
    portion of the address.
•   So, there are 214 Class B networks, each of which can have up to 216 - 2 hosts
    attached to it (As previously noted above, host addresses containing all 0's and
    host addresses containing all 1's are not allowed.)

                0 1                   15 16                    31
Class B :       1 0        Net ID                Host ID
Class C

•   The first twenty-four bits of the 32-bit IP address identify the network. The
    remaining 8 bits identify individual hosts on the network.
•   The first three bits of the network portion of the address have values of one, one
    and zero respectively.
    Thus, there are 21 remaining configurable bits in the network portion of the
    address.
•   So, there are 221 Class C networks, each of which can have up to 28 - 2 hosts
    attached. (About 2 million networks with 254 hosts on each)
    Again, as previously noted above, host addresses containing all 0's and host
    addresses containing all 1's are not allowed !

               0 1 2                                23 24             31
Class C :      1 1 0              Net ID                    Host ID



Classes D and E

•   We are not concerned with these for now.
    Briefly, Class D is reserved for IP multicast, and Class E is reserved for testing.


Note :

•   One half of total IP address space is allocated to Class A, and there are only 126
    Class A networks !
    Essentially, 126 organisations in the world can effectively own (control) half of all
    devices attached to the Global Internet.


                            IP Address Space = 232

                          Bit 0 = 0          Bit 0 = 1




                                             Class B
                                                                  10……...
                            Class A
                                                 Class C          11……...
                                             The
                                             Rest


                          Bit 0 = 0           Bit 0 = 1
Dotted Decimal Notation

•   To aid readability (32 bit numbers are hard to read, let alone remember !), a
    notation has been devised as follows :
    - Take the 32 bit IP address and divide it into four 8-bit chunks.
    - Convert each 8-bit chunk into a decimal number
    - Separate each of the four decimal numbers that result with a dot.

•   Example

    The following is a 32 bit IP address : 11001100001011011001110101001111

    Note it is a Class C IP address as the first 3 bits are 110

    Step 1 :    Divide the number into 4 8-bit chunks

                11001100         00101101          10011101          01001111

    Step 2 :    Convert each 8-bit chunk into a decimal number

                204              45                157               79

    Step 2 :    Convert each 8-bit chunk into a decimal number

                204 . 45 . 157 . 79

    So, IP Address 11001100001011011001110101001111 can be notated as
    204 . 45 . 157 . 79


Summary of Addressing Rules :

                       No. of Net Bits                 No. of Host Bits       No. of Networks   Hosts Per Network

Class A : 8 (1st bit = 0 , all 0's or 1's not valid)         24           |        126             16 million

Class B :        16 (1st two bits = 1 and 0)                 16           |       16, 382               64K

Class C :       24 (1st three bits = 1,1 and 0)               8           |     2 million               254

                                                   Host bits can't be
                                                   all 0's or all 1's

Range of Valid IP Addresses in dotted Decimal Notation :
Class A :       001 . 000 . 000 . 001              126 . 255 . 255 . 254              Bold typeface
                                                                                      indicates
Class B :       128 . 000 . 000 . 001              191 . 255 . 255 . 254
                                                                                      network part of
Class C :       192 . 000 . 000 . 001              223 . 255 . 255 . 254              address.