Computing.Net > Forums > Linux > two network gateway?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

two network gateway?

Reply to Message Icon

Name: Manuel
Date: December 14, 2005 at 02:09:21 Pacific
OS: win xp pro / RH9
CPU/Ram: p4-2.53ghz; 512mb-ddr-pc2
Comment:

hi.. is it posssible to use two gateways on a linux pc? for example my eth0 is 192.168.0.2 gateway 192.168.0.1.. and for my eth1 192.168.2.2 gateway 192.168.2.1 ?

well 192.168.0.1 is configure for our wan vpn connections to our site office and 192.168.2.1 is our internet server.

is it possible to use both connection at the same time? or any suggestion how i can use them both on a single pc.. thanks



Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: December 14, 2005 at 02:56:39 Pacific
Reply:

Are you looking at bonding them together or keeping them separate?

# route add -net default gw 192.168.2.1 netmask 0.0.0.0 metric 1 eth1
# route add -net 192.168.0.0 gw 192.168.0.1 netmask 255.255.255.0 metric 1 eth0


0

Response Number 2
Name: chivas.sicam
Date: December 14, 2005 at 03:03:12 Pacific
Reply:

Yes. Just use the route command. Just specify the network you want to access and the network device that will be used to access it. Eg.
route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0

route add -net 192.168.2.0 netmask 255.255.255.0 dev eth1

Hope this helps.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: two network gateway?

How to add same IP on two network card. www.computing.net/answers/linux/how-to-add-same-ip-on-two-network-card/7276.html

Bridge two network cards www.computing.net/answers/linux/bridge-two-network-cards/19597.html

Firewall cross-domain gateway www.computing.net/answers/linux/firewall-crossdomain-gateway/4508.html