https://bugs.kde.org/show_bug.cgi?id=516709
--- Comment #8 from kodirovsshik <[email protected]> --- I'm more than glad to walk you through it. Creating a VLAN device is quite straightforward. However I should explicitly mention that the steps I've outlined below will give you limited network connectivity during some stages because after bringing down your main connection, your machine WILL NOT be able to reach anything on the network (including your router and thus the internet). This is because having a fully functioning VLAN interface requires the appropriate configuration on the network equipment. The idea here is to create a VLAN connection associated with your Ethernet connection, and then assign a static IP address to the VLAN connection, thus tricking NM into thinking the connectivity is present in some form because there's an IP address on the interface. Below are the steps to achieve this. Every command you have to modify to fit your environment is specifically annotated with "(replace ... with ...)" so that you don't accidentally miss anything. Connect your USB-Ethernet adapter and disable your WiFi connection (if that's what you're using). Find your active Ethernet interface name by running: ``` ip --color=always address ``` Your interface will likely be named something like enpXs0 (in my case it's enp2s0). Also take note of its MAC address, it will be useful later. Look for a text like this just under the line with the interface name: ``` link/ether 12:34:56:78:9a:bc ``` The "12:34:56:78:9a:bc" is an example of your MAC address. Create a VLAN device with the following command (replace enpXs0 with your interface name): ``` nmcli connection add type vlan ifname vlan1234 con-name VLAN-1234 autoconnect no dev enpXs0 id 1234 ``` Add a static IP to the VLAN interface: ``` nmcli connection modify VLAN-1234 ipv4.method manual ipv4.addresses 169.254.123.45/16 ``` Bring it up: ``` nmcli connection up VLAN-1234 ``` Next, to see the icon go "disconnected", you need to bring down your Ethernet connection. Note: YOU WON'T HAVE INTERNET CONNECTIVITY AFTER THAT, at least until bringing it back up. To find out your NM *connection name* (note: not the interface name) for the wired connection, run: ``` nmcli | grep "connected to" ``` Example output: ``` enpXs0: connected to Wired Connection 1 vlan1234: connected to VLAN-1234 ``` "Wired Connection 1" is an example of your connection name. Bring down the wired connection (you will lose internet connectivity after this command) (replace "Wired Connection 1" with your default connection name): ``` nmcli connection down "Wired Connection 1" ``` Check your networking tray icon. It should look disconnected despite the VLAN interface being configured. To verify that you did everything right, run: ``` nmcli networking connectivity check ``` It should say "limited". Bring back your Ethernet connection (replace "Wired Connection 1" with your default connection name): ``` nmcli connection up "Wired Connection 1" ``` You should have full (internet) connectivity now. You can delete your VLAN connection: ``` nmcli connection delete VLAN-1234 ``` To get a better picture of what's going on, below are steps to create a limited Ethernet connection and get the limited connection icon to see the clear difference in behavior between Ethernet and VLAN connections. The idea is the same, except this time I will show you how to create a stub Ethernet connection with an (incorrect) static IP address. Note: you will, once again, lose internet connectivity for some time. Create a second Ethernet connection (replace enpXs0 with your interface name, replace 12:34:56:78:9a:bc with your MAC address). ``` nmcli connection add type ethernet ifname enpXs0 con-name eth-stub-con autoconnect no mac 12:34:56:78:9a:bc ``` Add a static IP: ``` nmcli connection modify eth-stub-con ipv4.method manual ipv4.addresses 169.254.123.45/16 ipv6.method disabled ``` Bring the interface up (this will automatically bring down your current Ethernet connection and replace it with the stub one, thus you will lose internet connectivity): ``` nmcli connection up eth-stub-con ``` Look at your icon. It should (correctly) be the limited connectivity icon, which was not the case with the VLAN connection. Check your connectivity, it should say limited: ``` nmcli networking connectivity check ``` Bring back your Ethernet connection (replace "Wired Connection 1" with your default connection name): ``` nmcli connection up "Wired Connection 1" ``` You can delete your stub connection: ``` nmcli connection delete eth-stub-con ``` Your machine should be in the state it started in. Feel free to reach out for further instructions or if anything goes wrong. Also, in the other thread I noticed you apologized for the inconvenience of an incomplete fix. Please rest assured that it's totally okay, no worries at all! No matter if you got it perfectly on the first try or not, we all still really appreciate you taking the time to look into these problems. -- You are receiving this mail because: You are watching all bug changes.
