Re: ppp- and dns-problem
Am Sonntag, 29. April 2001 01:27 schrieb Peter Cordes:
> On Sat, Apr 28, 2001 at 10:17:21PM +0200, Vincent Laisney wrote:
> > Hi,
> > I have a problem for the configuration of ppp (pppd) with a combi-card
> > modem+ethernet. I use either ethenet or a ppp-connection with an ISP.
> > I have tried wvdialconfig for the configuration and i could not resolve
> > the
> > domaines names. I have also tried pppconfig (where it is possible to
> > specify
> > a static-dns-server. But it doesn't work. With
> > netstat -rn
> > I get no default line.
> > I have tried to set up directly a route with
> > route add default gw 18.104.22.168
> > and I get the following error
> > SIOCADDRT: Network is unreachable
> BTW, SIOCADDRT == Socket IO Control: Add Route. (io control = ioctl())
> This error happens if the gateway you are trying to add to the routing
> table wasn't already reachable through some other entry in the routing
> table. i.e. on an ethernet, if you have eth0 with an IP address of
> 10.0.0.15, (netmask 255.0.0.0 (/24)), then your routing table before you
> add the default route will be:
> Destination Gateway Genmask Flags Metric Ref Use
> Iface 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0
> 0 eth0
> If I ran route add default gw 192.168.0.1, it won't work, because the
> kernel doesn't know how to reach that host. That makes it pretty hard to
> start sending all our packets through it, doesn't it :)
> After running route add default gw 10.0.0.1, it will be:
> 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
> eth0 0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0
> 0 eth0
> If you're using ppp, you should just tell pppd to set a default route. It
> has an option to do this, called defaultroute. Just add that to your
> /etc/ppp/options, or /etc/ppp/peers/filename.
> If you want to manually add a default route with ppp, the gateway you
> specify _must_ be the ppp peer, i.e. the IP that ifconfig ppp0 shows as the
> Point-to-point IP. (If you already added a non-default route with the
> ppp peer as the gateway, you still have to use the ppp peer as the gateway.
> There is no way to ask a host that you can't reach directly to forward a
> packet for you, since there is no way to tell the first hop router who to
> forward to, other than the final destination. Think about it. Or don't if
> this isn't what you were trying to do, since it's not easy to understand
> unless you know networking :)
> Also, why were you talking about DNS in the start of your message, then
> switched to talking about routing. The route command has nothing at all to
> do with DNS. It will use DNS if you give host names instead of IPs, but
> that's all. The routing configuration affects whether DNS will work or
> not, because the servers you specify in /etc/resolv.conf must be reachable,
> but that's all there is in terms of interaction between routing and DNS.
Thank you for your very informative answer.
I couldn't use the dns (and therefore I couldn't do anything in Internet)
because the routing table were false.
When the ethenet is not running the ppp works now fine for me (I have posted
the result of netstat -rn in a preceding message).
I have now now two scheme for pcmcia as following (in
case "$ADDRESS" in
# Transceiver selection, for some cards -- see 'man ifport'
# Use /sbin/pump for BOOTP/DHCP? [y/n]
# Host's IP address, netmask, network address, broadcast address
and with the "scheme home", ethernet doesn't run and so I can run ppp without
to have to shutdown eth0 with
ifconfig eth0 down