LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 01-05-2005, 01:17 AM   #1
deepalalla
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Rep: Reputation: 0
How to have two gateways on the same linux machine at the same time


Hello ,
Am using Red Hat linux 7.2
kernel 2.4.9-e.3smp
I have 2 modems attached to my linux machine and i dial out two different numbers and am able to establish 2 ppp connections i.e., ppp0 and ppp1. But only one of them acts as a gateway.I want to have both the ppp to act as gateway at the same time.Is that possible? If yes how?

Regards,
Deepa
 
Old 01-05-2005, 01:55 AM   #2
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
u want 2 gateways for same network???

after ur internet is connected ,post the O/P of

route -n

regards
 
Old 01-05-2005, 02:16 AM   #3
deepalalla
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Original Poster
Rep: Reputation: 0
O/p of route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
190.0.0.253 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
195.0.0.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1
172.16.0.0 0.0.0.0 255.255.255.240 U 0 0 0 eth0
3.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 190.0.0.253 0.0.0.0 UG 0 0 0 ppp0



ouput of ifcong ppp0 :

ppp0 Link encap:Point-to-Point Protocol
inet addr:190.0.0.100 P-t-P:190.0.0.253 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1504 Metric:1
RX packets:130 errors:0 dropped:0 overruns:0 frame:0
TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:165664 (161.7 Kb) TX bytes:7135 (6.9 Kb)

ouput of ifcong ppp1 :


ppp1 Link encap:Point-to-Point Protocol
inet addr:195.0.0.100 P-t-P:195.0.0.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1504 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:74 (74.0 b) TX bytes:89 (89.0 b)
 
Old 01-05-2005, 02:19 AM   #4
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
that is fine but how do u intend to use both connections
do u want to setup one for current use and other for backup??

regards
 
Old 01-05-2005, 02:31 AM   #5
deepalalla
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Original Poster
Rep: Reputation: 0
my requirement is to simultaneously connect to two different networks(190.0.0.253 network and 195.0.0.254 network) using dial up connection (which am able to) and then download the some files from both the network. The key thing is should be able to connect simultaneously so as to have optimium usage of bothe the modems.

Now since only one of ppp either ppp0 or ppp1 is acting as gateway can download file only from one network.

I want to download file from both the n/ws.

Regards and Thanks
 
Old 01-05-2005, 05:45 AM   #6
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

what i think u can do i

add both networks as default
now how to choose which network will depend on on how the address is resolved
for that u should put an entry for nameservers of both networks
in ur resolv.conf
like this

nameserver <ipaddress of DNS of 192.168.0.253>
nameserver <ipaddress of DNS of 192.168.0.254>

now if a address is looked upon, then it will follow the gateway whose DNS resolves it

i am not sure if this works , meanwhile i will lookout for more on this

regards
 
Old 01-05-2005, 06:22 AM   #7
deepalalla
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Original Poster
Rep: Reputation: 0
I cannot add manually to the resolv.conf because the connection is dial up and the ip address will be dynamic and not constant. I want that when a ppp is established it should automatically be taken up as gateway...
here i had given example of 2 ipaddress ,there will be thouands(it's not exaggeration) different n/w but i have only 6 modems with me so i want that i can connect to 6 n/w at a time simultaneously...
 
Old 01-05-2005, 07:02 AM   #8
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
" I cannot add manually to the resolv.conf because the connection is dial up and the ip address will be dynamic and not constant "

regarding this
the DNS servers are fixed
that do not change, infact ur IP provided by the ISP is changed each time

regards
 
Old 01-10-2005, 12:20 PM   #9
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hey i found this for ur query

http://tldp.org/HOWTO/Adv-Routing-HO...loadshare.html

hope it helps

regards
 
Old 01-11-2005, 04:51 AM   #10
deepalalla
LQ Newbie
 
Registered: Jul 2004
Posts: 10

Original Poster
Rep: Reputation: 0
in my case the destination ip is not fixed . it will keep on changing (i cant have static routing) there are thousands of destinations which i have to dial up in a day and hence i have got multiple modems so i can dial out simultaneously.However am unable to have two or more active gateways at the same time (and am having dial up and not lan or wan connection)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Machine Running Time Renegade498 Linux - General 2 02-01-2006 08:02 AM
Squid+2 Networks+2 Gateways+same Machine?! pin_bk Linux - Networking 6 09-03-2005 02:22 PM
logging from network to linux machine takes longer time R0nIn Linux - Newbie 2 05-06-2005 03:51 AM
using dual gateways on my linux box .. miamitj Linux - Networking 4 04-26-2004 12:40 PM
Using SMB to copy files from one linux machine to second linux machine. coppersky Linux - Networking 9 06-24-2003 12:07 PM


All times are GMT -5. The time now is 06:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration