我的 Uni 为我的 Fedora Server 23 上的两个接口提供了两个主机名和静态 IP。我的想法是将一个主机名用于生产,将另一个主机名用于开发分支。它应该这样工作:接口上的 bio-db.uni.edueno2
具有 xxx.xxx.86.24 IP,eno1
接口上的 bio-db-dev.uni.edu 具有 xxx.xxx.86.64 IP。服务器是 CherryPy(两个实例绑定到给定的静态 IP)
我运行一个界面eno2
已经好几个月了,但是当我用 打开第二个界面时ifconfig eno1 up
,我收到 IT 部门的消息,说存在冲突:
Network access for xx:xx:xx:xx:xx:71 (bio-db.uni.edu) has been disabled at 04/26/16 15:34:54:
Reason: Host using incorrect IP address
MAC xx:xx:xx:xx:xx:71 IP xxx.xxx.xxx.64 found in rtr30 cache
Switch: switch.uni.edu
Port: 52051
它看起来有点随机:有时eno1
会被禁用,有时会eno2
,但他们总是将这两个 IP 混淆。
我该如何调试?我与 IT 人员保持联系,但也想知道我的服务器是否出了问题。哪些日志可能对我有帮助?
当 IP 由 DHCP 分配时,主机就会按预期变得可以访问,ifconfig
在我启动接口之后,它看起来就像这样:
# uname -a
Linux bio-db.uni.edu 4.3.5-300.fc23.x86_64 #1 SMP Mon Feb 1 03:18:41 UTC
2016 x86_64 x86_64 x86_64 GNU/Linux
# ifconfig eno1 <-- is 'bio-db-dev.uni.edu'
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xxx.xxx.86.64 netmask 255.255.254.0 broadcast xxx.xxx.87.255
inet6 __IPV6__ prefixlen 64 scopeid 0x20<link>
ether xx:xx:xx:xx:xx:70 txqueuelen 1000 (Ethernet)
RX packets 63597 bytes 10057016 (9.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2504 bytes 1899384 (1.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16
# ifconfig eno2 <-- is 'bio-db.uni.edu'
eno2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet xxx.xxx.86.24 netmask 255.255.254.0 broadcast xxx.xxx.87.255
inet6 __IPV6__ prefixlen 64 scopeid 0x20<link>
ether xx:xx:xx:xx:xx:71 txqueuelen 1000 (Ethernet)
RX packets 11575 bytes 1834587 (1.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 417 bytes 68578 (66.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17
已添加ip address
并ip route
列出
# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 40:f2:e9:bd:97:70 brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.86.64/23 brd xxx.xxx.87.255 scope global eno1
valid_lft forever preferred_lft forever
inet6 fe80::42f2:e9ff:febd:9770/64 scope link
valid_lft forever preferred_lft forever
3: eno2: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 40:f2:e9:bd:97:71 brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.86.24/23 brd xxx.xxx.87.255 scope global eno2
valid_lft forever preferred_lft forever
inet6 fe80::42f2:e9ff:febd:9771/64 scope link
valid_lft forever preferred_lft forever
4: eno3: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 40:f2:e9:bd:97:72 brd ff:ff:ff:ff:ff:ff
5: eno4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 40:f2:e9:bd:97:73 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.40/24 brd 192.168.0.255 scope global eno4
valid_lft forever preferred_lft forever
inet6 fe80::42f2:e9ff:febd:9773/64 scope link
valid_lft forever preferred_lft forever
6: ens1f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 90:e2:ba:b6:f7:34 brd ff:ff:ff:ff:ff:ff
7: ens1f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 90:e2:ba:b6:f7:35 brd ff:ff:ff:ff:ff:ff
8: enp0s20u13u5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 42:f2:e9:bd:97:77 brd ff:ff:ff:ff:ff:ff
inet 169.254.95.120/24 brd 169.254.95.255 scope link dynamic enp0s20u13u5
valid_lft 541sec preferred_lft 541sec
inet6 fe80::40f2:e9ff:febd:9777/64 scope link
valid_lft forever preferred_lft forever
9: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:d8:5d:36 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
10: virbr0-nic: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master virbr0 state DOWN group default qlen 500
link/ether 52:54:00:d8:5d:36 brd ff:ff:ff:ff:ff:ff
# ip route
default via xxx.xxx.86.1 dev eno2 proto static metric 100
default via xxx.xxx.86.1 dev eno1 proto static metric 101
xxx.xxx.86.0/23 dev eno2 proto kernel scope link src xxx.xxx.86.24 metric 100
xxx.xxx.86.0/23 dev eno1 proto kernel scope link src xxx.xxx.86.64 metric 101
xxx.xxx.253.244 via xxx.xxx.86.1 dev eno2 proto dhcp metric 100
169.254.95.0/24 dev enp0s20u13u5 proto kernel scope link src 169.254.95.120 metric 100
192.168.0.0/24 dev eno4 proto kernel scope link src 192.168.0.40 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1