天天看点

Cent OS6.3 DHCP中继代理安装及配置

 DHCP 中继代理安装和配置。

实验需求:

Linux 操作系统 *2

客户机系统*1

实验思路:咳咳,我用虚拟机做的,资源却不多,用一个centos6.3 一个redhat5.5 一个windowsXP 可爱把,呵呵, 下面是网卡参数

Cent OS 网卡*1

eth0:192.168.1.10

Redhat 网卡*2

eth0:192.168.1.100

eth1:192.168.2.1

windows XP 网卡1

IP 自动获取

视环境而定吧。亲们也可以用真机实验的,桥接VM虚拟网卡也靠谱的,不多做介绍了!

首先配置2台linux关闭防火墙的说!然后对着上面的参数设置IP。这个就不上图了,感觉多余!

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP1.png"></a>

这里就真正开始了

步骤1:挂载光盘,省略挂载步骤,没有现成的DHCP包,就镜像了!另外一台linux的安装过程省略了。

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP2.png"></a>

Cent OS 安装完后,DHCP服务是没有启动起来的,我们要去修改设置配置文件,但是坑爹的/etc/dhcpd.conf 没有任何价值,它就像个重定向,让我们去找另外一个文件。我们根据它个的信息手动建立配置文件!

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP3.png"></a>

下面2张图的配置参数是同一个配置文件的!

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP4.png"></a>

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP5.png"></a>

保存退出后,重启dhcp服务

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP6.png"></a>

添加静态路由

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP7.png"></a>

这样 双机就通了,下面配置RedHat  /etc/sysctl.conf

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP8.png"></a>

然后话说更新下 sysctl –p

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP9.png"></a>

接着继续配置/etc/sysconfig/dhcrelay 如下 配置好了保存退出

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP10.png"></a>

咳咳,启动dhcrelay

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP11.png"></a>

开启XP试试看 切记哦。XP 是host-only 跟 Cent OS 并非一个网段的!

<a href="http://itchenyi.com/wp-content/uploads/2012/10/DHCP12.png"></a>

本文转自 lgpqdwjh 51CTO博客,原文链接:http://blog.51cto.com/itchenyi/1038327,如需转载请自行联系原作者

继续阅读