Wednesday, July 19, 2017

Raspberry static IP + dhcp

Edit /etc/network/interfaces

and put this


# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo eth0 eth0:0
iface lo inet loopback

iface eth0 inet dhcp

iface eth0:0 inet static
address 192.168.250.254
netmask 255.255.255.0


allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

DHCP client timeout

Edit /etc/dhcp/dhclient.conf

uncomment the line #timeout 60

No comments:

Post a Comment