New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VLAN network interface not configured correctly #11921
Comments
|
Ah, you use |
#11930 should shows something like the following:
And you can see that |
Yes, you are right, the |
systemd version the issue has been seen with
Used distribution
Expected behaviour you didn't see
I have a network interface (
enp4s0
) that is configured to have two IPs (192.168.1.249/24
and192.168.5.5/24
). I want to add a virtual ethernet devicevlan1
on the same physical card to use VLAN 1 with its own IP (192.168.4.5/24
).Unexpected behaviour you saw
Both
enp4s0
andvlan1
get created but both get the same IP range (namely192.168.0.249/24
and192.168.5.5/24
). Thus, the192.168.4.0/24
subnet (in VLAN 1) is not reachable. Additionally, the IPs are now present in the wrong vlan which might cause other effects.See also my superuser question with more details on the IPs and the setup as well as some logs.
Steps to reproduce the problem
Start with a running configuration with only
enp4s0
and its IPs successfully set up. According toman systemd-netdev
create a file/etc/systemd/network/vlan1.netdev
with the contentand a
/etc/systemd/network/vlan1.network
withFuther register the vlan in the main configuration of
enp4s0
by adding (or merging)Rebooting/restarting of the network service brings up the device but with the wrong IPs attached.
Workaround
For now I found a workaround for this problem but I think there is still a problem. Either the documentation is misleading or a bug is present:
If you name the device
enp4s0.1
(name of basis interface and vlan ID) instead ofvlan1
it works. I do not know if this is due to another mechanism in the kernel or whatever. However adding the device manually (usingip
commands) everything can be set up correctly.The text was updated successfully, but these errors were encountered: