2006 年 09 月 09 日, 星期六

3550配置DHCP中继代理工程实例 (DHCP跨网段分配IP地址)

普通的DHCP 的IP地址分配应该都没有什么问题,这里从 net130摘抄了这位兄弟的详细配置,大家可以参考。
3550配置DHCP中继代理工程实例

(原创)3550配置DHCP中继代理工程实例
作者:usr001
3550配置dhcp,网络上多有讨论,但大都存在错漏,按照网上介绍的配置一句“IP HELPER-ADDRESS DHCP服务器地址”后,工程当中发现客户机不能从DHCP服务器获取IP地址,本人最近也刚好配置了3550作为DHCP服务器中继代理,最初也曾困惑很久,后来在网上查找资料及在论坛上寻求众人帮助,终于在工程当中测试通过,为避免大家在工程当中遇到此类情况左调右调,特将配置过程写出来,给大家作为参考。

网络环境:一台3550EMI交换机,划分三个vlan,vlan2 为服务器所在网络,命名为server,IP地址段为192.168.2.0,子网掩码:255.255.255.0,网关:192.168.2.1,域服务器为windows 2000 advance server,同时兼作DHCP服务器,DNS服务器,IP地址为192.168.2.10,vlan3为客户机1所在网络,IP地址段为192.168.3.0,子网掩码:255.255.255.0,网关:192.168.3.1命名为work01,vlan4 为客户机2所在网络,命名为work02,IP地址段为192.168.4.0,子网掩码:255.255.255.0,网关:192.168.4.1.
3550上端口1-8划到VLAN 2,端口9-16划分到VLAN 3,端口17-24划分到VLAN 4.

配置命令及步骤如下:

第一步:创建VLAN:
Switch>Vlan Database
Switch(Vlan)>Vlan 2 Name server
Switch(Vlan)>Vlan 3 Name work01
Switch(vlan)>Vlan 4 Name work02

第二步:启用DHCP中继代理:
/*关键一步,若缺少以下两条命令,在VLAN中使用“IP HELPER-ADDRESS DHCP服务器地址”指定DHCP服务器,客户机仍然不能获得IP地址*/
Switch>Enable
Switch#Config t
Switch(Config)Service Dhcp
Switch(Config)Ip Dhcp Relay Information Option

第三步:设置VLAN IP地址:
Switch(Config)>Int Vlan 2
Switch(Config-vlan)Ip Address 192.168.2.1 255.255.255.0
Switch(Config-vlan)No Shut
Switch(Config-vlan)>Int Vlan 3
Switch(Config-vlan)Ip Address 192.168.3.1 255.255.255.0
Switch(Config-vlan)No Shut
Switch(Config-vlan)>Int Vlan 4
Switch(Config-vlan)Ip Address 192.168.4.1 255.255.255.0
Switch(Config-vlan)No Shut
Switch(Config-vlan)Exit
/*注意:由于此时没有将端口分配置到VLAN2,3,4,所以各VLAN会DOWN掉,待将端口分配到各VLAN后,VLAN会起来*/

第四步:设置端口全局参数
Switch(Config)Interface Range Fa 0/1 - 24
Switch(Config-if-range)Switchport Mode Access
Switch(Config-if-range)Spanning-tree Portfast

第五步:将端口添加到VLAN2,3,4中
/*将端口1-8添加到VLAN 2*/
Switch(Config)Interface Range Fa 0/1 - 8
Switch(Config-if-range)Switchport Access Vlan 2

/*将端口9-16添加到VLAN 3*/
Switch(Config)Interface Range Fa 0/9 - 16
Switch(Config-if-range)Switchport Access Vlan 3

/*将端口17-24添加到VLAN 4*/
Switch(Config)Interface Range Fa 0/17 - 24
Switch(Config-if-range)Switchport Access Vlan 4
Switch(Config-if-range)Exit

/*经过这一步后,各VLAN会起来*/

第六步:在VLAN3和4中设定DHCP服务器地址
/*VLAN 2中不须指定DHCP服务器地址*/
Switch(Config)Int Vlan 3
Switch(Config-vlan)Ip Helper-address 192.168.2.10
Switch(Config)Int Vlan 4
Switch(Config-vlan)Ip Helper-address 192.168.2.10

第七步:启用路由
/*路由启用后,各VLAN间主机可互相访问,若需进一步控制访问权限,则需应用到访问控制列表*/
Switch(Config)Ip Routing

第八步:结束并保存配置
Switch(Config-vlan)End
Switch#Copy Run Start
risingsunczl 发表于:2006.09.09 06:46 ::分类: ( 网络 ) ::阅读:(144792次) :: 评论 (13) :: 引用 (0)

[回复]

order online Minipress for Disease generic Microzide 揟he shortage of the medication buy Lozol Do not mix Influenza A (H1N1) 2009 purchase cheap Lotensin at a Reisterstown clinic intended for 4,000 people, buy cheap Lopressor for is more than 40,000.

Dachtoche 评论于:2009.12.13 11:14

[回复]

皖忮轼桢 禹桕嚯 皴疴桉

unicumasd 评论于:2009.11.26 04:18

[回复]

率铐蜞牝

Vkprovip 评论于:2009.11.22 11:34

[回复]

Greetings,
We have prepared a contract and added the paragraphs that you wanted to see in it.
Our lawyers made alterations on the last page. If you agree all the provisions we are ready to make the payment on Friday for the first consignment,
We are enclosing the file with prepared contract.

peter.morrison2010@gmail.com
jerryleavinglasvegas@gmail.com

Pirvozz 评论于:2009.11.11 10:33

[回复]

-腻豚

rekrassylis 评论于:2009.11.04 17:59

[回复]

橡桡豚屐 锣

kupit_zhemchug[UIDIYUIFFIIU] 评论于:2009.10.24 19:42

[回复]

青汶

kupit_zhemchug[UIDIYUIFFIIU] 评论于:2009.09.26 12:32

[回复]

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

Lyagushkka 评论于:2009.09.13 20:35

[回复]

卿疣怦蜮箝蝈.

malvinka 评论于:2009.09.11 23:56

Mitigate needed (advice) [回复]

had recently herpes virus found in my blood. what I haveto do??? I'm in panic...

margohelp 评论于:2009.09.11 23:35

棋祺筱 [回复]

橡桡豚屐 锣

zhemchug_[UIDIYUIFFIIU] 评论于:2009.09.09 10:44

Qwestion [回复]

Hello! Well-mannered resurs. Base in place of my english, but i plumb nice say &hJ$)K!!!.

Leoperdes 评论于:2009.09.03 12:53

茵桁戾 [回复]

青汶

trimmer[POJTTPQQPTTP] 评论于:2009.08.27 19:49

发表评论

标题

在此添加评论

称呼

邮箱地址(可选)

个人主页(可选)