Ubuntu PC 无法使用 DHCP 服务器配置 IP 地址

Ubuntu PC 无法使用 DHCP 服务器配置 IP 地址

我们正在尝试在学院内设置 VLAN 网络。我们有Cyber​​oam 防火墙 (型号 CR300iNG)我们已经配置了 VLAN 和 DHCP 服务器。当我们通过 VLAN 网络连接任何 Ubuntu PC 时,它会从 DHCP 服务器获得带有 IP 地址的 DHCP 回复,但无法自行配置。另一方面,Windows PC 正在获取 IP 地址。如果我们将 PC 连接到防火墙的非 VLAN 端口,Ubuntu 和 Windows 机器都会毫无问题地获取 IP 地址。

这里有两种情况:

场景 1:PC-->非管理型交换机-->防火墙的非VLAN端口

场景 2:PC --> L2 管理交换机 -> 防火墙的 VLAN 端口

输出tcpdump命令场景 1如下

16:36:30.447344 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from e0:d5:5e:83:84:00 (oui Unknown), length 300 16:36:30.455838 IP 192.168.0.1.bootps > 192.168.0.83.bootpc: BOOTP/DHCP, Reply, length 300

输出tcpdump命令场景 2如下

16:38:37.278831 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from e0:d5:5e:83:84:00 (oui Unknown), length 300
16:38:37.279098 IP 192.168.101.1.bootps > 192.168.101.33.bootpc: BOOTP/DHCP, Reply, length 300

在场景 2 中,Ubuntu 机器正在从防火墙收到答复,但无法配置其网络。

我们非常感谢您对这方面的帮助。

谢谢。

第一次编辑

输出tcpdump -e命令是

(base) phoenix@syndicate:/var/lib/dhcp$ sudo tcpdump -e
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s31f6, link-type EN10MB (Ethernet), capture size 262144 bytes
17:21:07.710907 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:08.291412 98:aa:d7:00:a8:44 (oui Unknown) > 01:01:c1:00:00:00 (oui Unknown), ethertype Unknown (0x9003), length 60: 
    0x0000:  0100 3676 a000 98aa d700 a844 0100 0400  ..6v.......D....
    0x0010:  33b0 cfeb abe6 41b4 fe0e e885 e8fc f70f  3.....A.........
    0x0020:  f6ea 9e12 0000 0000 0000 0000 0000       ..............
17:21:08.766464 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:16 (oui Unknown), ethertype IPv6 (0x86dd), length 110: :: > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
17:21:08.787163 e0:d5:5e:83:84:00 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from e0:d5:5e:83:84:00 (oui Unknown), length 300
17:21:09.402505 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:ff:09:ff:c6 (oui Unknown), ethertype IPv6 (0x86dd), length 86: :: > ff02::1:ff09:ffc6: ICMP6, neighbor solicitation, who has syndicate, length 32
17:21:09.626530 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:16 (oui Unknown), ethertype IPv6 (0x86dd), length 110: :: > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
17:21:09.711049 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:10.426658 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:16 (oui Unknown), ethertype IPv6 (0x86dd), length 110: syndicate > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
17:21:10.438533 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:16 (oui Unknown), ethertype IPv6 (0x86dd), length 110: syndicate > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
17:21:10.518698 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:16 (oui Unknown), ethertype IPv6 (0x86dd), length 110: syndicate > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
17:21:10.742201 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:02 (oui Unknown), ethertype IPv6 (0x86dd), length 62: syndicate > ip6-allrouters: ICMP6, router solicitation, length 8
17:21:10.954189 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:fb (oui Unknown), ethertype IPv6 (0x86dd), length 203: syndicate.mdns > ff02::fb.mdns: 0*- [0q] 2/0/0 (Cache flush) PTR syndicate.local., (Cache flush) AAAA fe80::198e:4764:3d09:ffc6 (141)
17:21:11.002537 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:16 (oui Unknown), ethertype IPv6 (0x86dd), length 110: syndicate > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
17:21:11.118385 e0:d5:5e:83:84:00 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from e0:d5:5e:83:84:00 (oui Unknown), length 300
17:21:11.711151 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:11.859015 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:fb (oui Unknown), ethertype IPv6 (0x86dd), length 203: syndicate.mdns > ff02::fb.mdns: 0 [9q] PTR (QM)? _nfs._tcp.local. PTR (QM)? _ipp._tcp.local. PTR (QM)? _ipps._tcp.local. PTR (QM)? _ftp._tcp.local. PTR (QM)? _webdav._tcp.local. PTR (QM)? _webdavs._tcp.local. PTR (QM)? _sftp-ssh._tcp.local. PTR (QM)? _smb._tcp.local. PTR (QM)? _afpovertcp._tcp.local. (141)
17:21:13.177150 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:fb (oui Unknown), ethertype IPv6 (0x86dd), length 203: syndicate.mdns > ff02::fb.mdns: 0*- [0q] 2/0/0 (Cache flush) PTR syndicate.local., (Cache flush) AAAA fe80::198e:4764:3d09:ffc6 (141)
17:21:13.291410 98:aa:d7:00:a8:44 (oui Unknown) > 01:01:c1:00:00:00 (oui Unknown), ethertype Unknown (0x9003), length 60: 
    0x0000:  0100 2a78 a000 98aa d700 a844 0100 0400  ..*x.......D....
    0x0010:  71a3 0c72 1a6b ea7e 5048 cc5e 9228 ea26  q..r.k.~PH.^.(.&
    0x0020:  931e 3cc6 0000 0000 0000 0000 0000       ..<...........
17:21:13.711117 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:14.742615 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:02 (oui Unknown), ethertype IPv6 (0x86dd), length 62: syndicate > ip6-allrouters: ICMP6, router solicitation, length 8
17:21:15.711150 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:15.860652 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:fb (oui Unknown), ethertype IPv6 (0x86dd), length 203: syndicate.mdns > ff02::fb.mdns: 0 [9q] PTR (QM)? _nfs._tcp.local. PTR (QM)? _ipp._tcp.local. PTR (QM)? _ipps._tcp.local. PTR (QM)? _ftp._tcp.local. PTR (QM)? _webdav._tcp.local. PTR (QM)? _webdavs._tcp.local. PTR (QM)? _sftp-ssh._tcp.local. PTR (QM)? _smb._tcp.local. PTR (QM)? _afpovertcp._tcp.local. (141)
17:21:17.711177 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:18.291297 98:aa:d7:00:a8:44 (oui Unknown) > 01:01:c1:00:00:00 (oui Unknown), ethertype Unknown (0x9003), length 60: 
    0x0000:  0100 1e7a a000 98aa d700 a844 0100 0400  ...z.......D....
    0x0010:  3fb1 f577 69be 692b a79a dd11 81dc a459  ?..wi.i+.......Y
    0x0020:  076a 7510 0000 0000 0000 0000 0000       .ju...........
17:21:18.742061 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:02 (oui Unknown), ethertype IPv6 (0x86dd), length 62: syndicate > ip6-allrouters: ICMP6, router solicitation, length 8
17:21:18.754640 e0:d5:5e:83:84:00 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from e0:d5:5e:83:84:00 (oui Unknown), length 300
17:21:19.711257 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:21.711115 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:23.291528 98:aa:d7:00:a8:44 (oui Unknown) > 01:01:c1:00:00:00 (oui Unknown), ethertype Unknown (0x9003), length 60: 
    0x0000:  0100 127c a000 98aa d700 a844 0100 0400  ...|.......D....
    0x0010:  994f 1b43 53be 8868 b4ca 761d fb6f 9ec0  .O.CS..h..v..o..
    0x0020:  afcd ae90 0000 0000 0000 0000 0000       ..............
17:21:23.711243 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:23.867183 e0:d5:5e:83:84:00 (oui Unknown) > 33:33:00:00:00:fb (oui Unknown), ethertype IPv6 (0x86dd), length 203: syndicate.mdns > ff02::fb.mdns: 0 [9q] PTR (QM)? _nfs._tcp.local. PTR (QM)? _ipp._tcp.local. PTR (QM)? _ipps._tcp.local. PTR (QM)? _ftp._tcp.local. PTR (QM)? _webdav._tcp.local. PTR (QM)? _webdavs._tcp.local. PTR (QM)? _sftp-ssh._tcp.local. PTR (QM)? _smb._tcp.local. PTR (QM)? _afpovertcp._tcp.local. (141)
17:21:25.711335 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:27.711301 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:28.291542 98:aa:d7:00:a8:44 (oui Unknown) > 01:01:c1:00:00:00 (oui Unknown), ethertype Unknown (0x9003), length 60: 
    0x0000:  0100 067e a000 98aa d700 a844 0100 0400  ...~.......D....
    0x0010:  1e4d 6140 6f64 d89f 26c8 e481 7351 deed  .Ma@od..&...sQ..
    0x0020:  04f8 0b4b 0000 0000 0000 0000 0000       ...K..........
17:21:29.231844 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:0e (oui Unknown), ethertype LLDP (0x88cc), length 156: LLDP, length 142: SW1
17:21:29.711327 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:29.855733 e0:d5:5e:83:84:00 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from e0:d5:5e:83:84:00 (oui Unknown), length 300
17:21:31.711399 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43
17:21:32.266665 e0:d5:5e:83:84:00 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from e0:d5:5e:83:84:00 (oui Unknown), length 300
17:21:33.291680 98:aa:d7:00:a8:44 (oui Unknown) > 01:01:c1:00:00:00 (oui Unknown), ethertype Unknown (0x9003), length 60: 
    0x0000:  0100 fa7f a000 98aa d700 a844 0100 0400  ...........D....
    0x0010:  3ddc 5ed1 301d 3e95 e5ed 3539 35a6 c701  =.^.0.>...595...
    0x0020:  7dc6 4f88 0000 0000 0000 0000 0000       }.O...........
17:21:33.711370 98:aa:d7:00:a8:49 (oui Unknown) > 01:80:c2:00:00:00 (oui Unknown), 802.3, length 39: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward, Agreement], bridge-id 0000.98:aa:d7:00:a8:44.8005, length 43

第二次编辑

DHCP 客户端日志文件的最后几行(journalctl -t dhclient)

May 01 17:31:45 syndicate dhclient[25110]: DHCPREQUEST of 192.168.0.83 on enp0s31f6 to 255.255.255.255 port 67 (xid=0x3c97cfb6)
May 01 17:31:48 syndicate dhclient[25110]: DHCPREQUEST of 192.168.0.83 on enp0s31f6 to 255.255.255.255 port 67 (xid=0x3c97cfb6)
May 01 17:31:55 syndicate dhclient[25139]: DHCPREQUEST of 192.168.0.83 on enp0s31f6 to 255.255.255.255 port 67 (xid=0x3a095824)
May 01 17:31:58 syndicate dhclient[25139]: DHCPREQUEST of 192.168.0.83 on enp0s31f6 to 255.255.255.255 port 67 (xid=0x3a095824)
May 01 17:32:06 syndicate dhclient[25139]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 3 (xid=0x860fbc19)
May 01 17:32:09 syndicate dhclient[25139]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 6 (xid=0x860fbc19)
May 01 17:32:15 syndicate dhclient[25139]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 10 (xid=0x860fbc19)
May 01 17:32:25 syndicate dhclient[25139]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 21 (xid=0x860fbc19)
May 01 17:32:40 syndicate dhclient[25219]: DHCPREQUEST of 192.168.0.83 on enp0s31f6 to 255.255.255.255 port 67 (xid=0x20828109)
May 01 17:32:43 syndicate dhclient[25219]: DHCPREQUEST of 192.168.0.83 on enp0s31f6 to 255.255.255.255 port 67 (xid=0x20828109)
May 01 17:32:47 syndicate dhclient[25219]: DHCPREQUEST of 192.168.0.83 on enp0s31f6 to 255.255.255.255 port 67 (xid=0x20828109)
May 01 17:32:54 syndicate dhclient[25219]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 3 (xid=0x9974ab74)
May 01 17:32:57 syndicate dhclient[25219]: DHCPDISCOVER on enp0s31f6 to 255.255.255.255 port 67 interval 8 (xid=0x9974ab74)

客户端似乎正在请求 IP 地址192.168.0.83(这是按照方案 1 连接时 DHCP 服务器分配的最后一个 IP)到 DHCP 服务器,该服务器配置为提供 192.168.101.31 到 192.168.101.254 范围内的 IP 地址。请指导如何解决此问题。

相关内容