I'm finally beginning to have some internet here in the Appennine alps.
No land line so I have acquired a usb gsm modem. (To be truthful, I
still don't know if it will work at the house which also has no mobile
signal, but I have a directional antenna with a 10dB gain that may fix
that...)
To the point. Trying it out where there is a gsm signal, I have got ppp
running, but cannot configure the box with the modem so that both the
LAN and the PPP work at the same time. If I 'poff', the lan sort of
works. If I 'ifdown eth1' (the wifi built into t he box), the ppp
connection resolves correctly. dhclient rewrites resolv.conf giving it
one of the nameservers of the provider (Wind), and the router/switch
address as the second nameserver. I'm not sure why. The router (D-Link
DI524) doesn't actualy seem to do any DNS (although it knows the
hostnames and IPs on the internal subnet), so that may be a part of the
problem, but the correct nameserver ought to be accessed at least some
of the time. dhclient also writes the routing table and maybe I have got
something wrong here. netstat -r gives
Destination Gateway Genmask Flags MSS Window irtt Iface
joiner.mulinoca * 255.255.255.255 UH 0 0 0 ppp0
default * 0.0.0.0 U 0 0 0 ppp0
when pppd is up. And when eth1 is up, it says
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.133.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.133.1 0.0.0.0 UG 0 0 0 eth1
with both up I get
Destination Gateway Genmask Flags MSS Windo irtt
Iface
joiner.mulinoc * 255.255.255.255 UH 0 0 0 ppp0
192.168.133.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.133.1 0.0.0.0 UG 0 0 0 eth1
joiner.mulinocarletti.net is the box with both the modem and the lan
connection. the lan as you can see is 192.168.133.x and the modem local
address insists on being 192.168.100.101. joiner has both addresses in
its /etc/hosts, which is I suppose the reason the name is shown in the
routing table rather than the IP allocated by wind.it.
I feel even more confused now, so I hope this makes sense to somebody.
I wondered if I should reconfigure the whole lan to be on the same
subnet as the Wind modem, though I cannot see why that should be
necessary.
Any ideas?
--
richard
--
Bookmark/Search this post with:
configuring ppp and lan
richard@the-place.net wrote:
> I'm finally beginning to have some internet here in the Appennine alps.
> No land line so I have acquired a usb gsm modem. (To be truthful, I
> still don't know if it will work at the house which also has no mobile
> signal, but I have a directional antenna with a 10dB gain that may fix
> that...)
>
> To the point. Trying it out where there is a gsm signal, I have got ppp
> running, but cannot configure the box with the modem so that both the
> LAN and the PPP work at the same time.
Have you consulted any of the Debian networking Howtos? If not, that should
probably be your next step. All the Howtos can be installed as a deb package,
or else read on the web. For the purposes of this reply I will presume that you
have not completed, nor are aware of, the following (non-inclusive list of)
necessary steps. Sorry if that's not a correct assumption.
You need the ethernet bridging driver (and other related drivers) installed
in the kernel, and you also have to configure iptables for packet routing,
Network Address Translation/IP Masquerading (NAT) and (optionally) port-forwarding
on your gateway machine. You will have to configure other iptables networking
features as well. In particular you will need the firewall features, unless
your router has very good firewall features (something I have not found in
cheap routers).
For DNS you can use your gateway machine as the DNS server (again with
iptables configured manually or using a program like dnsmasq), or you can
use the router or your ISP's DNS servers for name resolution, or some
combination. On my LAN, my modem/gateway-router gets the DNS server's IP
address using DHCP, and serves DNS to my Debian gateway/firewall, which in
turn serves DNS to my LAN clients. This way I never have to configure
DNS server address on my gateway, and my LAN clients are all configured to
use the gateway's IP address, which never changes, for DNS.
If I 'poff', the lan sort of
> works. If I 'ifdown eth1' (the wifi built into t he box), the ppp
> connection resolves correctly. dhclient rewrites resolv.conf giving it
> one of the nameservers of the provider (Wind), and the router/switch
> address as the second nameserver. I'm not sure why. The router (D-Link
> DI524) doesn't actualy seem to do any DNS (although it knows the
> hostnames and IPs on the internal subnet), so that may be a part of the
> problem, but the correct nameserver ought to be accessed at least some
> of the time. dhclient also writes the routing table and maybe I have got
> something wrong here. netstat -r gives
>
> Destination Gateway Genmask Flags MSS Window irtt Iface
> joiner.mulinoca * 255.255.255.255 UH 0 0 0 ppp0
> default * 0.0.0.0 U 0 0 0 ppp0
>
> when pppd is up. And when eth1 is up, it says
>
> Destination Gateway Genmask Flags MSS Window irtt Iface
> 192.168.133.0 * 255.255.255.0 U 0 0 0 eth1
> default 192.168.133.1 0.0.0.0 UG 0 0 0 eth1
>
> with both up I get
>
> Destination Gateway Genmask Flags MSS Windo irtt
> Iface
> joiner.mulinoc * 255.255.255.255 UH 0 0 0 ppp0
> 192.168.133.0 * 255.255.255.0 U 0 0 0 eth1
> default 192.168.133.1 0.0.0.0 UG 0 0 0 eth1
>
> joiner.mulinocarletti.net is the box with both the modem and the lan
> connection. the lan as you can see is 192.168.133.x and the modem local
> address insists on being 192.168.100.101. joiner has both addresses in
> its /etc/hosts, which is I suppose the reason the name is shown in the
> routing table rather than the IP allocated by wind.it.
>
> I feel even more confused now, so I hope this makes sense to somebody.
> I wondered if I should reconfigure the whole lan to be on the same
> subnet as the Wind modem, though I cannot see why that should be
> necessary.
>
> Any ideas?
>
--
configuring ppp and lan
On Mon, Nov 27, 2006 at 10:51:16PM -0500, Marty wrote:
> wrote:
> >I'm finally beginning to have some internet here in the Appennine alps.
> >No land line so I have acquired a usb gsm modem.
[...]
> > cannot configure the box with the modem so that both the
> >LAN and the PPP work at the same time.
>
> Have you consulted any of the Debian networking Howtos? If not, that
> should probably be your next step.
To be honest, I have hard-copies by my desk -- but that is in England,
and I haven't looked at them recently. Point taken. I'll look at them
via i'net.
[...]
> You need the ethernet bridging driver (and other related drivers)
> installed in the kernel,
Oh dear, I didn't think I would need to compile a special kernel. I've
had bad luck trying to do that in the past, but I suppose I can try again.
Marty, thanks for all your advice. I can see I have more days' work ahead...
But at least in less of a fog.
--
richard
--
configuring ppp and lan
Marty wrote:
> wrote:
>> I'm finally beginning to have some internet here in the Appennine alps.
>> No land line so I have acquired a usb gsm modem. (To be truthful, I
>> still don't know if it will work at the house which also has no mobile
>> signal, but I have a directional antenna with a 10dB gain that may fix
>> that...)
>>
>> To the point. Trying it out where there is a gsm signal, I have got ppp
>> running, but cannot configure the box with the modem so that both the
>> LAN and the PPP work at the same time.
>
> Have you consulted any of the Debian networking Howtos? If not, that
> should
> probably be your next step. All the Howtos can be installed as a deb
> package,
And what is that package?
--
configuring ppp and lan
Hugo Vanwoerkom(hvw59601@care2.com) is reported to have said:
> Marty wrote:
> >richard@the-place.net wrote:
> >>I'm finally beginning to have some internet here in the Appennine alps.
> >>No land line so I have acquired a usb gsm modem. (To be truthful, I
> >>still don't know if it will work at the house which also has no mobile
> >>signal, but I have a directional antenna with a 10dB gain that may fix
> >>that...)
> >>
> >>To the point. Trying it out where there is a gsm signal, I have got ppp
> >>running, but cannot configure the box with the modem so that both the
> >>LAN and the PPP work at the same time.
> >
> >Have you consulted any of the Debian networking Howtos? If not, that
> >should
> >probably be your next step. All the Howtos can be installed as a deb
> >package,
>
> And what is that package?
>
aptitude | apt-cache | wajig search howto
doc-linux-text - Linux HOWTOs and FAQs in ASCII format
note: other formats available
Wayne
--
Information Center, n.:
A room staffed by professional computer people whose job it is
to tell you why you cannot have the information you require.
_______________________________________________________
--
configuring ppp and lan
On Mon, Nov 27, 2006 at 10:51:16PM -0500, Marty wrote:
> wrote:
[...]
> >No land line so I have acquired a usb gsm (gprs) modem.
>
> Have you consulted any of the Debian networking Howtos?
[...]
>
> You need the ethernet bridging driver (and other related drivers) installed
> in the kernel,
I decided not to compile a new kernel (I am not sufficiently expert),but
to see what can be done using my stock kernel (2.6.15-26-386).
> and you also have to configure iptables for packet routing, Network
> Address Translation/IP Masquerading (NAT) and (optionally)
> port-forwarding on your gateway machine. You will have to configure
> other iptables networking features as well. In particular you will
> need the firewall features, unless your router has very good firewall
> features (something I have not found in cheap routers).
I installed and tried to configure shorewall, recommended in another
thread here recently. It is not as easy to do as it sounds, but the
manuals are good. In the end, it was not a complete success, as the
ppp0 and eth1 interfaces cannot be used at once, and shorewall start
complains:
Setting up Masquerading/SNAT...
ERROR: Unable to determine the routes through interface "eth1"
IP Forwarding Enabled
/sbin/shorewall: line 524: 6064 Terminated ${VARDIR}/.start
$debugging start
> For DNS you can use your gateway machine as the DNS server (again with
> iptables configured manually or using a program like dnsmasq), or you can
> use the router or your ISP's DNS servers for name resolution,
(trying to be brief...) The setup is like this:
usb
\ / -- --(wifi)-- -- BOX1------ gprs ) ) ) ) i'net
\/ modem
BOX2 --------- DLink
wireless
BOX3 --------- router &
dhcpserver
In theory, the router should provide DNS for the local network. They
never seem to (In London too I had to provide DNS server with bind9 on
one of the boxes with a NetGear adsl modem/firewall/dhcpserver/wifi AP).
I get no DNS service from the DLink, so I installed djbdns on BOX1. It
is supposed to garner dhcp info and provide local network resolution,
but I could not understand how, and it doesn't. In any case, dhclient
continues to write the DLink as the nameserver in resolv.conf.
To overcome the conflict between ppp0 and dhclient writing
/etc/resolv.conf and the routing table, I installed resolvconf. This
neatly collects the wrong information from the dhclient and part of the
information from ppp0 and writes and updates a special
/etc/resolvconf/run/resolv.conf which is symlinked to /etc/resolv.conf.
The result is two namservers are listed, the second nameserver of the
ISP, and the DLink router. I tried swapping the IP addresses of the
DLink and BOX1 to get BOX listed as DNS server, but dhclient/resolvconf
quickly adjusted the entry to point to the DLink.
At this point I have spent more time than I have available for this and
have to get a usable work-round. Seeing that _any_ internet connection
is better than none, I shall accept the need to operate only ppp0 or
eth1 on BOX1 and BOX2 and BOX3 will just manage with no internet
connection. To do this, I shall use the resolvconf package to divert
the misinformation from dhclient to its special file and remove the
symlink. Then I shall use a pair of simple scrits to bring up eth1 or
ppp0, and copy the appropriate pre-made file to /etc/resolv.conf. The
routing table is okay when only one interface is up. A messy hack, but
better than nothing.
Thanks Marty and thanks too to Bill Marcum.
--
richard
--
configuring ppp and lan
On Tue, Nov 28, 2006 at 12:19:15AM -0000, wrote:
>
> with both up I get
>
> Destination Gateway Genmask Flags MSS Windo irtt
> Iface
> joiner.mulinoc * 255.255.255.255 UH 0 0 0 ppp0
> 192.168.133.0 * 255.255.255.0 U 0 0 0 eth1
> default 192.168.133.1 0.0.0.0 UG 0 0 0 eth1
>
Since your wireless router is not connected to the internet, you should
not use it as a default gateway. pppd usually does not replace an
existing default route, but you can add "replacedefaultroute" to
/etc/ppp/options.
--
When you dig another out of trouble, you've got a place to bury your own.
--
configuring ppp and lan
> On Tue, Nov 28, 2006 at 12:19:15AM -0000, wrote:
>>
>> with both up I get
>>
>> Destination Gateway Genmask Flags MSS Windo irtt
>> Iface
>> joiner.mulinoc * 255.255.255.255 UH 0 0 0 ppp0
>> 192.168.133.0 * 255.255.255.0 U 0 0 0 eth1
>> default 192.168.133.1 0.0.0.0 UG 0 0 0 eth1
>>
> Since your wireless router is not connected to the internet, you should
> not use it as a default gateway. pppd usually does not replace an
> existing default route, but you can add "replacedefaultroute" to
> /etc/ppp/options.
Hmm, that sounded good for a minute. But I think the problem is that it
is dhclient not pppd that is rewriting the routes, as well as resolv.conf.
And it does this very frequently. Both the gprs modem and the AP/router
are dhcp servers, so dhclient is trying to serve two masters if both
interfaces are up. And the router is the gateway for 192.168.133.x
addresses as seen from my gateway machine. The ppp0 interface is the
gateway for everything else. so dhclient is writing nonsense. There must
be a way to configure it to avoid this. (And to get leases longer than
40sec from the wireless router, too, I hope -- it filled 2GB of log
activity yesterday. But that is another story.)
Back to the howtos...
--
richard
--