脚本宝典收集整理的这篇文章主要介绍了How do I set up VLAN (802.1q) tagging on a network interface?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
RHEL 7 with NetworkManager
With nmcli
, create a new connection of the VLAN tyPE where con-name
is the name of the connection, ifname
is the name of the VLAN interface to be created, master
is the name of the interface the VLAN will be on top of, and id
is the VLAN ID (number).
Using DHCP for IP addressing with a VLAN ID of 10:
# nmcli connection add type vlan ifname eth0.10 con-name myvlan id 10 dev eth0
# nmcli connection add type vlan ifname eth0.10 con-name myvlan id 10 dev eth0 ip4 192.168.1.10/24 gw4 192.168.1.1
RHEL 4, RHEL 5, RHEL 6, and RHEL 7 without NetworkManager
ifcfg-eth0.10
. DEVICE=eth0.10
VLAN=yes
BOOTPROTO=dhcp
ONBOOT=yes
RHEL 6 with a custom VLAN interface name
See How to create a VLAN interface with an custom name
以上是脚本宝典为你收集整理的How do I set up VLAN (802.1q) tagging on a network interface?全部内容,希望文章能够帮你解决How do I set up VLAN (802.1q) tagging on a network interface?所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。