Link to home
Start Free TrialLog in
Avatar of academic
academic

asked on

use the ppp0 and eth0 in netscape at the same time!

 I have a linux PC redhat 7.1 and I have 2 network connections. one is eth0 through network card. another one is ppp0 through modem. both of them own their ISP access right now. my netscape is using the default eth0 to get access of internet world. can I have a easy way to swap them and make ppp0 become the default channel for netscape and use the eth0 as my local network connection only?
Avatar of iharding
iharding
Flag of United States of America image

Netscape does not care.  It relies on the network transport that the box uses, TCP/IP.  You need to check the default route and where it goes.

route (as root)

Look for 0.0.0.0, this is the default, ie, when your box does not know where else to go, it sends packets here.  You would need to have routes for all of your internal networks in the routing table as well as have the 0.0.0.0 route set to ppp0

If you need any clarification, please re-post.
Avatar of The--Captain
Don't think jharding understands that both your ppp and eth are connected to the 'net, just over different paths.

Check out the discussion here:

https://www.experts-exchange.com/jsp/qShow.jsp?ta=dslcable&qid=20129614

(in which I try to explain the concept of load-balancing between 2 providers to folks that are really having a hard time understanding this topic), and respond with any additional questions you might have.  Be patient - it's a long thread...

If your needs stray more towards the policy-routing arena (which is likely, if you want all outbound connections on port 80 to use one connection, and everything to use another), check out this (also long) thread:

https://www.experts-exchange.com/jsp/qShow.jsp?ta=linuxnet&qid=20109928

in which I answer my own policy routing question (although I gave points to Jim Levie, just for being a cool guy in general)  Also, please skip past my whining at the beginning - it is a common complaint of EE newbies (which I may have been at the time), I think.

Once again, please post back here if you have further questions/need clarification.


-Jon





listening ..
I understood fully that both routes eventually connect to the internet.

Questioner wants to access the internet through ppp0, everything else through eth0.  User NEEDS to set routing so that his/her box can decide which interface to use.

Not very hard to understand.
.. but if user is not root (has no root permissios) s/he can't set routes.
Avatar of academic
academic

ASKER

I also wana ask an additional quetions. giving the really helpful answer I will increase the points to 300.
  now I am using pppd and chat to dial the earthlink ISP.
here is the command I typed in xterm box:
pppd connect 'chat -v "" ATDT2840177 CONNECT /n login: myname Password: mypassword' /dev/modem 24000
 
I use tail -f /var/log/messages to minitor the interaction btw my linux pc and remote ISP.
I found the coversation seems ok. and I can see the ISP assign me remote IP address and my local IP address. I didn't see
them do me any DNS or gateway setting in my linux PC.
and can I go to xwindow to start netscape right away?
when I have a network internet connection before this modem
installation then even I create this modem connection to ISP I found netscape always go through the network card.
I can noy make it go throug the modem card to modem's ISP
so should I add new entry for ppp0 at routing table by route command?

now I am doing another testing: just put in modem card and no network card installed. then I will use the pppd command as decribed above to setting up connection. then I will go the xwindow and start netscape. will it work?
 


ASKER CERTIFIED SOLUTION
Avatar of iharding
iharding
Flag of United States of America image

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
jharding - I thought you didn't realize that he had two network connections because your comments did not make sense.  They still do not.  You say:

"Not very hard to understand."

Apparently it is, as you don't seem to grasp what is needed here.  Simple routing will not do the trick.  All that wil happen using your solution is that *all* traffic will still wind up using one connection, it will just switch which one when netscape is fired up.  I don't think that's what academic is looking for at all (Note the part of the title of this post that says "...at the same time!").  That is why I suggested reading up on my post(s) that pertain to advanced routing, particularly policy routing.  All that probably needs to be done here is that academic changes the default route to be through eth0, adds an exrta routing table that has a default through ppp0, add a rule to iptables/ipchains that marks outbound packets on port 80 from his netscape machine, and add a rule ('ip rule') to make all accordingly marked packets use the new routing table.

ahoffman - quite correct.  root access is needed, or academic can forget about it.

academic - did you read those posts?  Do you still require assistance?  I presume yes, if you want an example that more suits your needs...

-Jon

to iharding:
the sigle modem is working with the netscape very well now, thanks! and I am putting back the network card and reinstall the red hat 7.1 to see if both of them can be working or not.  
academic - please confirm that you want to be able to use *both* connections at the same time, and you want only traffic generated by netscape to use the ppp connection.  If so, please explain how I can further assist you.  If not, I'll let jharding take it from here.

-Jon

to The--Captain:
sorry I mislead you in this question.
what I am thinking is not really use the ppp0 and eth0 in netscapein the same time. I have read some part you "discussing link" which are really long threads and I really have no time to read all of them becoz my task is very urgent now.
yes, loadbalanceing is quite interesting and helpful to the traffic but can I do it simply in my linux box? I doubt it will take quite long time to do it.
iharding's answer is easy for me to understand at this point and won't take me too long time to read it.
so your answer is not really helpful to me this moment in this case. anyway thanks for you help!  
I apologize for the confusion (particularly to jharding).

-Jon



academic - although I suspect jharding will probably get the points here (he seems to have a better grasp of your words than I), I would be remiss without advising you that to eventually learn policy routing will be a formidable addition to your skill set (almost as handy as traffic shaping) when dealing with clients (in my case - might be a boss in your case).  Also, it's really not as tough as you think.  I have one client that has four providers and four routing tables - piece of cake!

-Jon

 
to The--captain:
I think there is nothing really tough to me But just I have no time to read that stuff this moment. yes, I agree with
you that to learn more policy routing is quite helpful to my skill set. I will read more such information after all these tasks are finished.