- 论坛徽章:
- 0
|
首先声明:我用linux当路由 2张网卡 一张无线网卡wlan0连接到外网,一张内建卡p4p1 直接连我笔记本。 现在能只能设置p4p1固定ip ,笔记本固定ip,现在想启动linux的dhcp 使笔记本能自己获取ip 。 p4p1的ip设置是192.168.100.254 mask 255.255.255.0
dhcp.conf 配置是 5
6 subnet 192.168.100.0 netmask 255.255.255.0{ range 192.168.100.1; 192.168.100. 200; default-lease-time 86400; max-lease-time 604800; option subnet-mask 255. 255.255.0; option routers 192.168.100.254; option domain-name 192.168.168.3; }
查看log :
Jan 7 19:59:55 linux dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Jan 7 19:59:55 linux dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Jan 7 19:59:55 linux dhcpd: All rights reserved.
Jan 7 19:59:55 linux dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Jan 7 19:59:55 linux dhcpd: /etc/dhcp/dhcpd.conf line 6: expecting a parameter or declaration
Jan 7 19:59:55 linux dhcpd: subnet 192.168.100.0 netmask 255.255.255.0{ range 192.168.100.1; 192.
Jan 7 19:59:55 linux dhcpd: ^
Jan 7 19:59:55 linux dhcpd: /etc/dhcp/dhcpd.conf line 6: expecting string.
Jan 7 19:59:55 linux dhcpd: subnet 192.168.100.0 netmask 255.255.255.0{ range 192.168.100.1; 192.168.100.200
Jan 7 19:59:55 linux dhcpd: Configuration file errors encountered -- exiting
Jan 7 19:59:55 linux dhcpd:
Jan 7 19:59:55 linux dhcpd: This version of ISC DHCP is based on the release available
Jan 7 19:59:55 linux dhcpd: on ftp.isc.org. Features have been added and other changes
Jan 7 19:59:55 linux dhcpd: have been made to the base software release in order to make
Jan 7 19:59:55 linux dhcpd: it work better with this distribution.
Jan 7 19:59:55 linux dhcpd:
Jan 7 19:59:55 linux dhcpd: Please report for this software via the CentOS Bugs Database:
Jan 7 19:59:55 linux dhcpd: http://bugs.centos.org/
Jan 7 19:59:55 linux dhcpd:
Jan 7 19:59:55 linux dhcpd: exiting.
求问题在哪里 |
|