Re: How to set up "wireless repeater" with Network Manager 0.7?



On Thu, 2009-06-18 at 10:09 -0400, Jacob Beard wrote:
> Hi Herbert,
> 
>    You're right, generally a "repeater" implies a Layer 2 construct,
> and I am certainly trying to use NetworkManager to create a layer 3
> NAT. I used the term "repeater", because it seemed the most concise
> way to explain what my goals were, however I probably should have just
> said: to share internet from one wireless card to another via a layer
> 3 NAT, using NetworkManager to configure the NAT. From now on, I'll
> call the "repeater" a "router" as that seems to imply Layer 3 NAT.
> 
>    Given that the connection sharing fails in the way I described (the
> "repeater"/"router" nominating itself as nameserver, but failing to
> forward DNS requests), should I file a bug report? If so, would it be
> better to file it upstream, with you, or downstream, with my distro?
> 
>    Finally, in terms of searching for a quick fix to work around this
> probable bug, could anyone tell me if it is possible to configure the
> nameservers that are served by NetworkManager via DHCP/dnsmasq?

On the shared (ie, NAT-ed) network, NetworkManager sets up both a DHCP
server and a forwarding-dns server using dnsmasq.  The DHCP server
serves the repeater's address as the DNS server, and dnsmasq (which is
the DNS server too) then forwards the connection on to the real DNS
server, which should be what the repeater got when it did DHCP on the
first NIC.

The first thing I'd to is look at the firewall and ensure you don't have
rules that are dropping the forwarded DNS frames going out from the
repeater to the actual upstream nameserver. 

So, say I have NIC A and NIC B.

NIC A connects to a wifi access point, that AP sends 4.2.2.1 as the
nameserver, and NIC A has IP address 192.168.0.10.

NIC B is the "shared" NIC; NM will set up an adhoc network on NIC B,
assign an IP address in the 10.42.4x.x range (lets say it has
10.42.43.1), and start up dnsmasq on that 10.42.43.x subnet.  The
10.42.43.x subnet gets NAT-ed to the 192.168.0.x subnet.  dnsmasq is set
to forward DNS queries that it gets from 10.42.43.x to the upstream
nameserver that NIC A got via DHCP, ie to 4.2.2.1.

Thus, clients connecting to the adhoc network on 10.42.43.x subnet send
DNS queries to the repeater's NIC B address (10.42.43.1), and dnsmasq
forwards those queries up to 4.2.2.1, and relays the reply back to the
client on 10.42.43.x.

That's pretty standard NAT setup actually.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]