Learn all about Networking and TCP/IP Addressing

Tech questions and answers, video game stuff.

Moderator: ElTaco

Post Reply
ElTaco
Networking Securely
Posts: 922
Joined: Fri Jan 14, 2005 1:12 pm
Location: Northern VA
Contact:

Learn all about Networking and TCP/IP Addressing

Post by ElTaco » Sun Apr 23, 2006 10:15 pm

There are a lot of people who are confused about how networking and the internet works. Its actually fairly simple if you consider what is going on and what is nice is that once you understand how things work a little better, you can protect yourself and perhaps more importantly your family a little better. As a result, I'm going to throw up some links, and hopefully other people will add in any extra ones they know. This isn't meant to teach you everything, but hopefully if you read a few of the links on the basics, it will allow you to do some more research or to buy a book or two and round out your knowledge. I am by no means an expert on the topic, at least not yet, however if anyone has questions, I would be more then happy to let you in on what I know or refer you to websites that can help explain things a little better. If my little introduction to IP addresses/routing confuses you, just skip to the end and read one of the links on the web. I included some links from universities for introductory courses, some links from the HowStuffWorks articles written for beginners and some more in dept technical stuff from companies like Cisco. Please let me know if you spot any mistakes.

The internet and networking started a while back. You can find plenty of pages on its history on the web so I won't go into it, but let’s just say that the Internet started out as a US Military project in the late 60s, that pulled in research from universities and the Private industry to create the first large network. The military goal of the ‘internet’ was to create a communication system that the enemy couldn’t destroy; in other words, a communication network that could automatically route information from point A to point B even if certain parts of the network were destroyed. The first ‘internet’ was called the Arpanet and was developed by DARPA. As you can see the internet has been around for a while, but the World Wide Web (WWW or W3) which is often mistakenly referred to as the Internet was only developed in 1993. To explain how networking and the Internet works, I generally compare it to the US Post office.

Imagine that each local network, whether it’s a small local ISP's network or a small to midsize company’s network is a town and you are trying to send a package from your home to the next town over. How does this work? Well first of all every house has to have some type of an address that sets it apart from every other house. The postal service in this real life scenario set up the standard which looks something like this:

House # - street - apartment #
City, State, Zip code
Country

So if you as a person want to send a letter from home to a friend in the next town over, you would put the letter or package in your mailbox and put the little flag up. The mailperson would see the little flag and take the letter/box. This person doesn't actually look to see or particularly care where the letter is going. He or she will just deliver the mail to the local post office. Your local post office is the first one to look at the destination. They will look at the town, state and zip code to see if the letter stays local or if it needs to be sent up to a central processing station. If the letter or box were local, they would sort it into their local mail queue/box to be delivered later that day or tomorrow. In our case, we are sending this package to a friend in a different town so they will put the box with the other mail to be sent up to the county or state processing center, and when the truck comes, they put all the mail going out of the town on it and away it goes. Does the truck care where the mail on it is going? No because its taking everything to the same place. Once your box gets to the processing center, they will once again check the label for the Town, State and Zip code to see if its a town that is local (a town they service) or if they need to send the mail to a higher processing center. These guys don't care about the street or local address information because that isn't what they do. They sort the mail for all of the towns that are under their control and they sort out mail into a big pile that they are sending up the hierarchy of the US Mail system. So in this example, our box is going to the next town over, which we will for the time being assume that it is a town in the same region, in other words the same processing center is responsible for the mail going to both towns. They sort your box into that towns queue and when the truck leaves later that day or the next day your box will be on it. It will stop at the destination post office, who in this case will probably re-check if it is the destination town, state and zip and then checks the address information to give the box to the correct Mailperson's queue/box. When its time to deliver the mail, the mail delivery person will put the box in your mailbox or give it to you, depending on its size obviously when he or she gets to your address. I don't think this information is anything new for anyone.

So how does this relate to networking and routing. Well just like every building in the US and in the world even has an address, every machine on the internet has an IP address. IP addresses look something like this xxx.xxx.xxx.xxx where each xxx = a number from 1 to 254. This is called the Dotted Decimal Notation. An example IP address might be 005.022.233.004. Of course like people, machines are smart enough to understand that you don't need the leading zeroes so you would write 5.22.233.4. Just so everybody understands, this IP address is translated to a binary number for computers where each number in the IP address is translated to an octet of ones and zeroes, in other words the 5 is actually translated to 00000101. I am just throwing this out there in case you never knew that computers actually only understand binary code/math and in the case of IP address they look something like 00000101.00001110.11101001.00000100. This Binary IP address translates to the IP address that I used as an example above. Again that is all I will say on the topic because it will just confuse the matter, but to actually understand how PCs and Routers work with IP addresses and know when to forward them/route them vs. ignoring them, you have to have an understanding of Binary math. Some of the links at the bottom do a good job of explaining how this system works, but as long as you understand the basics, you don’t need to know everything or even think in binary terms.

Now that we have a very basic understanding of what an IP address is let’s continue. Like your home's address, an IP address actually has two parts to it, possibly three. The first part is the Network address and the second part is the Host address. Again this is similar to your home address, which actually has more then just 2 to 3 parts. Believe it or not, the concept of an IP address is actually simpler then the idea that the US Postal address uses, of course its not as easy for humans to read, understand or remember so the US Postal services uses English words instead for streets cities, towns, states. But just so we understand the comparison, imagine that instead of writing your address on 2 or 3 lines, we wrote it on one. For example:

Instead of:
123 Hickory St. E
Apt 224
New York, NY 12345

We wrote: 123.HickorySt.E.224.NYC.NY.12345

This looks a little more like an IP address, however, it would require us to remember a lot more, for example, the exact place a street number, street name and apartment number would go, plus it might be hard to put in long town names and what happens if you don't have an apartment number? This is too complex for people, especially stupid people to remember, which would mean that a lot of letters would go to the wrong people, but if people weren't so easily confused, this might actually work quite well.

So how do you know which part of the IP address is your Network address vs. the Host address? This is where the idea of IP classes comes in. There are 5 classes of Internet addresses in the current version of the IP system we use, called IPv4. These are broken down by the first number of the IP address.

If your IP address starts with a 1 to 126, then it is known as a Class A network, which means that the network portion of the IP address is nnn.hhh.hhh.hhh where n represents the numbers in the Network portion and the H represents the Host portion. The rest of the 9 numbers represent the actual machines. This means that each network can have a very large amount of computers on it, however it also means a lot of wasted IP addresses if you are assigned a class A network when you are a small business with 10 computers. As a result, the body that manages the internet IP space, the Internet Assigned Network Authority or IANA only gives out Class A network addresses to really large organizations, countries. In other words, to someone who will need IP addresses for Millions of computers, to be specific, there are only 126 networks in the class A network space and each Network can have 16,777,214 machines. This is a lot of machines as you can imagine, which is why Class A addresses only go out to large organizations.

If your IP address starts with a 128 to 191, then your IP address is in the Class B range. Class B IP addresses are split between the Network address and the Host address differently then Class A IP addresses. They look something like: nnn.nnn.hhh.hhh where N represents a number in the Network portion of the IP address and H represents numbers in the Host portion. Class B networks are sold/assigned to large organizations, which are usually international organizations or large ISPs.

The last useful IP range is the Class C networks which go from 192 to 223. This means that the Network and Host portions of the IP address are split differently once more and the split looks like this: nnn.nnn.nnn.hhh where N once again represents the network portions and H represents the Host portions. Class C networks are assigned to small and medium organizations that may have

There are two other classes (D and E) that you will not be working with at home. If you are paying attention, you may also have noticed that we skipped the 127 number. This number/network is reserved for your machine. In other words, anything that starts with 127 refers to your machine. If you connect to 127.0.0.1, you will be connecting right back to yourself.

So why have these classes you ask? The reason is simple. If you imagine that each network is a town, city, county or parish, depending on its size then you can kind of see the reason behind it. The IP addressing system has one huge shortfall that the US Post office address scheme doesn't have and that is the number of total hosts it can support. The total number of machines it can support are 2^32 or 4,294,967,296 machines. Now this might seem a large number to you, but when you consider that every computer, server, and any other internet device (new Internet accessible cell phones like the Blackberry, VOIP phones, laptops, and other hand held devices, etc...) must have an IP address, suddenly you realize that there aren't enough address available. Another limitation of the way that IP traffic is routed is that every network must be connected by a router, in other words, a device that can route traffic between networks. So how is this a limitation? Well when you give out a Class A address to a small company with 10 computers, it means that the other few million addresses can't be used by anyone else, in other words they are wasted, which is why Class A networks are sold to very large organizations. There are ways that these organizations can of course break up these numbers even more of course, which is what ISPs do. There are also a number of other concepts that have been developed since the IPv4 system was put in place, like Classless Inter-Domain Routing (CIDR) and of course the ever so popular Sub netting. Another concept is Private network IP addresses, which work with NAT. These private IP addresses are not routable over the Internet so they must be translated by NAT before going over the internet. In other words, even though I said that the internet and IP addresses and routing worked like the system I just described above, it’s actually changed in the early 1990s to solve some of the problems with IPv4. The ultimate solution however is IPv6 which allows for a lot more addresses, however, for now hasn't seen wide acceptance yet mainly because the US currently has most of the IP addresses so it hasn't started to experience as big a shortage as other regions of the world. IPv6 will happen in the next few years as more and more people in countries like China and Africa get online and those countries and the EU will probably switch to IPv6 and at that point the US will have to follow. Not to worry, IPv6 is much better then IPv4 because not only does it solve a lot of the shortfalls that have come up over the past 20 years, but it also adds features that people have wanted for years, such as better security. The big drawback will be transforming this enormous network. It will have to happen over several years. Also, there is actually something called Internet2 that is being worked on to speed up the internet. It’s sort of like the original Arpanet where only Universities and research organizations can be on it currently.


So what is a router? Well in our example above, a router is your Post Office. Larger Internet routers might be translatable to regional, statewide or even larger mail processing centers and there are some backbone routers that could be seen as national mail centers that route mail between countries. Hopefully you are starting to see the larger picture. Just like your mailman can't pick up a letter from your house and directly deliver it to your friend in the next town over, your computer can't send IP traffic (called Packets) from your computer directly to a computer to a computer on another network, even if they are connected to the same cable, hub or switch.

Ok so let’s review, IP addresses are like house addresses. Ip addresses have Network and Host portions just like your home address has street, city, state and zip code portions. The mailperson is like the cable that carries the traffic between your house to the post office or from the post office back to a house or up to a larger processing center. The letter or package that you are sending is like a data packet your computer would send. The post office is like a router or in some cases a network switch. It takes a look at the IP addresses and decides if it needs to send the data up the network heirarchy or if the machine is local.

Ok so hopefully with this real life comparison between Networking and the US Postal service, hopefully you have a better understanding of how networking works, of course, in real life things actually deviate from this example. One small deviation from the above example is that your machine can directly talk to another machine that is on the same IP network without having to rely on a router. So unlike a post office, when your machine sends a packet to another local machine on the same IP network, it sends it directly, so in this case a router would actually look at the packet and just drop it because it assumes that the same packet already got to its intended recipient. If the packet must go out to a different network then your router processes it and sends it out to another a higher authority.

I won't even try to go any deeper because there is a lot more to discuss if we wanted to discuss networking specifically. In networking, you have hubs, Switches and routers. All of these devices work differently. And of course TCP/IP is just a small subset of how networking works in real life. There is actually a conceptual explanation of how all networking works called 7 Layer OSI Model. TCP/IP are just examples of two different Protocols of layer 3 and Layer 4 of this model.

Ok so if you understood what I just wrote about or even if you didn't and want to read something by someone else, try some of these links:

3COM: Understanding IP addressing: Everything you ever wanted to know
http://tinyurl.com/ysnjn

Howstuffworks: What is an IP address:
http://computer.howstuffworks.com/question549.htm

Howstuffworks: How Ethernet Works:
http://computer.howstuffworks.com/ethernet.htm

Howstuffworks: How Routers Work:
http://computer.howstuffworks.com/router.htm

Howstuffworks: How Home Networking Works:
http://computer.howstuffworks.com/router.htm

NAT and SOHO Routers work:
http://grc.com/nat/nat.htm

3Com: Understanding IP Addressing: (very short brief)
http://tinyurl.com/z69hg

IP 101: All about IP addresses:
http://www.networkcomputing.com/netdesign/ip101.html


Interested in learning more?

Learn about the 7 Layer OSI Model. This model explains the all around networking concept. If you learn this, you will understand how a PC takes data and sends it to any machine using different networking technologies. Once you understand the OSI Model, you will have a better understanding of how a router actually works and what we mean by a router being a Layer 3 network device. This is of course only a model for us humans because computers certainly don't follow it, but it explains conceptually how a computer takes data and sends it out on the wire and how another computer receives the data. Combine this knowledge with an understanding of how a computer, router or LAN network device like a HUB or Switch handles data and you will have a very good idea of how the internet works. Good enough in fact to probably start thinking about working in the industry.

Wikipedia: OSI Model:
http://en.wikipedia.org/wiki/OSI_model

Webopedia: The 7 Layers of the OSI Model:
http://www.webopedia.com/quick_ref/OSI_Layers.asp


Tie it all together/Learn about it all:
CISCO Documentation: Internetworking Basics:
http://www.cisco.com/univercd/cc/td/doc ... troint.htm

HowStuffWorks: How the Internet infrastructure works:
http://computer.howstuffworks.com/inter ... ucture.htm

Or if you are looking for more of a class intro to the Internet:
Introduction to the Internet: UMN.edu style:
http://tinyurl.com/nbbab
Last edited by ElTaco on Thu May 04, 2006 6:26 pm, edited 2 times in total.

User avatar
PSUFAN
dents with meaning
Posts: 18694
Joined: Wed Jan 12, 2005 7:42 pm
Location: BLITZBURGH

Post by PSUFAN » Mon Apr 24, 2006 9:49 am

thanks, ET!
King Crimson wrote:anytime you have a smoke tunnel and it's not Judas Priest in the mid 80's....watch out.
mvscal wrote:France totally kicks ass.

User avatar
Tom In VA
Eternal Scobode
Posts: 9088
Joined: Sat Jan 15, 2005 6:04 am
Location: In Va. near D.C.

Post by Tom In VA » Fri Apr 28, 2006 1:10 pm

RACK ET
With all the horseshit around here, you'd think there'd be a pony somewhere.

User avatar
Jack
enigma
Posts: 1879
Joined: Sun Jan 16, 2005 10:36 pm
Location: U.S.A.

Post by Jack » Wed Aug 09, 2006 11:17 pm

I am not worthy to post in your presence!!

RACK ELTACO!!
Image

****

and while you are at it...

Here's a nice site when you get in trouble..

http://www.pchell.com/index.shtml

***

I wouild like to hear ElTaco's reviews of the site. It did help me recently with How to Troubleshoot and Fix Windows XP SP2 Limited or No Connectivity Error Message..

Reset my TCP/IP stack by downloading and running WinsockXPFix.exe a Visual Basic program designed to fix corrupted TCP/IP issues, host file problems and a variety of other connectivity issues!

but I must close with

ELTACO IS GRANDE!!!

ElTaco
Networking Securely
Posts: 922
Joined: Fri Jan 14, 2005 1:12 pm
Location: Northern VA
Contact:

Post by ElTaco » Fri Aug 11, 2006 5:17 pm

I've used PC Hell before because they do have a lot of information on ways to clean your machine from those hard to clean spyware so in that respect it is a decent site. Their website design could use a little work through.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest