Skip to content

Instantly share code, notes, and snippets.

@nullx5
Last active October 16, 2024 22:05
Show Gist options
  • Save nullx5/dc23a5237523b4512cd7516988b77083 to your computer and use it in GitHub Desktop.
Save nullx5/dc23a5237523b4512cd7516988b77083 to your computer and use it in GitHub Desktop.

crear interface interfaz link VLANs en linux 8021q

sudo lsmod |grep 8021q
sudo modprobe 8021q

sudo modinfo 8021q |more


# crear una interfaz VLAN en una interfaz física
sudo ip link add link wlp2s0 name vlan10 type vlan id 10


# Activar la interfaz VLAN
sudo ip link set vlan10 up




# Asignar una dirección IP a la VLAN (opcional)
sudo ip addr add 10.10.10.10/24 dev vlan10

# verificar que la VLAN se haya creado correctamente
ip -d link show vlan10
ip -c a


# eliminar la interfaz VLAN creada
sudo ip link delete vlan10



@nullx5
Copy link
Author

nullx5 commented Oct 16, 2024

Tipos de interfaces de red en linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment