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

What does "Interface xxx matches multiple shared networks" means in the context of VLANs?

· 52CE 我爱测

I have an AP which broadcasts several SSIDs tagged with different VLANs. The AP is wired to a server which manages the traffic. There are several different well documented ways to set up a DHCP server to manage such VLANs. For te…

问题原文

原帖链接 · WoJ · CC BY-SA 3.0

I have an AP which broadcasts several SSIDs tagged with different VLANs. The AP is wired to a server which manages the traffic.

There are several different well documented ways to set up a DHCP server to manage such VLANs. For testing purposes I have a tagged and non-tagged network defined on a lan0 interface:

root@srv ~# ip addr

3: lan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1b:21:5c:29:64 brd ff:ff:ff:ff:ff:ff
    inet 10.100.10.254/24 brd 10.100.10.255 scope global lan0:10
       valid_lft forever preferred_lft forever
    inet 10.10.10.254/24 brd 10.10.10.255 scope global lan0
       valid_lft forever preferred_lft forever
(...)

35: lan0.10@lan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:1b:21:5c:29:64 brd ff:ff:ff:ff:ff:ff
    inet 10.100.10.254/24 brd 10.100.10.255 scope global lan0.10
       valid_lft forever preferred_lft forever

This corresponds to the entries in /etc/network/interfaces

auto lan0
iface lan0 inet static
        address 10.10.10.254
        netmask 255.255.255.0

auto lan0.10
iface lan0.10 inet static
        address 10.100.10.254
        netmask 255.255.255.0
        vlan-raw-device lan0

I want to serve on the DHCP server both of these networks:

subnet 10.10.10.0 netmask 255.255.255.0 {
        range 10.10.10.100 10.10.10.200;
        option routers 10.10.10.254;
        option domain-name-servers 10.10.10.254;
}

subnet 10.100.10.0 netmask 255.255.255.0 {
    range 10.100.10.100 10.100.10.200;
    option routers 10.100.10.254;
    option domain-name-servers 10.100.10.254;
}

When starting the DHCP server I get

root@srv ~# /usr/sbin/dhcpd -d -f
Internet Systems Consortium DHCP Server 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 14 leases to leases file.
Interface lan0 matches multiple shared networks

What does this error message mean in the context of my configuration?

已采纳解答

原帖链接 · Mikhail Khirgiy · CC BY-SA 3.0

You have same ip address 10.100.10.254/24 on two different interfaces lan0 and lan0.10. lan0:10 is the same interface lan0. It is used to assign several ip addresses on one interface.

Your /etc/network/interfaces config is right. I think you will not give dhcp error after reboot.

Be sure that network-manager will not add second ip address on interface lan0.

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

资料来源与适用范围

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

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

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