免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3305 | 回复: 1
打印 上一主题 下一主题

关于dhcp 客户端指定server地址获取ip的困惑 急!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-10 11:36 |只看该作者 |倒序浏览
大家好:
         我现在遇到的问题是:dhcp client 测试机和dhcp server 直连
                                
                             client 采用默认的广播发送包,我在dhcp server 可以侦听到包
                             而且可以获取其地址池中的ip,
         而使用:dhclient eth1 -s  10.3.3.1  指定server地址后,却没有侦听到包,  为什么呢?
  
         这个是指定server地址之后的检查到的client 发出来的包      
          18:26:22.005350 00:d0:68:03:dc:6d > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl  16, id 0, offset 0, flags [none], proto: UDP (17), length: 32 0.0.0.0.68 > 10.3.3.1.67: BOOTP/DHCP, Request from 00:d0:68:03:dc:6d, length: 300, xid:0xa234f115, secs:7, flags: [none] (0x0000)
          Client Ethernet Address: 00:d0:68:03:dc:6d [|bootp]
        0x0000:  4510 0148 0000 0000 1011 9c92 0000 0000  E..H............
        0x0010:  0a03 0301 0044 0043 0134 e4eb 0101 0600  .....D.C.4......
        0x0020:  a234 f115 0007 0000 0000 0000 0000 0000  .4..............
        0x0030:  0000 0000 0000 0000 00d0 6803 dc6d 0000  ..........h..m..
        0x0040:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0050:  0000  

下面加上参数后,变成“Network is unreachable”
[root@hawk sbin]# ./dhcpclient eth1 -s 10.3.3.1
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

/sbin/dhclient-script: line 74: source_config: command not found
/sbin/dhclient-script: line 1: uname: command not found
/sbin/dhclient-script: line 1: expr: command not found
/sbin/dhclient-script: line 1: sed: command not found
/sbin/dhclient-script: line 1: sed: command not found
/sbin/dhclient-script: line 107: [: -lt: unary operator expected
/sbin/dhclient-script: line 107: [: -eq: unary operator expected
Listening on LPF/eth1/00:d0:68:03:dc:6d
Sending on   LPF/eth1/00:d0:68:03:dc:6d
Sending on   Socket/fallback
DHCPREQUEST on eth1 to 10.3.3.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
DHCPREQUEST on eth1 to 10.3.3.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
DHCPREQUEST on eth1 to 10.3.3.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
DHCPDISCOVER on eth1 to 10.3.3.1 port 67 interval 7
DHCPDISCOVER on eth1 to 10.3.3.1 port 67 interval 13
DHCPDISCOVER on eth1 to 10.3.3.1 port 67 interval 20
DHCPDISCOVER on eth1 to 10.3.3.1 port 67 interval 16
DHCPDISCOVER on eth1 to 10.3.3.1 port 67 interval 5
No DHCPOFFERS received.
Trying recorded lease 10.3.3.12
/sbin/dhclient-script: line 74: source_config: command not found
/sbin/dhclient-script: line 1: uname: command not found
/sbin/dhclient-script: line 1: expr: command not found
/sbin/dhclient-script: line 1: sed: command not found
/sbin/dhclient-script: line 1: sed: command not found


谢谢大家,我今天要把这个问题搞定,呵呵

论坛徽章:
0
2 [报告]
发表于 2006-08-10 12:12 |只看该作者
下面的是在server上的侦听

C:\Program Files\Ethereal>tethereal.exe -i 1 port 67
Capturing on Intel(R) PRO/1000 CT Network Connection
  0.000000 192.168.71.1 -> 255.255.255.255 DHCP DHCP Offer    - Transaction ID 0
x941c3056
  0.060462 192.168.71.1 -> 255.255.255.255 DHCP DHCP ACK      - Transaction ID 0
x941c3056
10.108795 192.168.71.1 -> 255.255.255.255 DHCP DHCP Offer    - Transaction ID 0
x2e2d7508
10.168593 192.168.71.1 -> 255.255.255.255 DHCP DHCP ACK      - Transaction ID 0
x2e2d7508
20.218192 192.168.71.1 -> 255.255.255.255 DHCP DHCP Offer    - Transaction ID 0
xc8348771
20.278842 192.168.71.1 -> 255.255.255.255 DHCP DHCP ACK      - Transaction ID 0
xc8348771
30.327316 192.168.71.1 -> 255.255.255.255 DHCP DHCP Offer    - Transaction ID 0
x6f149956
30.387745 192.168.71.1 -> 255.255.255.255 DHCP DHCP ACK      - Transaction ID 0
x6f149956
40.436472 192.168.71.1 -> 255.255.255.255 DHCP DHCP Offer    - Transaction ID 0
xc60e5b4d
40.500061 192.168.71.1 -> 255.255.255.255 DHCP DHCP ACK      - Transaction ID 0
xc60e5b4d
43.674753      0.0.0.0 -> 10.3.3.1     DHCP DHCP Discover - Transaction ID 0x33
723f2f
47.674694      0.0.0.0 -> 10.3.3.1     DHCP DHCP Discover - Transaction ID 0x33
723f2f
50.545955 192.168.71.1 -> 255.255.255.255 DHCP DHCP Offer    - Transaction ID 0
x408d508
50.606856 192.168.71.1 -> 255.255.255.255 DHCP DHCP ACK      - Transaction ID 0
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP