my first post here,
I have small problem with bellow.
I have rpi up and running with wifi ( TP-LINK TL-WN725N V2)
I need to use mu eth0 to connect to my TV and use internet connection from rpi
seems to be nothing special, a lot of cases like this, just different direction, I need from wifi to Lan and additionally dhcp on eth0.
so. what I have in my setup.
all code below is with wifi connected and LAN unplugged.
Code: Select all
root@raspberrypi:~# ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:53:66:38
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:612 (612.0 B) TX bytes:612 (612.0 B)
wlan0 Link encap:Ethernet HWaddr c0:4a:00:13:26:73
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12518 errors:0 dropped:356 overruns:0 frame:0
TX packets:7423 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1915397 (1.8 MiB) TX bytes:2520390 (2.4 MiB)
root@raspberrypi:~#
Code: Select all
/etc/dhcp/dhcpd.conf
subnet 10.0.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.0.0.1;
range 10.0.0.100 10.0.0.110;
default-lease-time 86400;
max-lease-time 86400;
}
Code: Select all
root@raspberrypi:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 10.0.0.1
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Code: Select all
root@raspberrypi:~# cat /etc/default/isc-dhcp-server
# Defaults for isc-dhcp-server initscript
# sourced by /etc/init.d/isc-dhcp-server
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
#DHCPD_CONF=/etc/dhcp/dhcpd.conf
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
#DHCPD_PID=/var/run/dhcpd.pid
# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0"
root@raspberrypi:~#
now, the issue
Code: Select all
root@raspberrypi:~# /etc/init.d/networking restart
[....] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfac[warn. (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/c0:4a:00:13:26:73
Sending on LPF/wlan0/c0:4a:00:13:26:73
Sending on Socket/fallback
DHCPRELEASE on wlan0 to 192.168.1.1 port 67
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
done.
Listening on LPF/wlan0/c0:4a:00:13:26:73
Sending on LPF/wlan0/c0:4a:00:13:26:73
Sending on Socket/fallback
DHCPRELEASE on wlan0 to 192.168.1.1 port 67
why on wlan0 ? I need on eth0
the second issue
if I will plug lan now (eth0)
wlan0 is disconnected.