Link to home
Start Free TrialLog in
Avatar of thedogeater
thedogeater

asked on

the default gateway

Consider the following

Host a workstation
Host b default router

If host a wants to wants to surf the
web it need to route its packed through
host b ( am I right so far )
How does it do this?
Is host b listening to every port and
relaying the incoming packets?

Or does host a know that it need
to use the default host as it can
see it does not know the route by
examine its routing table and so
change the way it sends its requests?

Also how do you know why routing
Protocol your network is using
RIP, IGRP, OSPF, other?



ASKER CERTIFIED SOLUTION
Avatar of Steve Jennings
Steve Jennings

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Steve Jennings
Steve Jennings

I should have added that the assumption is also that your default router (10.1.1.254 in my example) has a route to the internet.

Steve
Avatar of thedogeater

ASKER

Ok thanks for that

but why do you say logical network and not just IP?
is there something subtle I am missing.

And the middle part of my question, when you workstation has decided it needs to use the default gateway
does it just set one of the IP headers?
How does the router listen out for these packets is
there a service running listeing to everthing?
When you bind an ethernet driver to an interface card whether it's a router or a workstation, that driver "listens" for its own ethernet address on the network.

When you send a packet from 10.1.1.5 to 99.99.99.99, which is not on your network, then your workstation refers to its own routing table and sees that (a) it doesn't have a route to 99.99.99.99 but (b) it does have a default route through a gateway. Your workstation the creates an ethernet header WITH THE DESTINATION HARDWARE ADDRESS OF THE GATEWAY and a destination IP address of 99.99.99.99 . . .

You need to read about ARP to understand what's going on. Im too lazy to give you much more than the two paragraphs above. At least for now.

By the way: to me "IP network" can mean multiple segments or logical networks. And by "logical" I mean that they are physically connected but require the logic of firmware and software to enable communications among stations . . . or something like that.

Good luck.
Steve
Steve's explaination here is very good.  I would add one more thing.  There is a way that a host can operate with a router that it does not have programed as it's default gateway.  This is a very bad thing and should never be done unless you have a stupid device that can't handle a routing table/default gateway.  It's a feature called proxy arp.  

Basically when you do this, the router will arp in proxy for every host on the internet.  This allows the client to operate without a routing table because it keeps asking where is 1.2.3.4 or whatever and the router who address is actually say 5.3.87.323 or whatever says, yeah.... I'm 1.2.3.4 also.  It does this for every host on the internet that any of the devices on it's LAN ask for.  From the perspective of the hosts on the LAN, they think the entire internet is on the local LAN and it makes very big ARP tables and a lot of a ARP traffic on the LAN.  

Like I said, this is not a good thing and that is why you should almost always see something like "no ip proxy-arp" on the ethernet config of a router.
I am reading up on the Address Resolution stuff
can you suggest any good links?
I'd buy the Richard Stevens' book on TCP/IP. Here's a link:

http://www.amazon.com/exec/obidos/ASIN/0201633469/yosemitewebindex/102-8350974-4044122


Good luck.
Steve