首页 > Operation System, TroubleShooting > vconfig添加vlan出”error: Invalid argument”错的问题

vconfig添加vlan出”error: Invalid argument”错的问题

2009年6月3日 哈哈 发表评论 阅读评论

rhel5u3的机器
需要在一块网卡(eth0)上设上两个网段的ip地址
(交换机上已经配好,vlan id分别为10和11)
当用命令vconfig add eth0 10
的时候
系统抱错:

ERROR: trying to add VLAN #10 to IF -:eth0:- error: Invalid argument

man vconfig貌似也没有说法
后来查了下资料
才知道vconfig添加vlan
需要网络设备是up状态才行
于是明白了
ifconfig eth0 up
然后再vconfig add eth0 10
vconfig add eth0 11

就ok了
最后记得在系统里将eth0改成缺省是up状态
(改文件/etc/sysconfig/network-scripts/ifcfg-eth0中的ONBOOT参数为yes)
否则重起就没用了

原创文章,转载请注明: 转载自嘻嘻哈哈的部落格(blog)

本文链接地址: vconfig添加vlan出”error: Invalid argument”错的问题

  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word