1

On Arch Linux, I have a single physical ethernet interface on 2 VLANs (3 and 7) with static IP addresses for the VLANs and a DHCP address for the 'main' ethernet interface.

Is there a way for me to remove the IP address from eth0 and just have the VLANs? Or is there a way to assign eth0 to a VLAN? I'd prefer this to be done as part of the /etc/netctl or /etc/systemd/network configuration files.

The result of ip addr is:

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

And the result of ip -d link is:

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>

  • I am not familiar with Arch so I can just guess. Have you tried deleting the configuration for eth0? – Hauke Laging Jan 22 '15 at 20:37
1

Manually: ifconfig $DEVICE 0.0.0.0 up should remove the IP and leave the interface up and running.

Some distributions allow such a configuration statically, others do not.

Perhaps you can set up a bridge-device instead.

|improve this answer|||||
  • 2
    It would be better to use ip link / ip addr in answers as ifconfig is deprecated. – Hauke Laging Jan 26 '15 at 2:58
  • This did the trick. Making it permanent: /etc/systemd/network/eth0.network to contain: [Network] DHCP=none [Address] Address=0.0.0.0/0 – Clay Jan 26 '15 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.