TCP/IP Subnetting

Index Home Contact Local Map

 

Home
File Extensions
HTML Tags
Iconoid Software
Journals
Piracy Laws
Maping Software
Plagiarism
TCP/IP Subnetting
Virus Extensions
Web Buttons

 

 

 

TCP

Transmission Control Protocol

 

bullet

      TCP is a connection oriented transport protocol that  sends data as unstructured streamed of bytes. By using sequence numbers and acknowledgment messages, TCP can provide a sending node with delivery information about packets transmitted to a destination node. When data has been lost in transit from source to destination, TCP can retransmit the data either until a time-out condition is reached or until successful delivery has been achieved. TCP can also recognize duplicate messages and will discard them appropriately.

bullet

      If the sending computer is transmitting too fast for the receiving computer, TCP can employ flow control mechanisms to slow data transfer. TCP can also communicate delivery information to the upper layer protocols and applications that it supports.

IP Internet Protocol

 

bullet

     IP is the primary Layer 3 Protocol in the Internet suite.  In addition to inter-network routing, IP provides error reporting, fragmentation, and reassemble of information units called data grams for transmission over networks with different maximum data unit sizes. IP represents the heart of the Internet protocol suite.  Every host computer must have a unique IP number for Internet delivery, just like every phone must have a unique phone number to receive a call.

 

bullet

    IP addresses are globally unique, 32 bit numbers assigned by the Network Information Center.  Globally unique addresses permit IP networks anywhere in the world to communicate with each other.  An IP address is divided into three parts.  The first part designates the network address, the second part designates the subnet address, and the third part designates the host address.

 

bullet

    Each IP number is associated with a Class that is designated by the first part of the number.

 

Routing in IP Environments

 

bullet

   An "internet" is a group of interconnected networks within a company, while the Internet, is the collection of networks that permits communication between organizations around the world. 

 

bullet

  Router's within the Internet are organized hierarchically. Some router's are used to move information through one particular group of networks under the same administrative authority and control.  Router's used for information exchange within autonomous systems are called interior router's, and they use a variety of interior gateway protocols (IGPs) to accomplish this end. Router's that move information between autonomous systems are called exterior router's; they use the Exterior Gateway Protocol (EGP) or Border Gateway Protocol (BGP).

 

bullet

  Routing protocols used with IP are dynamic in nature.  Dynamic routing requires the software in the routing devices to calculate routes. Dynamic routing algorithms adapt to changes in the network and automatically select the best routes.  In contrast with dynamic routing, static routing calls for routes to be established by the network administrator. Static routes do not change until the network administrator changes them.

 

Four Classes of IP addresses

Class A

Networks begin with 0 and end with 126.  All addresses within this range are considered Class.  (Network.Host.Host.Host)
It uses the remaining seven bits to designate a specific Class A  network.

Class B

Networks begin with 128 (10) and ends with 191, Class B uses 14 bits to designate individual network ID's.   Class B Address are very hard to obtain today, as most have already been given out.

Class C

Networks begin with 192 (110) and ends with 223, Class C uses 21 bits to designate individual network ID's. This  allows for 2 million possible Class C networks. Unfortunately, each of these networks can only have a few hosts.  With only 8 of the 32 address bits left for host IDs, each Class C network can only have 256 possible hosts.

Class D & E

Networks begin with 224 and end with 254, Class D is Reserved multicasting and Class E is Reserved for Experimental Purposes.

 

How to sub-net an IP Address:

IP Addressing Basics:

bullet

32  Bits in an IP address

bullet

4    Octets in an IP address

bullet

4    Bytes make up an IP address

bullet

8    Bits per each octet

 

Class

    Start

       End

# of Networks

    # of Hosts

Max # of Bits Borrowed

A

0

126

126

16,777,214

24

B

128

191

16,384 

65,534

14

C

192

223

2,097,152

254

6

D E

224, 240

239, 254

N/A 

N/A

N/A

 

Binary Conversion Place Values

Place Value

7

6

5

4

3

2

1

0

2^ by Place Value

2^7

  2^6

2^5

2^4

2^3

2^2

2^1

2^0

Decimal Value

128

64

32

16

  8

4

2

1

 

All possible Subnets and Hosts in a Class C Address

# of Bits Borrowed from the IP Address

1

2

3

4

5

6

Total Number of Subnets  * 2^n

2

4

8

16

32

64

Total Available Number of Subnets **2^n-2

 0

2

6

14

30

62

Total Number of Host Addresses  ***2^n

128

64

32

16

8

4

Total Number of Available Hosts  ****2^n-2 

126

62

30

14

6

2

  • *Total number of Subnets is calculated by raising 2 to the power of the number of bits borrowed (n)

  • **Total number of Available Subnets is calculated the same as above except you subtract 2 for the unusable addresses of all ones and all zeros

  • ***Total number of Host Address is calculated by raising 2 the power of the number of bits remaining in the IP Address after you have borrowed some to make sub nets

  • ****Total Available number of Hosts Addresses is calculated the same as above except you subtract 2 for the unusable hosts

 

Sub Net Masking

A Subnet mask is a binary number designed to separate the Network ID from the Host ID on an IP address.

 

 

Why Subnet?

Organizing departments, use of different physical media (like Ethernet, FDDI, and WAN's), and conserve on address space, security, and reducing network traffic.

 

  • 127 IP Address is RESERVED FOR LOOP BACK PURPOSES

  • CLASS D IS RESERVED FOR MULTICASTING

  • CLASS E IS RESERVED FOR EXPERIMENTAL PURPOSES

 

 

Rules for Sub-netting

 

  • Subnet mask must be equal to or greater than default subnet

  • You must always start at the MSB (Most Significant Bit)

  • Cannot use all ones or zeros for node addresses

  • You cannot use a Private IP address to access the Internet

  • Sub netting reduces the number of possible nodes on a network

  • Without sub netting, a Class C Address supports 254 nodes

  •  

 

Example

I will borrow 3 bits from the last octet of a Class C Address, leaving 5 bits, of which 3 bits are used for host address and 2 bits for the Network ID.

  • The number of possible sub net works is 

  • 2^3   =  8 Total Subnets

  • 8 – 2 =  6 Total Available Subnets. 

Subnet numbers that are all one's and zero's can not be used, they are reserved for broadcasting and specifying the network address.

 

How To Make Subnet Numbers from an IP Address

 

First

Convert the IP Address to a Binary Number so you can borrow the bits from the last octet.  The links below can be used in this conversion process.

When Borrowing 3 bits from the subnet host portion of the last octet, always borrow from the Most Significant Bit (MSB) which is the far left side of the last octet or host field (00000000)

 

Second

Place the Binary Representation of N in the first three bits of the last octet after the dot and before the remaining binary numbers.

  •  Last Octet in Binary format:  

     

    • NNN00000 where NNN represents the  bits you borrowed to make the new sub nets and  the 00000 remain the same

 

Third

Create Sub Networks using the number of bits you borrowed, by writing a numeric list of the number of subnets you plan to create and write the binary number for the numeric subnet number only using the binary bits you borrowed.

 

Quick Example:  If I borrow 2 bits from a class C address, then I can make my subnet list using 0-3 which represents the number of new subnets I will have. 

 Subnet

     0

     1

     2

     3

Now I have to convert these four numbers in to binary format only using 2 bits

Subnet            Binary Format

     0                        00

     1                        01

     2                        10

     3                        11

Now add back the remaining 6 bits of the binary number you borrowed from to create the new binary number.

Subnet       Binary Format   New Binary Number

     0                    00                00000000

     1                    01                01000000

     2                    10                10000000

     3                    11                11000000

Now convert the New Binary Number to a decimal

 

New Binary Number     New Decimal Number

       00000000                               0

       01000000                              64

       10000000                             128

       11000000                             192

 

The Host Addresses are the numbers that fall between two subnet numbers, 64-128 and 128-192

 

Class C Address

Creating New Sub Network ID's

IP Address:   193.1.1.0
Binary:         1000001.00000001.00000001.00000000

Subnet # 

Create a Binary IP Address 

 Covert to Decimal 

0

11000001.00000001.00000001.00000000 

193.1.1.0

1

11000001.00000001.00000001.00100000 

193.1.1.32

2

11000001.00000001.00000001.01000000 

193.1.1.64

3

11000001.00000001.00000001.01100000 

193.1.1.96

4

11000001.00000001.00000001.10000000 

193.1.1.128

5

11000001.00000001.00000001.10100000 

193.1.1.160

6

11000001.00000001.00000001.11000000 

193.1.1.192

7

11000001.00000001.00000001.11100000 

193.1.1.224

 

More Rules:

  • You cannot use the all ones or the all zeros sub net numbers

  • All ones are used for specifying all hosts on network or broadcasting

  • All zeros are used for specifying the local network

  • Subtract 2 from the total number of subnets to find total usable subnets

 

HOST ADDRESSING:
 

Borrowing 3 bits from the host portion of the IP address, leaves 5 bits to create hosts. The number of bits not borrowed (or unmasked bits) when raising 2 to a power:

 

    Example:  23  - 2 = 30 

  • There are 30 Host addresses available per subnet work

  • Each subnet can have Hosts assigned to any address between the Subnet Address and the Broadcast Address

  • There are 32 Values between each subnet in a Class C Address

 

Range

Valid

#'s

Network Address

Range

Valid

#'s

Network Address

0-31

Not Valid

 

129-158

129-158

128

32-63

33-63

32

160-190

161-190

160

64-94

65-94

64

192-223

193-222

192

96-127

97-126

96

224-255

Not Valid

 

 

HOW TO FIND THE NETWORK NUMBER USING ANDING:

 

bullet

 

Applying a subnet mask to an IP Address allows you to identify the network and the host parts of the address

 

bullet

 

This is accomplished by performing a bit wise logical AND operation between the IP address and the subnet mask.

 

bullet

 

The Logical AND operation compares 2 bits, (one from IP address and one from subnet mask), if they are both “1”, then the answer will be “1”, other wise the result is zero.

 

bullet

Example:          0 0 0
            
         1 0 1
             
        0 0 1

 

Address

Dotted Decimal

Notation

Binary Representation

IP Address

192.168.16.42

11000000.10101000.00010000.00101010

Subnet Mask

255.255.255.0

11111111.11111111.11111111.00000000

Network ID

192.168.16.0

11000000.10101000.00010000.00000000

 

By ANDing together the senders IP address and the subnet mask, and  then ANDing together the destination IP address with the senders subnet mask, and comparing the two results, you can tell if the destination is local (in same network) or remote (sent to a default gateway)

 

 

How to determine which host ID belongs to which IP Address:

 

  • Step Value found in the number between subnets

  • The first valid address begins at the value of the last masked bit and the step value is the value of the first valid address. 

     

    • If the address were, 200.107.31.0 and we borrowed two bits from the last octet, then the first subnet would be 200.107.31.64, and 64 would be the step value, (or the value of the last masked bit)

 

  • The last valid IP address is the value of the subnet mask –1

    • Where the subnet mask is 200.107.31.192

    • The value of the subnet mask –1 would be 200.107.31.191

  • Step Value is 64

    • Ranges for Subnet 1  200.107.31.64 – 200.107.31.127

             (64 host Ids)

    • Ranges for Subnet 2  200.107.31.128 – 200.107.31.191

             (64 host Ids)

 

Private Addresses:

  • Class A:     10.0.0.0

  • Class B:     172.16.0.1    -   172.31.255.254

  • Class C:     192.168.0.1  -   192.168.255.254


Index Home Decimal to Binary Binary to Decimal IP Subnet Cal Port Numbers ARIN End-User Network Request Template


Copyright © [2003] [Web Master: D. M. Garrin].

This sit is for use by North Georgia Technical College

Faculty, Staff, and Students Only!

All rights reserved