|
Low
Tech Intro to TCP, IP Addresses & Default Gateways.
By Matt Western - part 2.
PC's
(or more correctly servers) on the Internet all have different
IP addresses. How are the PC's on our 1.2.3 network ever going
to be able talk to a server with an IP address of 212.88.12.22
or anything for that matter?
On our 1.2.3 network, whenever a PC needs to talk to any other
PC it can without a problem as long as it is looking for a PC
with an IP address starting with 1.2.3. But if our PC wants to
talk to a PC (or server) with an IP address of anything other
than 1.2.3, our PC will came back and say to us, "Sorry,
I can't find that PC and have no idea where to look for it, I've
given up. Better luck next time."
This
is when our default gateway steps in and saves the day.
Without
a default gateway, your PC will only look for another PC on its'
local LAN. In our example PC1 would only look for another PC on
the 1.2.3 network.
But
when we tell our PC that a default gateway is around, it will
also go out through the default gateway and look for the PC we
are trying to find outside the local (1.2.3.0) network.
Or
in other words, if a PC can't find what it's looking for in its'
local network, it will head over to the default gateway, open
the gate and step outside the local network and look on the network
on the other side of the gate.
That
is the primary function of a default gateway. Any network traffic,
or data communication that can't find its' way around the network
it is on, or can't find the PC or server it is looking for will
eventually head out through the default gateway and continue its
search on the other side.
OK,
so back to our example network.
We
have our 3 PC's all with unique IP addresses. We have connected
our network to the Internet by placing a router in the middle
that connects them both together.
But,
the folks who use these PC's wont be able to get onto the Internet
until they tell their PC's where to go to find the entry point
to the Internet and the exit point of their local network. Luckily,
these two locations can be reached by going to one spot and that
spot is the represented by the IP address of the default gateway.
So
let's give the default gateway (which is actually a connection
or port on our router) an IP address.
Just
like the IP addresses of all our PC's had to start with 1.2.3,
so does our default gateway, so let's give our default gateway
the address of 1.2.3.8.
Let's
recap.
We
have PC1 with an IP address of 1.2.3.1
We have PC2 with an IP address of 1.2.3.2
We have PC3 with an IP address of 1.2.3.3
And our default gateway has an IP address of 1.2.3.8.
Great,
we have all the IP addresses or our PC's and default gateway.
You're probably thinking "What now?"
Well do you remember earlier how I showed you how PC1 went looking
for PC2 and the two could find each other because their IP addresses
both started with the same network address? Can you remember that?
Anyway they could, take it from me, they could. And they could,
because as I said, their IP addresses, (PC1 - 1.2.3.1, PC2 - 1.2.3.2)
started with the same network address (1.2.3).
Well
what about now that we want our PC's to get onto the Internet?
Let's
say PC1 wants to talk to a server on the Internet with an IP address
of 212.88.12.22? What would it do? Where would it go? How would
it get there?
Well
now that your PC knows that a default gateway exists on the LAN
(1.2.3.8) and that it is looking for a PC or server with an IP
address that starts with a network address that is different to
its' own (212.88.12.22), it will immediately think "I'm too
smart for my own good, I am going to immediately go to the default
gateway, jump through it and look for this PC or server on the
other side".
And
that is exactly what it will do and that is exactly the function
of a default gateway. To provide an exit point for data to leave
the local network and enter a foreign network.
And
that, in a nutshell is how you get onto the Internet and why a
default gateway is so important.
Low
Tech Intro to TCP, IP Addresses & Default Gateways. - part
1
Low Tech Intro
to TCP, IP Addresses & Default Gateways. - part 2
Useful links, articles and web pages
This
appendix provides background information for readers unfamiliar
with the considerations involved in assigning IP addresses to
networks and hosts.
http://www.cisco.com/univercd/cc/td/doc/product/atm/
l2020/2020r21x/planning/appndxa.htm#xtocid87490
IP Addressing Fundamentals
In order for a network to be useful hosts must have a way of contacting
each other. The TCP/IP protocol utilizes multiple layers of addressing
to make this possible.
http://support.wrq.com/tutorials/tutorial.html
The
issue of subnetting has long been a mystery to many system administrators.
It seems that there are just too many bits, bytes, and masks involved
to make it worthwhile.
http://www.nwc.com/unixworld/tutorial/001.html
The
default gateway is a host to which local computers send data that
is destined for a non-local machine.
http://www.inetdaemon.com/tutorials/internet/ip/default_gateway.html
What
is the default gateway, and how can I find out what mine is?
In general, a gateway is simply a device on a network that acts
as an entrance to another network.
http://kb.indiana.edu/data/ajfx.html
How
Routers Work
The Internet is one of the 20th century's greatest communications
developments.
http://computer.howstuffworks.com/router.htm
A
network router is a device or a piece of software in a computer
that forwards and routes data packets along networks.
http://www.javvin.com/network-router.html
---{--} |