How to create a VLAN interface with an custom name

环境

  • Red Hat Enterprise Linux 6
  • initscripts-9.03.46-1.el6 or higher

问题

  • Want to create a VLAN interface without using the standard naming scheme of eth0.10
  • Is it possible to make a VLAN or rename one so its name is not limited to {device}.{vlan}?

决议

  • Create an interface configuration file in the /etc/sysconfig/network-scripts/ directory with the name ifcfg-{name} where {name} is the custom name for the VLAN interface.
  • The ifcfg file must include: the DEVICE parameter which specifies the custom interface name, the PHYSDEV parameter which specifies the interface the VLAN will be on top of, VID which specifies the VLAN ID (number), and VLAN=yes must be set. PHYSDEV can be a bond.
  • In the following example, a VLAN interface named "outside-network" will be created over eth0 with a VLAN ID of 10:
DEVICE=outside-network
VLAN=yes
PHYSDEV=eth0
VID=10
BOOTPROTO=dhcp
ONBOOT=yes

 

posted @   augusite  阅读(62)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· Open-Sora 2.0 重磅开源!
历史上的今天:
2019-09-17 centos7 如何使用ReaR进行系统备份(如何使用NFS方法设置ReaR备份)
点击右上角即可分享
微信分享提示