Remove o endereço IP da interface com as VLANs

1

No Arch Linux, tenho uma única interface Ethernet física em 2 VLANs (3 e 7) com endereços IP estáticos para as VLANs e um endereço DHCP para a interface Ethernet 'principal'.

Existe uma maneira de remover o endereço IP da eth0 e ter as VLANs? Ou existe uma maneira de atribuir eth0 a uma VLAN? Eu prefiro que isso seja feito como parte dos arquivos de configuração /etc/netctl ou /etc/systemd/network .

O resultado de ip addr é:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 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 6c:ec:eb:5c:a3:0b brd ff:ff:ff:ff:ff:ff inet 192.168.106.55/24 brd 192.168.106.255 scope global eth0 inet6 fe80::6eec:ebff:fe5c:a30b/64 scope link valid_lft forever preferred_lft forever 3: eth0.7@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 6c:ec:eb:5c:a3:0b brd ff:ff:ff:ff:ff:ff inet 10.0.0.1/24 brd 10.0.0.255 scope global eth0.7 inet6 fe80::6eec:ebff:fe5c:a30b/64 scope link valid_lft forever preferred_lft forever 4: eth0.3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default link/ether 6c:ec:eb:5c:a3:0b brd ff:ff:ff:ff:ff:ff inet 192.168.1.7/24 brd 192.168.1.255 scope global eth0.3 inet6 fe80::6eec:ebff:fe5c:a30b/64 scope link valid_lft forever preferred_lft forever

E o resultado de ip -d link é:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 6c:ec:eb:5c:a3:0b brd ff:ff:ff:ff:ff:ff promiscuity 0 3: eth0.3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 6c:ec:eb:5c:a3:0b brd ff:ff:ff:ff:ff:ff promiscuity 0 vlan protocol 802.1q id 3 <REORDER_HDR> 4: eth0.7@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default link/ether 6c:ec:eb:5c:a3:0b brd ff:ff:ff:ff:ff:ff promiscuity 0 vlan protocol 802.1q id 7 <REORDER_HDR>

    
por Clay 22.01.2015 / 20:52

1 resposta

1

Manualmente: ifconfig $DEVICE 0.0.0.0 up deve remover o IP e deixar a interface em funcionamento.

Algumas distribuições permitem essa configuração estaticamente, outras não.

Talvez você possa configurar um dispositivo bridge em vez disso.

    
por 24.01.2015 / 23:43