我有一块带有 CFE(最小加载程序)的嵌入式主板。我有一台主机 - Linux FC16,我在其中运行 dhcpd 服务器。我的接口是 p3p1。以下是 ifcfg-p3p1 的详细信息。
HWADDR=14:D6:4D:1F:F3:F8
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
IPADDR=10.240.100.100
NETMASK=255.255.255.0
NETWORK=10.240.100.0
GATEWAY=10.240.100.1
PREFIX=24
现在,我有以下 dhcpd.conf 文件 -
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
ddns-update-style interim;
allow booting;
allow bootp;
ignore client-updates;
set vendorclass = option vendor-class-identifier;
subnet 10.240.100.0 netmask 255.255.255.0 {
option routers 10.240.100.1;
option subnet-mask 255.255.255.0;
range 10.240.100.100 10.240.100.254;
default-lease-time 21600;
max-lease-time 43200;
next-server 10.240.100.1;
}
客户端没有获取 IP 地址,因此我首先尝试解决连接问题。
我为我的客户端分配了一个 IP 地址 -
setenv -p IPADDRESS 10.240.100.200 NETMASK 255.255.255.0 gw 10.240.100.1
现在,当我尝试从客户端 ping 我的主机时,我看到以下内容。
在客户端 -
CFE> ping 10.240.100.100
10.240.100.100 (10.240.100.100) is not responding (seq=0)
10.240.100.100 (10.240.100.100): 1 packets sent, 0 received
*** command status = 1
在主机端 -
# tcpdump -e -i p3p1 -vvv
tcpdump: listening on p3p1, link-type EN10MB (Ethernet), capture size 65535 bytes
16:20:23.885757 e0:b7:b1:23:60:d0 (oui Unknown) > 14:d6:4d:1f:f3:f8 (oui Unknown), ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 100, id 33, offset 0, flags [none], proto ICMP (1), length 84)
0.0.0.0 > 10.240.100.100: ICMP echo request, id 988, seq 0, length 64
我看到这里的 mac 地址是正确的。客户端 MAC 地址是 e0:b7:b1:23:60:d0 主机 mac 地址是以下 14:d6:4d:1f:f3:f8。
这里可能存在什么问题?由于我是网络新手,请给我一些指点。
# ifconfig
em1 Link encap:Ethernet HWaddr B8:CA:3A:89:EE:F1
inet addr:136.170.195.17 Bcast:136.170.195.255 Mask:255.255.252.0
inet6 addr: fe80::baca:3aff:fe89:eef1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4362507 errors:0 dropped:2 overruns:0 frame:0
TX packets:1467982 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5484308631 (5.1 GiB) TX bytes:115472934 (110.1 MiB)
Interrupt:20 Memory:f7e00000-f7e20000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:32118 errors:0 dropped:0 overruns:0 frame:0
TX packets:32118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6121874 (5.8 MiB) TX bytes:6121874 (5.8 MiB)
p3p1 Link encap:Ethernet HWaddr 14:D6:4D:1F:F3:F8
inet addr:10.240.100.100 Bcast:10.240.100.255 Mask:255.255.255.0
inet6 addr: fe80::16d6:4dff:fe1f:f3f8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:209 errors:0 dropped:0 overruns:0 frame:0
TX packets:411 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:49526 (48.3 KiB) TX bytes:60967 (59.5 KiB)
我仅在接口 p3p1 上运行 dhcpd。