I'm having difficulty framing this question due to only a basic knowledge of networking - be gentle with me, I'm a country boy.
My Home network is set up with the usual wireless/Ethernet router talking to the ISP, handling DHCP and I think, forwarding DNS requests to the ISP's DNS Servers.
Our living room is on the third floor and the router is on the ground floor - effectively there is hardly any wireless coverage on the top floor. What I do have though is an CAT5e Ethernet cable from the router to the top floor, and I've got my Ubuntu 15.10 machine plugged into this with an NIC as eth0.
There's also a wireless card in the Ubuntu machine, so I set the Linux box to act as a wireless access point with "create_ap". Create_ap works brilliantly with the (mostly) default settings (I changed the channel to 3 to avoid the neighbour's signals). I now have a really great fast wifi signal from the top floor. Create_ap is working in NAT mode.
The problem is that the newly created access point seems to set itself up as (I think) a gateway on a different subnet? Sketchy on the terminology here sorry but the main Ethernet DHCP is issuing IP's in the 192.168.1.x range and the create_ap is operating it's own DHCP server issuing IP's in the 192.168.12.x range.
Ordinarily, this isn't a problem for almost all of the uses on the network, we can connect our smartphones and surf, email etc.
My specific problem is we have an apple TV box connected to the Ethernet 192.168.1.x network. We would like to airplay/screenmirror from our smartphones to the appleTV box, but we can't because they are not on the same 'network'.
I'm assuming this means that to fix the problem we need both the smartphones and the AppleTV to be given IP's within the same range. (ie. 192.168.1.x).
Attempted fixes:
I configured create_ap to set up the access point with an ip address of 192.168.1.3 as the gateway and issue IP's in the range 192.168.1.5-254. Predictably this didn't work - thinking about it, I've then got two DHCP servers on the same domain. Think I can ping to 192.168.1.1 but web browsing results in 'no dns server'
I then changed the main router to only issue DHCP IP's in the 192.168.1.5-199 range and the create_ap to use 192.168.1.1 as a gateway and issue from 192.168.1.200-220 range. This didn't work either.
Similar to 2 except I told create_ap to use 192.168.1.3 as the gateway IP.
I have a notion that the problem might be solved if I could just use the main router for DHCP and make the access point just forward any DHCP requests to the main router. Is this what a bridge is? create_ap has a 'bridge' mode rather than NAT. My limited knowledge rather stops at what a bridge is, what it might be used for and how it might be useful.
Or is there a way of spoofing the smartphone IP's so they look like they are on the 192.168.1.x network?
Many thanks for any thoughts.
Here's the output of ifconfig in the configuration that provides internet access to the smartphones but won't connect to the apple TV.
enp3s0 Link encap:Ethernet HWaddr c8:60:00:53:e2:73
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ca60:ff:fe53:e273/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5850994 errors:0 dropped:17 overruns:0 frame:0
TX packets:3710716 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7924568585 (7.9 GB) TX bytes:1160978370 (1.1 GB)
wlp4s6 Link encap:Ethernet HWaddr 80:1f:02:4f:17:0a
inet addr:192.168.12.1 Bcast:192.168.12.255 Mask:255.255.255.0
inet6 addr: fe80::821f:2ff:fe4f:170a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:95836 errors:0 dropped:14 overruns:0 frame:0
TX packets:133242 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8354049 (8.3 MB) TX bytes:179933721 (179.9 MB)
Update: So I attempted a bridged connection with:
sudo create_ap -m bridge wlp4s6 enp3s0 AP-NAME MYPASSWORD
which creates a br0 interface with the following ifconfig output.
br0 Link encap:Ethernet HWaddr 80:1f:02:4f:17:0a
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ca60:ff:fe53:e273/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:0 overruns:0 frame:0
TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18583 (18.5 KB) TX bytes:57372 (57.3 KB)
This has the effect of breaking browsing from the linux machine (returns "This site can’t be reached www.google.co.uk’s server DNS address could not be found." on chrome. But I can ping the router 192.168.1.1 and my smartphone seems to be able to browse the internet just fine???
This is looking like a dns issue on the ubuntu machine when using the br0 interface. I can ping the router, and browse to it using 192.168.1.1. I can also ping google's dns server 8.8.8.8 so I've got traffic I think, just not DNS.
How do I get the DNS working for the ubuntu machine when running the access point?