Home    Training    Downloads    Tutorials    Arbitary    Get Fate    Proxy Info
 
Training session 25: TCP/IP
Difficulty: Medium
Learn the basics of this Protocol Suite
Creator: m101


So you ask, what actually is TCP/IP? Well its a protocol suite used for transportation of data. Although there are others such as IPX/SPX, TCP/IP is the most frequenctly used these days due to is connection orrientated and error checking features. TCP/IP stands for Transmission Control Protocol/Internet Protocol. This is the common name for the suite of protocols developed by the U.S. DoD in the 1970s to support the construction of worldwide internetworks. Let us examine these two protocols:

IP:
The Internet Proctocol is connectionless orientated and, as its major feature provides an addressing scheme. Connectionless orientated means that the packet is sent without any need for confirmation, so for example when you break into a building, you dont exactly wait to see if you have set off the alarm before escaping.

TCP:

The Transmission Control Protocol is connection orrientated, and provides for error checking of data. A connection orientated protocol waits for confirmation before proceeding, so for example, if you buy a computer game over mail order, you send the money away and wait for the game, if the game doesnt arrive you proceed to abuse the manufacturer until you have your game.

You probably are thinking, so why the heck is this useful? Well when creating networks, it is useful to know how the addressing scheme works and what subnets are. I would roughly guess that for the mass of you that are reading this, that have setup a LAN before, you would have been using windows, and would have gone into network setup, and in properties of TCP/IP would have set your IP to something like 192.168.0.6 and set the subnet to 255.255.255.0 like your mate told you to. Well this probably didnt make sense to you, and all you know is that the last number of 192.168.0.6 has to be diferent than everyone elses at the LAN.

Your IP address is like your street address of your house. When a letter is sent to you, they rely on this address to tell were the mail should be sent. Your IP address identifies which computer should recieve what packets. An ip address is 32 bit and has two sections defined by your subnet mask, these are the network address, broadcast and the node address, and example is the following:

IP: 192.168.1.1
Subnet: 255.255.255.0
Network: 192.168.1.0
Broadcast: 192.168.1.255
Node: 192.168.1.1

This may seem confusing, so i will explain to you what a subnet is. A subnet is an address that has a logical "AND" performed with it and the IP to give the network and broadcast address. The network address is network to which something belongs to, for example, in a company each department may be connected, but each department may have its own network address so that data from network A doesnt reach network B. This relieves congestion over a network. A broadcast address is the destination address that a packet can be sent to so that all computers on that network recieve it. Here are the maths of the IP address:

192.168.1.1
255.255.255.0

First these have to be converted to binary:

11000000.10101000.00000001.00000001
11111111.11111111.11111111.00000000

Now a logical and is performed on the two, this means whenever both corresponding digits are 1 then the result is 1, otherwise the result is 0. The Result is:

11000000.10101000.00000001.00000000

When converted back this is:

192.168.1.0

Now to find the broadcast address, we will add the maximum number of ip address's on that network which is 255 (2^8), so the broadcast is:

192.168.0.255

This still really aint that interesting, so lets change the subnet mask to 255.255.255.224 and see what happens:

192.168.1.1
255.255.255.224

11000000.10101000.00000001.00000001
11111111.11111111.11111111.11100000

11000000.10101000.00000001.00000000

192.168.1.0

Although its still the same, lets see what the broadcast addres is:

192.168.1.31

This is a little more interesting, so lets try a diferent node number:

192.168.1.97
255.255.255.224

11000000.10101000.00000001.11000001
11111111.11111111.11111111.11100000

11000000.10101000.00000001.11000000

192.168.1.96

And the broadcast is:

192.168.1.127

Here is a list of all the networks and broadcast addresses for 255.255.255.224:

Subnet 1: 192.168.1.0
Broadcast: 192.168.1.31
Subnet 2: 192.168.1.32
Broadcast: 192.168.1.63
Subnet 3: 192.168.1.64
Broadcast: 192.168.1.95
Subnet 4: 192.168.1.96
Broadcast: 192.168.1.127
Subnet 5: 192.168.1.128
Broadcast: 192.168.1.159
Subnet 6: 192.168.1.160
Broadcast: 192.168.1.191
Subnet 7: 192.168.1.192
Broadcast: 192.168.1.223
Subnet 8: 192.168.1.224
Broadcast: 192.168.1.255

Although this all seemed pretty pointless, it is actually rather useful when creating large networks. Your very net connection would have an address like 203.59.112.53 with a subnet of 255.255.255.0 and a gateway of 203.59.112.1. The gateway is what connects your network to other networks. The standard subnets are as follows:

Class A
This ranges from 0.0.0.0 to 126.255.255.255 with a subnet of 255.0.0.0

Class B
This ranges from 128.0.0.0 to 191.255.255.255 with a subnet of 255.255.0.0

Class C
This ranges from 192.0.0.0 to 223.255.255.255 with a subnet of 255.255.255.0

The ranges of these networks are a standard, unlike some retards belief, you can create a Class A network such as 202.0.0.0. Over the internet this however will not be accepted, but at a home network it is viable. So if something says to scan a Class B subnet starting at an address such as 203.59.0.0 then that just means scan from 203.59.0.0 to 203.59.255.255. It DOES NOT refer to the proper addressing scheme like an unbelievable ammount of morons think. 127.0.0.0 is reserved for loopback and special purposes.
Name

URL or Email

Message