I have Motion running on my Pi.
I want to be able to access the Motion interface/feed (hosted on <pi ip>:8081
) to be accessible both via WiFi and via Ethernet with a static address and DHCP for both the interfaces. I would also prefer to keep them isolated from each other/not have them bridged.
Have configured wlan0
to act as a wireless access point (as give in this guide, but without the Routing/Masquerade).
This worked as expected.
After this I tried doing the same for Ethernet, so I also added a static address for eth0
to /etc/dhcpcd.conf
and added entry to enable dnsmasq
for eth0
(via a file in etc/dnsmasq.d/
).
The static address for eth0
is different from wlan0
and so are the dhcp-range
.
I can only access via one of the interfaces at a time. So if I boot up the Pi connected with the Ethernet, I can access Motion on the Pi (via Ethernet). However, access via WLAN fails. On the other hand, with Ethernet unplugged I can access Motion via WLAN.
How do I enable both the Eth and Wlan to work independently with DHCP and static IP on both of them to access Motion on the Pi?
Also, is it possible to have the same static IP address for both the interfaces?
Edit: Output of various commands as asked by @eftshift0:
$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:c3:d7:6b brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:96:82:3e brd ff:ff:ff:ff:ff:ff
$ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:c3:d7:6b brd ff:ff:ff:ff:ff:ff
inet 192.168.0.1/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::f98e:1b2a:d923:6474/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:96:82:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.2/24 brd 192.168.0.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::496:128:e7ec:f5b0/64 scope link
valid_lft forever preferred_lft forever
$ netstat -lntp | grep 8081
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN -
Motion
interface easily accessible - any user just has to point to a fixed IP without needing to figure out IP addresses. – Kanchu Jul 30 '18 at 16:45ip link show
ip addr show
ip route show
. Then what do you see when you run this?netstat -lntp | grep 8081
. You can add the output to your question. – eftshift0 Jul 30 '18 at 17:17ip addr show
. Both interfaces are on the same subnet192.168.0.0/24
. – Ingo Jul 30 '18 at 19:00