You are on page 1of 1

How to do it...

For the sake of ease, our physical network interface is called etho. The VLAN's ID is 1,
and the IPv4 address is 10. o. 0.2, with a subnet mask of 255.0.0.0 and a default gateway
of 10.0.0.1.

Creating the VLAN connection with nmcli


With nmcli, we need to first créate the connection and then actívate it. Perform the
following steps:

1.Créate a VLAN interface using the following command:


enoi \B^
~^# nmcli connection add type vían dev ethe id 1 ip4 16.0.6.2/8 gw4
^_ ie.0.0.!
Connection 'vían' (4473572d-26c0-49b8-ala4-c20b485dad0d) successfully
added.
-]#

2.Now, via this command, actívate the connection:

-]# nmcli connection up vían


Connection successfully activated (D-Bus active path:
/org/freedesktop/NetworkHanager/ActiveConnection/7)
-]#

3.Check your network connection, as follows:

~]# nmcli connection show


-]# nmcli device status
-]# nmcli device show etho.l

Here is an example output of the preceding commands:

Creating the VLAN connection with nmtui^\\


The nmtui tool is a text user interface to NetworkManager and is launched by executing the

You might also like