linux 下 dhcp server安装与配置
来源:互联网 发布:智多星工程造价软件 编辑:程序博客网 时间:2024/05/22 08:08
环境:Ubuntu10.10 32bit, kernel 2.6.35
dhcp: dhcp3-server
install.
it is told that the newer Ubuntu will have to install isc-dhcp-server instead of dhcp3-server.
at first i think my Ubuntu is among the 'newer' groups and try to install the 'new' packege while was told by the sys that the source is not found.
so lazy i am that i did not update the source and just install the 'old' one:
$sudo apt-get installdhcp3-server
if your OS is really new, you can replace the 'dhcp3-server' with the new 'isc-dhcp-server'.
config.
after you have installed the tool, you will have to config the network interface card.
i have two NIC: an wired one -eth0, an wireless -wlan0.
and i just want to make the 'eth0' as the dhcp server's network port.
here the eth0 card is configured as static IP:172.17.16.1, netmask as you should be familiar, 255.255.255.0.
now edit the config files:
$sudo vi /etc/dhcp3/dhcpd.conf
and paste below info just at the end of the file:
#=================================added here=============================== authoritative; option subnet-mask 255.255.255.0; option broadcast-address 172.17.16.255; option routers 172.17.16.1; option domain-name-servers 10.33.8.21, 8.8.8.8, 8.8.4.4; subnet 172.17.16.0 netmask 255.255.255.0 { range 172.17.16.111 172.17.16.222; } #==========================================================================
if you want to allocate static IPs for the hosts, you can also add as below(host julie with its MAC and allocated IP)
host julie {hardware ethernet insert-MAC-address;fixed-address 172.17.16.100;}
as i have two NIC, it is best that i config explicit the NIC dhcp server will use:
$sudo vi /etc/default/dhcp3-server
and add as below:
INTERFACES="eth0"
if you want both, you can also config like
INTERFACES="eth0 wlan0"
separate the interfaces with blank.
and also do not forget to modify network config:
$sudo vi /etc/network/interfaces
as i only use one NIC for DHCP, it is as below:
#==================add here=========================== auto eth0 iface eth0 inet static address 172.17.16.1 netmask 255.255.255.0 #=====================================================
and now, you can start your dhcp server
$sudo dhcp3
of course you can also make it that the dhcp server started while sys boot up.
while i have not done this part yet,XDD.
i can be your turn, and you can share to us.
a little addtional tips,:D
config dual NIC network sharing
Internet < --- > PC:wlan0|PC:eth0 < --- > router/AP < --- > client PC
#echo "1" > /proc/sys/net/ipv4/ip_forward#iptables -t nat -A POSTROUTING -s 172.17.16.111/32 -o wlan0 -j SNAT --to 192.168.88.30you can also replace the iptables cmd with below
#iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADEhere my wlan0's IP is 192.168.88.30 and the client router/AP's IP is 172.17.16.111
here just find another url just for ubuntu14.04.
http://www.tuicool.com/articles/AzEbii
ref:
http://askubuntu.com/questions/70339/how-do-i-setup-dhcp-server-interfaces-so-they-are-mapped-bridged-to-each-other?rq=1
https://help.ubuntu.com/community/dhcp3-server
http://wiki.ubuntu.com.cn/index.php?title=UbuntuHelp:Dhcp3-server&variant=zh-tw
http://nwlinux.com/how-to-configure-dhcp3-server-in-ubuntu-server/
- linux 下 dhcp server安装与配置
- Linux下 DHCP服务器安装与配置
- Linux环境下DHCP服务器的安装与配置详解
- Linux dhcp server配置
- linux下DHCP的安装配置
- Ubuntu下DHCP服务器安装与配置
- Linux下DHCP服务器配置与应用
- Linux下搭建DHCP server
- linux虚拟机安装dhcp server
- 在unix/linux下安装配置DHCP服务【经典博客】
- Linux下DHCP服务器(CentOS系统)安装和配置详解
- Linux下配置DHCP服务器
- Linux下配置DHCP服务器
- linux下DHCP服务器配置
- Linux下DHCP服务器配置
- linux下dhcp服务器配置
- Linux 安装配置DHCP服务器
- VirtualBox上Linux机器DHCP安装与配置
- windows下qt使用动态链接库的方法
- shader编程
- 实例:SSH整合Maven实现图片的添加与查询显示
- Android常见权限说明
- attribute 用法 section 部分
- linux 下 dhcp server安装与配置
- PHP使用json_encode生成json数据,使用json_decode对JSON解码
- java内存机制
- 从Java源代码到打包生成exe文件
- 找出带环单向链表的环入口(交点)
- Hello World!
- DB2 V10.5
- hoj1402整数划分问题
- android slide meun Demo