Why we need IP addresses? an intro - PART I


Introduction:

If you are curious about networks then you definitely ought to be curious about IP addresses. In the earlier section we saw that our identity on the internet is simply our IP address. If you can find out the IP address then you can find out the PC and in turn you can track down the person. So what is an IP address?

Before getting into this topic there are a few terms you should understand:

Networks: Connect 2 computers and you have a tiny network. A computer network is basically an interconnection of computers such that each computer on the network can communicate with another computer on the network. The Internet is just an interconnection of many networks. An internet (starts with a small 'i') is simply an interconnection of networks but the Internet (starts with a capital 'I') refers to the global Internet. Thus the Internet is an internet but not vice-versa!

Nodes: When you connect 2 computers, you are said to be connecting 2 nodes. Nodes needn't be just computers- they could be printers, plotters etc. And to connect computers you need to establish some physical link between them. The link might be a cable (copper wires), an optical fibre, through the telephone lines or air (wireless connection in which the medium of transmission is air). You will frequently come across the terms 'link' and 'medium' in the networking domain.


Why networks?

In the early days, computers were meant only for organizations (and not for the home use). Initially every computer was stand-alone; i.e. no 2 computers could communicate with each other. By communication we refer to sharing/transferring of data, of controlling one system through another system, of making use of resources (like a printer) connected on some other computer etc. If 2 people in an office were working on some thing (let's say a project plan), either one of them would have to save his work on a floppy and pass the floppy onto the other person. The other person would compare the 2 plans and consolidate. All's well that ends well. But what if 10 people were working on the same piece of document, each working on his own copy! Ah, you would say why do they all need to work like that. Let them take turns at it; but then again you have the problem of needing each person to copy the updated document on a floppy, pass it to the next person and so on.

Or how about the case of having 100 employees (architects) needing to print out their building plan. In the stand-alone scenario, either each PC should have a printer hooked on or everyone should copy their plan on a floppy and give it to the person who has the printer on his/her system. And that person would put in 100 floppies one after the other and issue the print command. Wow!

Networks to the rescue: By networking the computers in an organization it becomes easier to eliminate the problem of copying to floppies, passing them around, reconciling the changes etc. You could keep one document in the master computer and everyone else can access the master file when needed. Of course only one person should be allowed to modify the document at any time (else you'll end up in a mess).

In the second scenario of printers, again networking could help ease the problem. Everyone in a network can effectively access the computer which has a printer and can thus print their documents (as if the printer was on their own system). Of course, the printer would print on a first come first serve basis (by using the spool) but this configuration saves time and money.


Why do we need IP addresses?

Every computer connected in a network needs an address. Why? Because only then can computers communicate with each other on a network. It's like having a postal address. Only if you know the mailing address of a person can you send him/her a letter. Just like us, computers also use addresses. But we humans are comfortable with words while computers only know one language: numbers. Thus instead of having a street, flat name, city and country, computer addresses consist only of numbers. To make matters worse (for us), computers understand only binary numbers (things are much easier for them in this form).

Though computers finally perform everything in binary form, we use the decimal notation to represent IP addresses. Isn't reading: 8.0.1.5

better than: 0000 1000 0000 0000 0000 0001 0000 0101 ?

There's no doubt about it....it definitely is better. (If you are worried about conversion between binary and decimal system, don't worry; we'll take of that later when we need it).

You always need a convention for doing things (so that everyone else will understand you). The postal address has a specific format:

Name,
Flat number, house name,
Street number, street name,
locality,
city-pincode (or zip code)
state
Country

Everyone in the world uses this postal address format (at least something similar to this) and this makes work of the postal office simpler. They needn't worry about each country having a different convention for writing the address.

Similarly we needed to adopt a standard convention for IP addresses also so that all computers could understand them. And we have what is called the dotted-quad format (weird name but it'll make sense soon). Quad (as in quadrilateral) implies four. In an IP address we'll have 4 parts. Dotted because the 4 parts are separated by dots. The general format:

    aaa.bbb.ccc.ddd

where aaa, bbb, ccc, ddd are whole numbers which can take values from 0 to 255. Or the range of IP addresses is: 0.0.0.0 to 255.255.255.255

"Hey", you say. "Why did they have to decide on a number like 255? Why not round it up to 200 or 250 or 300?" Well, once you learn about the binary system you'll appreciate the number (for the time being just remember maximum is 255).

Now there has to be someone to manage these numbers. Who decides how to allocate the IP numbers? It's obvious that no 2 machines should have the same IP address (that would mean like 2 houses having the same postal address!). Yes, there is someone to regulate this process of assigning the IP addresses. Let's call this person the IP-manager (actually it's an organization which we'll see later). If you want an IP address, you'll put a request to the manager and he'll decide the IP address for you (because he has to ensure that the IP being allotted isn't already allocated to someone else). Of course you need to pay the manager for an IP address (just like you do for a telephone connection and number). Once you have the IP address for your machine, what next? Let's say you've been assigned the number 100.0.0.1 Now you need to configure your PC so that your PC will know it's IP address. (PC's are little dumb and they have no idea that you got them an address from your manager. You need to tell your PC about this!). Now you're PC knows what it's address is. What next? Now you need to inform everyone else that the IP address 100.0.0.1 is your PC (so that if anyone tries to connect to 100.0.0.1 they should connect to your PC). Fortunately you needn't worry about this part. The IP-manager has a directory service and anyone who wants can look up the address in the directory and connect to the system they are searching for. It's the same as getting your telephone connection. You get a telephone number and it gets listed in the telephone directory.

And in this way every computer can get an IP address and be identified.

Problems:

"Wait a minute! If I am a huge company with 1000 PCs, do I need to pay the manager 1000 times to get 1000 different IP addresses; and each of the address might not have any relation with each other. One address he gives me is 100.10.20.0, another one is 20.100.1.2; another one is 2.2.2.2. How will I know which IP belongs to my company. Don't tell me that I have to carry a list of IP addresses used by my company." This is the first problem.

There's another major problem with what our IP-manager is doing.

How is a network formed? Let's say we have 3 computers. If you want each one to talk to the other you could connect each of them to the other two. So 3 nodes would need 3 links (or 3 cables). If we have 4 nodes then it would be as shown in the picture below:

4 nodes means 6 cables are required so that each node can contact the other node in the network.

Number of Nodes

Number of cables needed

2

1

3

3

4

6

5

10

6

15

Just look at the way the number of cables are increasing! If we had 6 computers, you need 15 cables (and each computer should be have 5 slots to connect the cable from it to the other 5 computers). If we had 100 computers, then you need 99 vacant slots on each PC to establish a proper network! Isn't there a simpler way? Yes there is. In fact there are different ways. The term used for representing the way a network in interconnected is called 'topology'.

A simpler way is to have one single bus (a bus is basically a cable) and have every PC connect into the bus.

 

Transmitting data to local nodes

There are many more structures which we won't get into now. Each organization could have its own network topology. In this simple bus structure, if Node A wants to send data t node D, what should it do? By the way, data is usually broken down into smaller pieces before transmission (these smaller pieces are called packets). The packets are reassembled at the receiving node to form the original data (we'll worry about how this is done later). So node A will send packets along with the destination IP address (i.e. IP address of node D). The packet is sent on the main bus. But the main bus carries data from all nodes. So the data of Node A will be received by all the nodes. Each node will examine the destination address and check to see if the packet is meant for it. If it isn't it'll just discard the packet. Node D will examine the packet and realize that the packets are meant for it. It'll start collecting the packets one by one. This is a simple way by which data can be sent to nodes on the same local network.

NOTE: Nodes A, B, C, D are said to be on the same local network.

You can imagine the amount of traffic on the network if we have 1000 computers on a single network!

Network Traffic: In real life, traffic refers to the number of vehicles on the street. In networking, this term refers to the amount of data that travels within a network (i.e. the number of packets that traverse the network- the packets are the vehicles and the medium of transmission- cable or optical fibre is the street). When many cars travel at the same time we end up in congestion and similar problems can occur in a network.


Transmitting data to foreign nodes

When a computer in a network wants to send data to a computer on some other network (i.e. to some foreign node - foreign because that node is not present in the same network) there has to be some computer in the local network which will undertake this task.

This is where the concept of routers comes into play. A router accepts data from one network, examines the destination address of that data and decides where the data has to be sent. If it is on the local network it won't bother about the packet but if the packet is destined to go outside the local network, then the router will forward the data to some other computer (which is outside the local network).

Since this edition has become quite long we'll examine this scenario in the next edition.


Back to Networking Contents

Copyright © 2004 Sethu Subramanian All rights reserved. Sign my guestbook.