大网数据广告活动
服务器运维问答

Debian: Vlan interface does not come up

· 52CE 我爱测

I have a vlan configured for my network interface. Since last reboot this does not come up anymore and if I try to start it manually, it fails sudo ifup eno1.4000 RTNETLINK answers: File exists ifup: failed to bring up eno1 ifup:…

问题原文

原帖链接 · papanito · CC BY-SA 4.0

I have a vlan configured for my network interface. Since last reboot this does not come up anymore and if I try to start it manually, it fails

sudo ifup eno1.4000
RTNETLINK answers: File exists
ifup: failed to bring up eno1
ifup: could not bring up parent interface eno1

My os is debian 10 and this is my config:

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eno1
iface eno1 inet static
  address xxx.xxx.xxx.xxx
  netmask 255.255.255.224
  gateway xxx.xxx.xxx.xxx
  up route add -net xxx.xxx.xxx netmask 255.255.255.224 gw xxx.xxx.xxx.xxx dev eno1

iface eno1 inet6 static
  address xxxx:xxxx:xxxx:xxxx::x
  netmask 64
  gateway fe80::1

auto eno1.4000
iface eno1.4000 inet static
  address 192.168.100.4
  netmask 255.255.255.0
  vlan-raw-device eno1
  mtu 1400a

bootlog shows

Aug 19 17:08:50 xxxx ifup[820]: ifup: failed to bring up eno1
Aug 19 17:08:50 xxxx ifup[820]: RTNETLINK answers: File exists
Aug 19 17:08:50 xxxx ifup[820]: ifup: failed to bring up eno1
Aug 19 17:08:50 xxxx ifup[820]: ifup: could not bring up parent interface eno1

已采纳解答

原帖链接 · Diana · CC BY-SA 4.0

ifup: could not bring up parent interface eno1 suggests that there is some error when bringing up eno1. I suppose it's because your up command fails, so you could try using post-up instead or remove it, then run that command manually to check for possible issues.

By the way, you don't need to use vlan-raw-device, here is a note from Debian network configuration reference:

Note: If you name your VLAN interfaces ethX.YYY, then there is no need to specify the vlan-raw-device, as the raw device can be retrieved from the interface name.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-08-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。