RE: How to use Route??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry.. Didn't finish my email .. see below 

> > -----Original Message-----
> > From: Craig White [mailto:craigwhite@xxxxxxxxxxx]
>
> > On Tue, 2003-12-30 at 23:09, Ow Mun Heng wrote:
> > > I have 2 network cards. One is a wifi eth1 and another's LAN eth0.
> > > Both of these have different ip addresses and I just need them to 
> > > be routed differently.
> > > 
> > > eg: eth1 10.0.0.1 gw 10.0.0.10   		<-company lan
> > >     eth2 192.168.0.1 gw 192.168.0.10	<- wifi/internet
> > > 
> > and you want to reach hosts on either the 192.168.0 network or the
> > 10.0.0 network, routing is handled automatically.

So.. it would know which NIC to route it to? 192.168.0 will go 
through eth2 automatically. what if I want to go to www.hotmail.com?


> 
> > 
> > You default gateway would have to be reachable by either 
> one of those devices as determined by the ip address and the subnet mask.
> 
since one is company network and the other is internet,(wifi) 
they cannot go through the same gw. They are not routeable between each
other.
company Lan will not talk to internet. Hence I think I need 2 gw/static
route

> > The reason to add static routes is if you want to reach 
> networks that are not on either of these two networks nor reachable
through your
> > default gateway...

Ah..solution to my problem. Say I want to go to www.hotmail.com, so, the
packets
will need to go through the 192.168.0 NIC(->wifi->DNS->NAT->Inet etc) to get
there right?

> > 
> > for example, company also has a remote office in Timbuktu which has a
> > network of 192.168.1.0 subnet mask 255.255.255.0  -  this network is
> > already tied into your existing network through a vpn/router 
> > scheme and you want to reach the server at 192.168.1.5
> > 
> > Since 192.168.1.5 isn't reachable with either of your network/subnet
> > mask configurations, any attempts to ping/contact 
> 192.168.1.5 will go out to your default gateway (that's why it's a default
gateway).
> > 
> > So to route your packets for 192.168.1.0 network through the company
> > router, you would need to know that ip address (i.e. 
> > 192.168.0.254) and THEN you would have enough info to set up a static
route...
> > 
> > route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.0.254 dev
eth2

I can't do a 

route add -net (ip of www.hotmail.com) netmask 255.255.255.0 gw (GW of
www.hotmail.com) dev eth2

That can't be right, right?

In a nutshell

10.0.0.10 -> gw 10.0.0.1   (company lan) eth1
192.168.0.1 -> gw 192.168.0.10 (wifi/nat/internet) eth2

So I want to go to http://intranet.company.com (ip add is 10.0.0.3), the
packets will go through eth1, through the default gw of 10.0.0.1 and reach
the intranet

if I want to go to http://www/hotmail.com how does the packets get there?
assuming of course that lan is for lan traffic only. Cannot access Internet
_at_all_ 

I hope you understand what I'm referring to.. I's kinda hard for me to
describe.

Thanks in advance for any and all help.


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux