我知道我的问题已经被问过无数次了。我想我已经阅读了关于这个主题的几乎所有帖子,但我仍然无法让它发挥作用。
我在 vlan1 中有一个 DHCP 服务器 (centos 6.x)。我正在运行一个具有多个 vlan (vlan1 = 192.168.1.x 和 vlan3 = 192.168.3.x) 的 cisco 3750 交换机。我已向 vlan3 添加了一个 ip 辅助地址,该地址指向 vlan1 中的 DHCP 服务器。我能够看到来自 vlan3 中服务器的流量。但是,我无法获取 vlan3 子网的 IP 地址。我不断获取 vlan1 子网的 IP 地址。
即使我在 dhcpd.conf 文件中指定了我的 mac,我得到的 vlan1 的 ip 也是 192.168.1.x。
dhcpd.conf == MAC 故意改变
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.254;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
}
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.2 192.168.3.254;
option broadcast-address 192.168.3.255;
option subnet-mask 255.255.255.0;
option routers 192.168.3.1;
}
host node35 {
hardware ethernet xx:xx:35:zz:bb:bb;
fixed-address 192.168.3.101;
}
}
tcpdump -vvvnes0 -i eth0 端口 67 或端口 68
[root@server ~]# tcpdump -vvvnes0 -i eth0 port 67 or port 68
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:52:36.475951 cc:zz:pp:zz:cc:pp > xx:xx:zz:62:bb:ee, ethertype IPv4 (0x0800), length 590: (tos 0x0, ttl 63, id 4, offset 0, flags [none], proto UDP (17), length 576)
0.0.0.0.bootpc > 192.168.1.79.bootps: [udp sum ok] BOOTP/DHCP, Request from xx:xx:35:zz:bb:bb, length 548, xid 0x3ab89bbc, secs 64, Flags [Broadcast] (0x8000)
Client-Ethernet-Address xx:xx:35:zz:bb:bb
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Parameter-Request Option 55, length 24:
Subnet-Mask, Time-Zone, Default-Gateway, IEN-Name-Server
Domain-Name-Server, RL, Hostname, BS
Domain-Name, SS, RP, EP
Vendor-Option, Server-ID, Vendor-Class, BF
Option 128, Option 129, Option 130, Option 131
Option 132, Option 133, Option 134, Option 135
MSZ Option 57, length 2: 1260
GUID Option 97, length 17: 0.54.51.51.55.55.56.65.85.68.50.49.50.48.55.57.71
ARCH Option 93, length 2: 0
NDI Option 94, length 3: 1.2.1
Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"
END Option 255, length 0
PAD Option 0, length 0, occurs 212
13:52:37.000710 xx:xx:zz:62:bb:ee > Broadcast, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
192.168.1.79.bootps > 255.255.255.255.bootpc: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x3ab89bbc, secs 64, Flags [Broadcast] (0x8000)
Your-IP 192.168.1.2
Client-Ethernet-Address xx:xx:35:zz:bb:bb
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: 192.168.1.79
Lease-Time Option 51, length 4: 43200
Subnet-Mask Option 1, length 4: 255.255.255.0
Default-Gateway Option 3, length 4: 192.168.1.5
Domain-Name-Server Option 6, length 4: 192.168.1.42
Domain-Name Option 15, length 16: "myorg.org"
END Option 255, length 0
PAD Option 0, length 0, occurs 8
转变
3750X.Inside#sh ru int vlan3
Building configuration...
Current configuration : 93 bytes
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.1.79
end
我的问题是如何让它工作。我是否遗漏了什么?