[NTLUG:Discuss] route command.........

Richard Cobbe cobbe at directlink.net
Tue Jun 20 17:29:31 CDT 2000


Lo, on Tuesday, 20 June, 2000, clyde swann did write:

> can someone please explain; when using the 'route' command to route packets 
> to an interface (eth0, eth1, etc), what is the difference in how packets or 
> handle when the gateway option is used versus when it is not used?  example: 
>   route -add 192.168.0.1 mask 255.255.255.0 gw eth1
>   route -add 192.168.0.1 mask 255.255.255.0 eth1
> 
> the syntax may not be exactly correct in the above examples, but you get the 
> idea.  i want to know the difference in how packets are handled when the 
> 'gw' option is use, as in the first example, versus when it is not used, as 
> in the second example.  i'm just wondering does certain info get filtered in 
> the different instances?  not able to figure out why my netscape browser 
> gets thru my firewall/proxy/router ok, but can't retrieve mail using the 
> same browser.
> 

Be glad to explain this, although I'll start by saying that this probably
doesn't have anything to do with your mail problems, especially since HTTP
traffic apparently works fine.

And you're right, the syntax isn't exactly correct.  A more likely
situation is the following:

    route add -net 192.168.0.0 netmask 255.255.255.0 eth1
    route add default gw 192.168.0.1

The first command -- no gw -- says: any packet destined to a machine with
address 192.168.0.* gets routed directly to that machine, out the device
eth1.

The second command, with the gateway, establishes the default route, for
packets not covered by any of the other routing table entries.  Here, it
says to send those packets to the gateway machine 192.168.0.1, with the
assumption that it will forward them on to their destination.  Routing to
the gateway is performed as directed by the other table entries.

So, since the route tables don't distinguish based on TCP port number, it
strikes me as unlikely that an error here is causing your problems.  It's
hard to say without more info, but I'd bet on a problem in your firewall
config.  Are you letting connections to both ports 25 (SMTP) and 110 (POP3)
out?  Are you letting responses from them back in?

Richard




More information about the Discuss mailing list