LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 06-17-2001, 01:42 AM   #1
rproffit
LQ Newbie
 
Registered: Jun 2001
Posts: 3

Rep: Reputation: 0

I'm trying to set up my Red Hat 7.1 Linux box to be a gateway to my DSL connection. I've got two ethernet cards, one going to the DSL modem (eth1), and the other to my hub (eth0). Linux recognizes and configures both ethernet cards, and successfully starts the Roaring Penguin PPPoE client. But I cannot ping any external internet sites, either using their domain name or IP address. The output from route shows my default destination's gateway is my internal LAN card (eth0), not my ppp0 connection, as the DSL-HOWTO shows in section 3.2.3. I'm pretty sure thats the problem, but I don't know what to do now. My DSL IP is dynamic, so I can't just hard code it. Below is the output from route and ifconfig. Thanks in advance for any help.

Code:
route:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
216.249.74.1    *               255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.1.254   0.0.0.0         UG    0      0        0 eth0

ifconfig:
eth0      Link encap:Ethernet  HWaddr 00:10:B5:B7:1F:EF  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 

eth1      Link encap:Ethernet  HWaddr 00:04:5A:4A:9B:8A  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:40 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:216.249.74.126  P-t-P:216.249.74.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
 
Old 06-17-2001, 12:04 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
two or three days ago i asked pretty much the same question. I'd presume that you can successfully run:

route del default gw 192.168.blahhhhhhh

to remove the gateway. if you can, then the route output should change, (probably able to use dns to give the ppp0 connection a name rather than just IP number. My problem was that i couldn't suss how to remove the eth gateway. someone lovely on here said it was in /etc/sysconfig/network (rh71). knock the GATEWAY= line on the head, and restart the network. Of course... if that lines not in there, i'm not erally of much use...!

chris
xxxx
 
Old 06-17-2001, 06:20 PM   #3
rproffit
LQ Newbie
 
Registered: Jun 2001
Posts: 3

Original Poster
Rep: Reputation: 0
In my /etc/sysconfig/network-scripts/ifcfg-eth0 file I found a line with GATEWAY=. I removed it and restarted the network and the problem was solved. Thanks.
 
Old 12-17-2007, 05:29 AM   #4
mihaib
LQ Newbie
 
Registered: Dec 2007
Posts: 1

Rep: Reputation: 0
Lightbulb Another solution

I had the exact same issue on Debian with the pppoe driver as it was being set up by the pppoeconf script. I couldn't ping a known IP directly, but it worked when running

ping -I ppp0 <ip_address>

So it was also a default route issue.

The solution for me was to add the command "replacedefaultroute" to /etc/ppp/peers/dsl-provider. Here "dsl-provider" is just the filename of the pppd config file that sets up the connection, it might be different for you.

Also note that you have to have *both* "defaultroute" (which is usually on) and the "replacedefaultroute" in there. It took me a while to realise that.

Good luck, all.
 
  


Reply



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
How can I tell what my default gateway is currently set as? abefroman Linux - Networking 6 09-10-2005 12:15 PM
Unable to ping other than default gateway senthilpr_in Linux - Networking 6 08-17-2005 07:42 PM
How do i set ppp0 as default gateway for internet sharing in Redhat? Julian_Thong Linux - Networking 11 08-18-2004 06:54 PM
Can ping network but can't ping any internet ip when I hard set the ip Streme Linux - Wireless Networking 4 04-13-2004 09:18 AM
Slow ping time to Linksys Default Gateway (RH 7.1) abell Linux - Networking 4 10-01-2001 10:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration