我在Centos 6.x上运行PXE . 我正在尝试使用4个nics对服务器进行映像 . eth0,eth1,eth2,eth3 .
eth0和eth1位于pxe服务器所在的网段上 . 我还使用这个pxe服务器通过Web服务器提供构建过程所需的文件 .
当DHCP分发IP地址时,它会对所有接口eth0 eth1 eth2和eth3执行此操作 . 它还提供默认网关 . 在eth3上配置默认网关 . 这是错误的,因为eth3没有连接到Web服务器所在的网络,也无法从Web服务器下载它的文件 .
我在PXE中使用的地址范围是192.168.20.0/24 gw 192.168.20.1 . 如何让PXE DHCP在eth0而不是eth3上设置默认网关192.168.20.1
这是路线表
Destination Gateway Genmask Flags Metric Ref Use IFace
192.168.20.0 * 255.255.255.0 U 0 0 0 eth3
192.168.20.0 * 255.255.255.0 U 0 0 0 eth2
192.168.20.0 * 255.255.255.0 U 0 0 0 eth1
192.168.20.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.1 * 255.255.255.0 U 0 0 0 lo
default 192.168.20.1 0.0.0.0 UG 0 0 0 eth3
这是我的dhcp配置
ddns-update-style interim;
not authoritative;
option domain-name "mydomain.com";
option domain-name-servers 192.168.20.15;
option subnet-mask 255.255.255.0;
subnet 192.168.20.0 netmask 255.255.255.0 {
authoritative;
range 192.168.20.220 192.168.20.245;
option routers 192.168.20.1;
default-lease-time 900;
max-lease-time 1200000000;
allow unknown-clients;
allow booting;
allow bootp;
next-server 192.168.20.15;
filename "pxelinux.0";
}
任何想法如何让我的默认网关在eth0上,以便我可以正确路由?
谢谢 - 奥利
2 回答
你有问题说:
然后回答:
所以基本上两个段DHCP服务器都提供相同的GW IP . 这意味着您的所有NIC都位于同一IP子网
192.168.20.0/24
上 .更改子网设置 .
我有另一台DHCP服务器在网络上发布了eth2和eth3连接的DHCP租约 . 这干扰了路由并导致了eth0和eth1路由问题 . 我停止了网络eth 2和eth3上的DHCP服务,之后一切都很好