Debian - ifconfig

Aus Carl-Christian Sautter - Wiki
Wechseln zu: Navigation, Suche

VLAN

VLAN Example 1

# The loopback network interface
auto lo
iface lo inet loopback
iface lo inet6 loopback

# eth0 network interface
auto eth0
allow-hotplug eth0
iface eth0 inet manual
    pre-down ethtool -s $IFACE wol g

# VLAN ID 2
auto eth0.2
iface eth0.2 inet static
    address 192.168.5.5
    gateway 192.168.5.1
    netmask 255.255.255.0
    vlan-raw-device eth0
    dns-nameservers 192.168.5.1 8.8.8.8
    dns-search sarve.de
    pre-down ethtool -s $IFACE wol g

# VLAN ID 4
auto eth0.4
iface eth0.4 inet static
    address 192.168.6.2
    netmask 255.255.255.0
    vlan-raw-device eth0

VLAN Example 2

# 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
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 192.168.179.220
    netmask 255.255.255.0
    gateway 192.168.179.1
    dns-nameservers 192.168.179.1 8.8.8.8

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

auto eth1
allow-hotplug eth1
iface eth1 inet manual
    pre-up ifconfig $IFACE up
    post-down ifconfig $IFACE down

# VLAN ID 4
auto eth1.4
iface eth1.4 inet static
    address 192.168.6.3
    netmask 255.255.255.0
    vlan-raw-device eth1