Go Back   Computer Forums > Articles | Tutorials | Tech Notes > Articles | Computer and Server Software
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 01-29-2007, 05:21 AM   #1
Daemon Poster
 
Steff's Avatar
 
Join Date: Sep 2006
Posts: 1,435
Send a message via MSN to Steff
Thumbs up IP Tutorial!

The components of a computer, the CPU, network connection, memory, etc have only two states that they understand when it comes to data. These are 1's and 0's (or on and off, as some say)

This is the makings of a number system. If you're reading this I'm suspecting that you understand how to count to twenty using the following numbers 0,1,2,3,4,5,6,7,8,9 (or to pretty much any other number for that matter) each of the numbers there are simply symbols that we use to represent the concept of a number. We have developed abstract rules on how to create any number using these simple building blocks. So when you've used all of the available numbers on the first line (i.e. reached number 9) you increment the second line, and reset the first line (i.e. 10) This is the Decimal Number System. Or Base 10 (as it uses 10 symbols as its base)

Binary is a Base 2 number system and it all works very similar to a base 10 system. You use all the numbers available on the first line, increment the second line, then reset the first. However since we've only got two symbols to play with, this all happens rather quicker. Counting to ten in binary would look this.

0 = 0
1 = 1
2 = 10
3 = 11
4 = 100
5 = 101
6 = 110
7 = 111
8 = 1000
9 = 1001
10 = 1010

While we are on the subject there is also a base 16 number system, called hex (contraction of hexadecimal for the pedants here) which has the same rules, but uses the following symbols. 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f so counting to twenty would look like this

0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
10 = a
11 = b
12 = c
13 = d
14 = e
15 = f
16 = 10
17 = 11
18 = 12
19 = 13
20 = 14

So what has all that got to do with anything at all? Well I'm glad you asked.

We've all seen an IP address such as 192.168.0.1 and a subnet mask such as 255.255.255.0 that IP address contains two components, the network address (192.168.0) and the host address (1)

A computer performs operations on IP addresses by converting them into binary first. So 192.168.0.1 will look like this.

11000000.10101000.00000000.00000001
And the subnet mask 255.255.255.0 will look like this
11111111.11111111.11111111.00000000

We've all heard ideas such as routing NAT bridging etc. and perhaps never entirely grasped the significance of what is occurring. Well if you look carefully at the subnet mask you will see that all of the 1s are together on the left hand side. A computer uses these 1s to determine the network the machine is on and takes the rest as it's host address. It will compare the subnet mask, with the IP Address to determine where it's network address ends and where its host address begins.

Let's use an analogy to explain this properly. Imagine a street with some houses on, you live in one of the houses number 1 lets say you want to send a letter to a friend, so you write a letter, put it in an envelope, then you look at the address on the envelope and realise that they live on the same street as you. You look a little closer and realise they live at number 2, so you wander round and put it through their letter box (in computers there is actually a process for finding where number 2 is called arp but we'll leave that for another day)

The problem with this is that a computer can only hand deliver messages to machines with the same network address as itself. So if the computer you want to talk to resides on a different address you need to find a computer on the network that you want to talk to, to deliver your message for you.

So in this scenario you write your letter, stick it in an envelope then wander round to the post office, give it to them and let them worry about the logistics of getting your letter to its destination. However before you can do this, you need to know the address of your post office this is what your default gateway address is for, it is the default post office to use for all mail destined for different streets than yours. But what if your friend lives on a street that the default post office doesn't know about? For this you would have a routing table that you would inspect before you send the mail. Which is simply a list of street names and corresponding post offices for those streets. The logic of it works something like this.

The internet is made up of millions of separate networks. All with routers in between them to send packets to their eventual destinations. These routers can be host to massive routing tables especially those at the network cores in places like telehouse, mae-west, mae-east so perhaps you're asking why do we make it all so complicated why not just have a single large network where everything can talk to whoever it wants? Well the answer is that this model provides a massively scaleable system. There is often a lot of data that is destined for all hosts on a single network. These packets are called broadcasts packets and are sent to a special host address on the network. That host being all ones in the binary representation. So in our address 192.168.0.255 would be the broadcast address. All computers broadcast to the network if there are too many machines on a single network there ends up being so much broadcast traffic that nothing else can get through and your network grinds to a halt.

all addresses on the internet must be unique, just like every street address is unique in the world. But this can present problems when it comes to addressing private networks as these addresses tend to change around a lot, it would cause problems if all IP addresses needed to be unique. So a set of three blocks of addresses were setup that could be used as private address ranges. These addresses cannot be routed to across the public internet, and most of the routers on the internet will drop packets addressed to them. These addresses are
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
These addresses can use any subnet mask you desire. But they were originally designated as
10.x.x.x 255.0.0.0
172.16.x.x - 255.255.0.0
192.168.0.x 255.255.255.0
(if you've been paying attention you'll be able to figure out what's happening there!)

Now we'll get onto something a little more complex, TCP/IP Ports every application that performs a service on a computer over the network, will listen for connections on a TCP port each port has its own specific use (although this default behaviour can be altered). So for instance HTTP will listen on port 80 for web requests, SMTP (a mail protocol) will listen on port 25, and so on and so forth.

If we get back to our analogy, imagine that every house on the street is actually a tower block with 65536 floors. Each one of these floors has a single occupant. When a letter comes to an address it does not just come to a house number, it also needs to specify which floor (port number) it is being delivered to. Only one service can be offered on a single port number.

what does a firewall do
A firewall is a postmaster in a bad mood, looks at the letters coming into the post office and bins the ones that he doesn't like. Specifically any address and port that hasn't explicitly set a rule to say that it will take a message will have its mail thrown away. This way you can offer a service on the inside of a firewall that will not be accessible from outside the firewall because the packets that are destined for that service will never actually get there because the firewall (post office) will drop the packets before they enter the network.



What is NAT

Nat is like a PO box for the internet, it hangs out on the front address of the post office's address, and allows you to use a private IP address inside a network but still have conversations with machines that have real IP addresses. When you send a message out of your network the post office will take it out of the envelope, put it into a new envelope with a different reply address the reply address of the post office instead of your local network address it will then mark your address and the conversation id (think that most letters will get some sort of response and that response will be responded to, and so on, and so forth, this is a conversation)

However sometimes protocols hide the destination address inside the protocol (letter) as well, so in this case special rules need to be created to read the contents of the packets to determine if a protocol has put an IP address inside the packet data. However this only happens on an application by application level, so each application needs its own bit of code to modify packets if they are to cross a nat router successfully.


Port forwarding

Port forwarding is kind of like NAT, but it allows an address in one network to accept traffic that is being sent from a different network. Addresses and ports at the post office will have a forwarding rule set up, so that when a packet comes to a specified floor on one network, it will be sent to a different address on a different network the floor can also be changed if required, but for the most part the ports are left as they are.


Port forwarding is kind of like NAT, and is usually found alongside a NAT router (in fact I can't think of a possible scenario when port forwarding would be used without NAT) but it allows an address in one network to accept traffic that is being sent from a different network. Addresses and ports in one network can be forwarded to a different address in a different network. (the machine doing the forwarding would normally have an address in both networks. Although there is no reason why a forwarded packet cannot be routed through a network like any other packet.

http://www.cisco.com/en/US/tech/tk36...800a67f5.shtml
__________________

Steff is offline   Reply With Quote
Old 02-02-2007, 07:55 PM   #2
Fully Optimized
 
spywarebanisher's Avatar
 
Join Date: Dec 2006
Posts: 2,135
Default Re: IP Tutorial!

how do you change ur ip to dynamic instead of static?
__________________

spywarebanisher is offline   Reply With Quote
Old 02-05-2007, 04:35 AM   #3
Daemon Poster
 
Steff's Avatar
 
Join Date: Sep 2006
Posts: 1,435
Send a message via MSN to Steff
Default Re: IP Tutorial!

Static IP means the ISP assigns to your computer a fixed IP address until you unsubscribe from the service, close your account. You must check with your ISP (@home) to be sure that they provide fixed IP address before attempting to set the fixed IP address for your computer.

Dynamic IP means the ISP will assign to your computer an IP address every time you sign on and this IP address can be used later for some other computers (customers) after you sign off.

So, makes no difference realy, why would you want to do that?
Steff is offline   Reply With Quote
Old 02-09-2007, 08:54 AM   #4
Daemon Poster
 
Steff's Avatar
 
Join Date: Sep 2006
Posts: 1,435
Send a message via MSN to Steff
Default Re: IP Tutorial!

Sorry for the double post,

I took the link out and put the whole thing there with the pics etc for everyone
Steff is offline   Reply With Quote
Old 03-03-2007, 12:30 PM   #5
Beta Member
 
Join Date: Mar 2007
Posts: 2
Default Re: IP Tutorial!

Came here to learn this stuff,

Thats a great begining once I grasp it all.
Thanks Steff!
Diddydum66 is offline   Reply With Quote
Old 03-03-2007, 03:41 PM   #6
Fully Optimized
 
spywarebanisher's Avatar
 
Join Date: Dec 2006
Posts: 2,135
Default Re: IP Tutorial!

but like on a laptop, ho do u change the adapter so that tehe ip would be dynamic and change evrytime i was in range of a connection i could use
spywarebanisher is offline   Reply With Quote
Old 03-03-2007, 04:29 PM   #7
Golden Master
 
Raffaz's Avatar
 
Join Date: Sep 2006
Posts: 6,798
Send a message via AIM to Raffaz Send a message via MSN to Raffaz Send a message via Yahoo to Raffaz
Default Re: IP Tutorial!

Quote:
Originally Posted by spywarebanisher
but like on a laptop, ho do u change the adapter so that tehe ip would be dynamic and change evrytime i was in range of a connection i could use
Right click the adapter > properties, general tab > select protocol tcp/ip > properties > obtain ip address automatically.

Also, just coz your in range of a wireless connection doesnt mean you will be to use it. If they have it secured then you need a key (and im not gonna tell ya how to get that).
Raffaz is offline   Reply With Quote
Old 03-05-2007, 05:11 AM   #8
Daemon Poster
 
Steff's Avatar
 
Join Date: Sep 2006
Posts: 1,435
Send a message via MSN to Steff
Default Re: IP Tutorial!

I would never do anything like that on my wireless laptop..honest, Its not like the people over the road from me have a great wireless connection that is unsecured I mean come on like anyone would connect to that

Best not upload any porn spyware Be aware if you get caught you can go to jaiil for it too
Steff is offline   Reply With Quote
Old 03-05-2007, 10:09 AM   #9
Daemon Poster
 
RewtGuy's Avatar
 
Join Date: Dec 2004
Posts: 595
Send a message via AIM to RewtGuy
Default Re: IP Tutorial!

Not to bust your balls, but if you take from another source, please cite your source.
http://community.smoothwall.org/foru...ic.php?t=17741 Posted about a year before yours.

Also in that thread cited above, some resources another user recommended.

http://www.cisco.com/en/US/tech/tk36...800a67f5.shtml

http://www.faqs.org/rfcs/rfc1918.html
__________________
Windows: A thirty-two bit extension and GUI shell to a sixteen bit patch to an eight bit operating system originally coded for a four bit microprocessor and sold by a two-bit company that can't stand one bit of competition.
RewtGuy is offline   Reply With Quote
Old 03-05-2007, 10:11 AM   #10
Daemon Poster
 
Steff's Avatar
 
Join Date: Sep 2006
Posts: 1,435
Send a message via MSN to Steff
Default Re: IP Tutorial!

When I first posted this, I posted the link actualy I thought it would be way easyer to copy and paste as not many people tend to click on links plus it was only for the benifit for other people to see it on the site so I see no harm

btw smoothwall is great! so so so many mods for it, its realy unbelievable how much people have done to that damn thing!
__________________

Steff is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 07:27 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0