Hi,
I normally access the internet via a gateway on my network via my ethernet card, however, I have recently had a few occasions when I needed to temporarily access an alternative ISP using a modem. To keep things simple I thought I would use kppp to setup the dial-up connection.
The modem connects to the dial-up ISP ok, establishes a ppp link, and correctly modifies /etc/resolv.conf to point at the dial-up ISP nameservers, however I cannot ping, or reach anything over the link. If I run tcpdump I instead see that the data is still being routed through my ethernet card rather than now going through the modem.
i.e: [ian@swan ian]$ ping 80.225.253.50 PING 80.225.253.50 (80.225.253.50) from 192.168.1.232 : 56(84) bytes of data. --- 80.225.253.50 ping statistics --- 90 packets transmitted, 0 packets received, 100% packet loss
If I run netstat I see:
[ian@swan ian]$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 80.225.252.38 0.0.0.0 255.255.255.255 UH 40 0 0 ppp0 192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo 0.0.0.0 192.168.1.1 0.0.0.0 UG 40 0 0 eth0
192.168.1.1 is my ethernet network's internet gateway machine. If I manually delete this gateway entry in the routing table and add my ptp partner I get:
[ian@swan ian]$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 80.225.252.38 0.0.0.0 255.255.255.255 UH 40 0 0 ppp0 192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo 0.0.0.0 80.225.252.38 0.0.0.0 UG 40 0 0 ppp0
and can happily access the internet:
[ian@swan ian]$ ping www.bbc.co.uk PING www.bbc.net.uk (212.58.224.56) from 80.40.6.31 : 56(84) bytes of data. 64 bytes from www10.thdo.bbc.co.uk (212.58.224.56): icmp_seq=0 ttl=250 time=178.495 msec
I noticed that the kppp dial-up configuration screens have a "gateway" tab. I have set this to "Default Gateway" rather than "Static Gateway" and have also selected "Assign the default route to this gateway".
Question: What silly thing am I doing wrong (or have misconfigured) to prevent kppp changing the default gateway route from the ethernet card to the modem?
Thanks,
Ian.
PS: In case it is relevant the PC involved is running Mandrake 8.2 and kppp version 2.0.9.