RedHat上配置vlan:

~]$ modinfo 8021q
在ethX接口上配置vlan逻辑子接口:
DEVICE=ethX.192
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.1.1
PREFIX=24
NETWORK=192.168.1.0
VLAN=yes
DEVICE=ethX.192会自动关联到ethx上,如果不能则需要指定
PHYSDEV=ethx

采用cli:

~]# ip link add link eth0 name eth0.8 type vlan id 8

~]$ ip -d link show eth0.8
4: eth0.8@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT
     link/ether 52:54:00:ce:5f:6c brd ff:ff:ff:ff:ff:ff promiscuity 0
     vlan protocol 802.1Q id 8 <REORDER_HDR>

~]# ip link delete eth0.8

 

相关文章:

  • 2021-05-13
  • 2021-04-04
  • 2021-08-31
  • 2021-11-07
  • 2022-01-16
  • 2021-12-19
  • 2022-02-17
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2021-04-25
  • 2021-01-30
  • 2022-12-23
  • 2021-07-22
  • 2021-11-09
相关资源
相似解决方案