Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Basics of IP Routing


  • Please log in to reply

#1
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
A large portion of the world is now on broadband. And an increasing number of those people are getting routers in their home to facilitate home networking. But what is a router? What does a router do? And how does this magic device actually work?

A router can be basically defined as

a device that determines the proper path for data to travel between different networks, and forwards data packets to the next device along this path. They connect networks together; a LAN to a WAN for example, to access the Internet.


Or more precisely as

a computer networking device that interconnects separate logical subnets.


And that's it! A router is a device that can connect two dissimilar networks (like your home network and the internet) and allow for traffic to pass between them.

So...how does a router work?

To understand this you've got to know about two things. IP Addresses, and Subnets

An IP address is a uniquely identifying address given to a network device. IPs are generally written in "dotted" notation which is the standard recognizable IP format. This notation involves separating 4 groups of 3 digit numbers with a dot (like 192.168.0.1). These numbers are the "real number" representations of binary "octets" or groups of 8 bits. This means that each individual group of numbers in the IP address conveys 8 bits of binary information.

A subnet is a "block" or range of IP addresses that define a specific contiguous network. You will usually see this represented as a "Subnet mask" that you assign to a network device (the most common one seen is 255.255.255.0). A network device uses this subnet mask to separate the network portion of the IP addresses that it sees and the host portion of the IP addresses. You'll notice that a subnet mask is in dotted notation just like an IP address, and a subnet mask works the same way. It's 4 groups of 8 binary bits. When a device processes a subnet mask it will translate the mask into a binary number that it can use to strip the network portion off of the front of the IP address leaving the host portion behind.

Once you have a network portion and host portion of an IP address you can finally know which computer the data is destined for and on which network. So with an IP address of 192.168.0.2 with a subnet mask of 255.255.255.0 the device would see 192.168.0 as the network portion and the .2 as the host portion, which means that the device in question has a "host id" of .2 and belongs to the 192.168.0.0 network (don't have time to teach you how that happens...but by god it happens)

A good way to understand the basics of IP addressing and Subnetting is to think about how normal "snail mail" is delivered in a town. Each home in the town is on a named street, and each home has a number assigned to it. You can visualize the "host" portion of an IP address by thinking of it as your home's address number. This is a number that's specific to your home and allows the mailman to deliver letters to your home. The "network" portion of the IP address can be visualized as your street name which allows your mailman to know what part of town your home is located in.

Another way to visualize IP Addresses within the context of subnets and routing is to think of a corporate phone system. The company will have a main number that you dial into to connect to their phone system, then within that system each person within the company has their own personal extension that allows you to get to the right person within the company. In this analogy, the main number for the company would be the broad subnet and each individual extension would correspond to the host portion of the subnet

So what does all this have to do with routing?

Well it's logical to assume that there are homes in your town that share the same address number, but there should be no other house in your town that has your same house number AND is on the same street as you. This is how IP addresses and subnet masks work, they allow a networking device to determine which network (street name) a device resides on, and then to ensure that the information arrives at the specific device (home address number) on that network that it was destined for.

A router is like the post office. It knows which street is where and which house is on which street. When a letter comes into the post office, it has an address on it that contains the recipient’s street name and house number. The post office then sorts the mail it receives by this info and hands the mail to the mailman who delivers to that street.

This is the same way a router works. A router will get a packet of information from your computer and strip off the network address and host address from the packet and decide where to route (wonder why they call it a router) the traffic to.

So why do we need routers? Can't my computer just send the info directly?

Well, no, your computer can't do this directly. Because of IP addresses and subnet masks, your computer only knows about things that exist on its own subnet and therefore can only communicate directly with devices on that subnet. That's where routing comes in. A router can also be known as a gateway (think default gateway). A gateway is a portal from one location to another. And that's what a router is, a portal from one subnet to another. The router will have known "Routes" for different subnets. These routes can be manually or dynamically assigned in various ways and through various protocols (Google routing protocols). These routes are like road maps that tell your router where to send traffic. Most routes in a router actually point to a different router on a different subnet. If you ever look at your route tables in your router you'll see a route that's similar to 0.0.0.0 with a netmask of 0.0.0.0 pointing to another IP address (that address is usually going to be your internal router, but if you look at the route tables on your modem, then that IP address would be your ISPs router). This is known as a default route. This route tells your router to forward any unknown traffic on to the next router who probably knows the route to the final destination. By using routing tables in this way your network can connect to a network with a different IP structure and establish communication.

Let's put this into action

So let's assume that we've got two devices. One is a pc in your home (IP address: 192.168.0.2 Subnet Mask: 255.255.255.0) and one is a server out on the internet (IP address: 192.168.222.3 Subnet Mask: 255.255.255.0). How does information get from that server to your computer when you request info from this webpage with your PC?

First, your computer issues the request to its default gateway (your home router) and asks if the gateway knows how to get to the destination. Your home router doesn't know how to get to this destination but it knows that your modem (your router's default gateway) probably does so it sends the packet on with a request to your modem. Chances are your modem doesn't have a clue how to get to the destination either so your modem forwards the request on to the ISP's router. This process continues until the packet finally reaches the destination at which point the destination server will process your request and initiate the transaction in reverse until the packet gets back to your home PC which then displays the webpage you were looking for.

Keep in mind that this is a very bare bones explanation of how this works and the actual process would take me a few hours and pages to really explain.

Edited by dsenette, 17 September 2007 - 06:31 AM.

  • 1

Advertisements


#2
nancypricella

nancypricella

    New Member

  • Member
  • Pip
  • 1 posts
If RRS server is deployed as a LAN router, the same static filters can be used to do filtering in the forwarding path. Note: RRAS basic firewall can't be used on RRAS server in this case - as it is a host firewall and not a network firewall.
--------------------------------------------------------------
Nancypricella

Removed Spam link

Edited by wannabe1, 30 May 2010 - 07:54 AM.

  • 0

#3
wareup

wareup

    New Member

  • Member
  • Pip
  • 3 posts
WOW I like it! I remember my cisco days! heheheh
this is really good.
thanks
  • 0

#4
MOMLOVESUALL

MOMLOVESUALL

    Member

  • Member
  • PipPip
  • 13 posts
I have a Hp s 3713 w computer Windows Vista and Linksys WRT54G wireless router, WESTELL 6100 modem and DSL . I want to set up wireless to my old Emachine windows xp computer. I have no idea where to begin. I was told just buy a wireless card????????? I was told I could find them for about $20.00. I live out in the country and we only have a Super Walmart. What would you suggest? We also do not buy things on the Internet. I'm lost, can you please suggest a product to purchase from Walmart?
  • 0

#5
darwinjames

darwinjames

    New Member

  • Member
  • Pip
  • 2 posts
One of the BEST!
I can consider this as a layman's term definition.

Very nice post. thanks a lot
  • 0

#6
rriixx

rriixx

    New Member

  • Member
  • Pip
  • 3 posts
hard made easy to understand...

nice thank you!
  • 0

#7
inapaler

inapaler

    Member

  • Member
  • PipPip
  • 34 posts
I love this basic information. its like a good foundation.

thanks for sharing :)
  • 0

#8
Blarm

Blarm

    Member

  • Member
  • PipPip
  • 90 posts

So let's assume that we've got two devices. One is a pc in your home (IP address: 192.168.0.2 Subnet Mask: 255.255.255.0) and one is a server out on the internet (IP address: 192.168.222.3 Subnet Mask: 255.255.255.0). How does information get from that server to your computer when you request info from this webpage with your PC?


An excellent article.

However, I thought 192.168 class C range (192.168.0.0-192.168.255.255) was not routed.
So maybe a better example might be to give the server on the internet an address e.g. 208.43.44.138.
  • 0

#9
Cl455icCh4o5

Cl455icCh4o5

    Member

  • Member
  • PipPip
  • 28 posts
this is also how hackers work
they intercept the packets until they have enough to access your system
  • 0

#10
chanchalseo

chanchalseo

    Spammer

  • Banned
  • Pip
  • 6 posts
I really love this basic information! it is great information for mine.
Thanks for the hard work.
  • 0

Advertisements


#11
dsenette

dsenette

    Je suis Napoléon!

  • Topic Starter
  • Community Leader
  • 26,047 posts
  • MVP

So let's assume that we've got two devices. One is a pc in your home (IP address: 192.168.0.2 Subnet Mask: 255.255.255.0) and one is a server out on the internet (IP address: 192.168.222.3 Subnet Mask: 255.255.255.0). How does information get from that server to your computer when you request info from this webpage with your PC?


An excellent article.

However, I thought 192.168 class C range (192.168.0.0-192.168.255.255) was not routed.
So maybe a better example might be to give the server on the internet an address e.g. 208.43.44.138.

the info is purely for example purposes...made up numbers.. so i don't thing the ranges really matter if it's a private or public ip in the example

and if you really want to you CAN route private IPs, just not to the internet

Edited by dsenette, 03 March 2010 - 08:07 AM.

  • 0

#12
Williamsc

Williamsc

    New Member

  • Member
  • Pip
  • 5 posts
Well according to me this is really very basic information of all of the people no a days. In this modern days in all of the collages as well as some of the schools are teaching the basic knowledge of it. When I read it I missed my collage days. And any child want to know more can searched on Google. So I assume that its not a new at all.
  • 0

#13
Alex Carlson

Alex Carlson

    New Member

  • Member
  • Pip
  • 6 posts
Hello,
What's the difference between a Hub, a Switch and a Router?
  • 0

#14
dsenette

dsenette

    Je suis Napoléon!

  • Topic Starter
  • Community Leader
  • 26,047 posts
  • MVP
an ethernet hub is basically just a broadcast device. it doesn't manage any of the traffic that comes through, it doesn't read the packets and decide where they go. any traffic that comes in on any port is sent out on all ports on the hub. this causes collisions in the packets which isn't good

a Switch is a smarter device. it actually inspects the packets coming in on any given port, decides who that traffic needs to go to, and only sends that traffic out on the necessary port. this reduces collisions drastically since the switch is able to keep the various "conversations" that are passing through it separate.

a Router is a device that's used to connect two dissimilar networks. basically it routes packets to where they need to go based on the ip address of the source and destination of that packet. if you're connecting two networks with different IP ranges (like your LAN and the internet) you have to have a router to transfer the packets between the two ranges.
  • 0

#15
rudi6fx

rudi6fx

    New Member

  • Member
  • Pip
  • 1 posts
Could you guys help please.

I have 2 seperate networks, one on 196.168.200.* with submask 255.255.255.0 linked to field devices and cameras and an internal network on 192.168.27.* with the same submask with abt 10 desktop pc's.

All field devices IP's are between 196.168.200.1 and 196.168.200.200 and the cameras are between 196.168.200.201 upwards.

I would like to route the 196.168.200.201 upwards (camera range) to the 192.168.27.* desktop pc's for viewing.

What will be the hardware router requirement (minimum) and how do I set it up?

Thank you
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP