如何在三层交换机上实现跨VLAN 的DHCP配置
H3C三层交换机如何配置DHCP服务

H3C三层交换机如何配置DHCP服务
H3C三层交换机如何配置DHCP服务,实现多VLAN的IP地址自动分配,在H3C三层交换机上如何配置DHCP服务呢?下面是店铺收集整理的H3C三层交换机如何配置DHCP服务,希望对大家有帮助~~
H3C三层交换机配置DHCP服务的方法
工具/原料
H3C三层交换机
方法/步骤
首先将三层交换机开机,电脑telnet 远程连接,创建VLAN 10,并将接口E0/1加入到VLAN,如图所示:
为VLAN接口配置IP地址,在VLAN接口上选择全局地址池方式分配IP地址,如图所示:
指定不通过DHCP地址池中分配的地址,也就是排除的地址。
这里排除10.1.1.1,输入“dhcp server forbidden-ip 10.1.1.1"如图所示:
创建全局地址池,输入”dhcp server ip-pool vlan10",如图所示:配置vlan10地址池给用户分配的地址范围“network 10.1.1.0 mask 255.255.255.0”,如图所示:
为客户机配置网关输入“gateway-list 10.1.1.1”,如图所示:
这样就设置完成了,只要是属于10.1.1.0/24网段的客户机就可以自动获取IP地址了。
这里注意了,如果存在多个VLAN,每个VLAN 都需要设置DHCP服务。
在三层交换机配置DHCP的方法

在三层交换机配置DHCP的方法通过本实验掌握,如何在Cisco Catalyst 3550交换机来配置DHCP服务,实现对内网主机分配IP地址,网关,DNS,WINS,租期,域名等。
接下来是小编为大家收集的在三层交换机配置DHCP的方法,希望能帮到大家。
在三层交换机配置DHCP的方法可能你之前是在windows Server服务器或者Cisco Router 部署过DHCP,但在工程项目中,根据需求,大多是在接入层或者汇聚层多层交换机来配置的,可以同时实现DHCP Snooping等技术。
实验过程:第一步:Catalyst 3550底层配置Switch(config)#no ip do loSwitch(config)#line con 0Switch(config-line)#no exec-tSwitch(config-line)#logg synSwitch(config-line)#host Switch_DhcpSwitch_Dhcp(config)#int f0/1Switch_Dhcp(config-if)#no shSwitch_Dhcp(config-if)#spanning-tree portfast//连接终端的接口下,开启portfast特性,跳过生成树的选举,接口立即进入转发状态%Warning: portfast should only be enabled on ports connected to a singlehost. Connecting hubs, concentrators, switches, bridges, etc... to thisinterface when portfast is enabled, can cause temporary bridging loops.Use with CAUTION%Portfast has been configured on FastEthernet0/1 but willonlyhave effect when the interface is in a non-trunking mode.Switch_Dhcp(config-if)#end第二步: 开启DHCP服务,定义分配地址池范围及掩码,网关,DNS,域名,租期等//全局下开启DHCP服务,该服务默认是关闭的Switch_Dhcp(config)#service dhcp//关闭DHCP分配冲突,日志记录消息Switch_Dhcp(config)#no ip dhcp conflict logging//创建DHCP地址池,名称为可以是任意字符Switch_Dhcp(config)#ip dhcp pool cisco//指定要通过DHCP分配的网段和掩码,还有另外一种写法(192.168.0.0 255.255.255.0)Switch_Dhcp(dhcp-config)#network 192.168.0.0 /24//指定分配的网关地址Switch_Dhcp(dhcp-config)#default-router 192.168.0.1//指定DHCP域名,域名可以为任意字符Switch_Dhcp(dhcp-config)#domain-name//指定PC通过DHCP分配到DNS地址,(这里指定的是当地电信部门的真实地址,全国各地市不一样的)Switch_Dhcp(dhcp-config)#dns 218.30.19.40 61.134.1.4//netbios服务器地址,可选的配置Switch_Dhcp(dhcp-config)#netbios-name-server192.168.0.10//指定通过DHCP分配到地址,租期为永久Switch_Dhcp(dhcp-config)#lease infiniteSwitch_Dhcp(dhcp-config)#end//指定不通过DHCP 地址池中分配的地址,也就是排除的地址。
补充三层交换机配置DHCP服务与交换机间链路聚合配置

补充实验三层交换机配置DHCP服务与交换机间链路聚合配置【实验目的】1、三层交换机配置DHCP功能,实现分别为不同VLAN自动分配IP地址等相关参数2、掌握在两台交换机之间配置链路聚合,实现将低速链路捆绑为高速链路【实验拓扑】【实验步骤】1、三层交换机配置//分别创建VLAN 10与VLAN 20Switch#conf tSwitch(config)#hostname MSMS(config)#vlan 10MS(config-vlan)#vlan 20//配置VLAN 10与VLAN 20虚拟接口的IP地址MS(config)#int vlan 10MS(config-if)#ip address 192.168.1.254 255.255.255.0MS(config-if)#no shutdownMS(config-if)#exitMS(config)#int VLAN 20MS(config-if)#ip address 192.168.101.254 255.255.255.0MS(config-if)#no shutdownMS(config-if)#exit//三层交换机配置DHCP服务//添加排除地址MS(config)#ip dhcp excluded-address 192.168.1.254MS(config)#ip dhcp excluded-address 192.168.101.254//创建VLAN10与VLAN20两个VLAN自动分配IP地址的地址池及网关IP MS(config)#ip dhcp pool vlan10pool //地址池名称为vlan10poolMS(dhcp-config)#network 192.168.1.0 255.255.255.0//配置VLAN 10虚拟接口IP作为DHCP客户端的网关IPMS(dhcp-config)#default-router 192.168.1.254MS(dhcp-config)#exitMS(config)#ip dhcp pool vlan20pool //地址池名称为vlan10poolMS(dhcp-config)#network 192.168.101.0 255.255.255.0MS(dhcp-config)#default-router 192.168.101.254//配置VLAN20虚拟接口IP作为DHCP客户端的网关IPMS(dhcp-config)#exit//三层交换机的F0/23与F0/24端口捆绑为聚合链路MS(config)#interface range f0/23-24MS(config-if-range)#channel-group 1 mode on //通道组1工作模式为on//在三层交换机上查看聚合端口MS(config-if)#endMS#show interface etherchannel//在三层交换机上查看链路聚合配置MS#show etherchannel summary//三层交换机聚合链路配置为交换机之间VLAN的Trunk链路MS(config)#int port-channel 1 //端口通道1MS(config-if)#switchport trunk encapsulation dot1q//配置Trunk链路封装格式为802.1qMS(config-if)#switchport mode trunk2、二层交换机配置//创建VLAN 10与VLAN 20Switch(config)#vlan 10Switch(config-vlan)#vlan 20Switch(config-vlan)#vlan 20Switch(config-vlan)#exit//划分F0/1端口属于VLAN 10,F0/2端口属于VLAN 20Switch(config)#int f0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#int f0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 20Switch(config-if)#exitSwitch(config)#//二层交换机的F0/23与F0/24端口捆绑为聚合链路Switch(config)#int range f0/23-24Switch(config-if-range)#channel-group 1 mode on//通道组1工作模式为on //在二层交换机上查看聚合端口Switch#show interface etherchannel//在二层交换机上查看链路聚合配置Switch#show etherchannel summary//二层交换机聚合链路配置为交换机之间VLAN的Trunk链路Switch(config)#int port-channel 1 //端口通道1Switch(config-if)#switchport mode trunk3、两台PC配置为DHCP客户端,实现自动从三层交换机(DHCP服务)获取IP地址、子网掩码及网关IP此时两PC机之间相互无法访问(属于不同VLAN)若要实现不同VLAN的主机间能够相互访问,必须在三层交换机配置路由功能即可。
H3C三层交换机DHCP服务器配置实例

H3C三层交换机DHCP服务器配置实例H3C三层交换机DHCP服务器配置实例H3C三层交换机作为DHCP服务器,那么其中DHCP服务器要怎么配置呢?下面yjbys店铺为大家分享最新交换机作为DHCP服务器的配置实例,希望对同学们学习DHCP服务器配置有所帮助!DHCP采样UDP链接方式,服务器端口为67,客户机端口为68.实验环境(H3C ENSP)一、配置要点a:在路由器上配置DHCPserver第一步:(系统视图)开启DHCP :DHCP enable第二步:(进入接口视图)为与客户端相连的`端口配置ip地址第三步:(系统视图)建立DHCP地址池 :ip pool aaa第四步:(pool模式下)配置network网段、Gateway-list网关、dns-list DNS服务器地址、excluded-ip-address需要排除的ip 地址第五步:进入接口模式,在接口中启动DHCP动态分配:dhcp select globle第六步:将客户端的dhcp启动即可实例:路由器配置:#sysname Huawei#dhcp enable#ip pool aaagateway-list 192.168.1.1network 192.168.1.0 mask 255.255.255.0excluded-ip-address 192.168.1.10dns-list 192.168.1.10 192.168.10.10#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0ip address 192.168.1.1 255.255.255.0dhcp select global#interface Ethernet0/0/1#interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#user-interface con 0user-interface vty 0 4user-interface vty 16 20#returnb:在三层交换机中为不同vlan配置不同DHCPserver第一步:在三层交换机上建好vlan并分配好端口第二步:(系统视图)开启DHCP :DHCP enable第三步:为每一个vlan都建立一个相应的DHCP地址池(命名可以随意)第四步:为每一个地址池配置好自己相应vlan的network网段、Gateway-list网关、dns-list DNS服务器地址、excluded-ip-address需要排除的ip 地址第五步:进入每一个vlan接口,先配置好各自的ip地址,然后在启动DHCP动态分配:dhcp select globle 第六步:将客户端的dhcp启动即可实例:三层交换机配置:[Huawei]display current-configuration#sysname Huawei#vlan batch 2 to 3#cluster enablentdp enablendp enable#drop illegal-mac alarm#dhcp enable#diffserv domain default#drop-profile default#ip pool aaanetwork 192.168.1.0 mask 255.255.255.0 excluded-ip-address 192.168.1.1dns-list 192.168.10.10#ip pool bbbnetwork 192.168.2.0 mask 255.255.255.0 excluded-ip-address 192.168.2.1dns-list 192.168.10.10#aaaauthentication-scheme default authorization-scheme default accounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface Vlanif2ip address 192.168.1.1 255.255.255.0 dhcp select global#interface Vlanif3ip address 192.168.2.1 255.255.255.0 dhcp select global#interface MEth0/0/1#interface Ethernet0/0/1port link-type accessport default vlan 2#interface Ethernet0/0/2#interface Ethernet0/0/3interface Ethernet0/0/4 port link-type access port default vlan 3#interface Ethernet0/0/5 #interface Ethernet0/0/6 #interface Ethernet0/0/7 #interface Ethernet0/0/8 #interface Ethernet0/0/9 #interface Ethernet0/0/10 #interface Ethernet0/0/11 #interface Ethernet0/0/12 #interface Ethernet0/0/13 #interface Ethernet0/0/14 #interface Ethernet0/0/15 #interface Ethernet0/0/16 #interface Ethernet0/0/17interface Ethernet0/0/18#interface Ethernet0/0/19#interface Ethernet0/0/20#interface Ethernet0/0/21#interface Ethernet0/0/22#interface GigabitEthernet0/0/1 #interface GigabitEthernet0/0/2 #interface NULL0#user-interface con 0user-interface vty 0 4#return。
cisco三层交换机配置vlan和DHCP攻略

cisco三层交换机配置vlan和DHCP攻略ip dhcp pool IT_WEIXIU //配置DHCP服务network 10.42.86.0 255.255.255.224 //配置DHCP网段default-router 10.42.86.30 //DHCP分配网关(应为vlan接口IP)dns-server 10.42.0.82 10.1.2.9 10.1.2.70 //DHCP分配DNSnetbios-name-server 10.1.2.9 10.1.2.70 10.1.2.222 //DHCP分配WINS!vlan 100 //建立vlanname IT_weixiu //vlan命名interface FastEthernet0/25switchport access vlan 100!interface FastEthernet0/26switchport access vlan 100!interface FastEthernet0/27switchport access vlan 100!interface FastEthernet0/28switchport access vlan 100!interface FastEthernet0/29switchport access vlan 100!interface FastEthernet0/30switchport access vlan 100 //端口指定vlan!!interface Vlan100 //配置vlan接口description IT_weixiuip address 10.42.86.30 255.255.255.224 //配置vlan接口IP为网关no ip proxy-arpip ospf 100 area 42 //加入ospf动态路由图(因下方已包含,本条不必要)!interface Vlan200description To_SongZiip address 10.42.85.30 255.255.255.224ip helper-address 10.42.0.16 //指定本网段DHCP服务器为分公司(不指定本条即由本网段内提供DHCP服务或不提供)no ip proxy-arpip ospf 100 area 42 ┗━DHCP服务采用广播协议,故:1不能跨网段;2同一网段只能一台DHCP服务! “ip helper-address”命令即专用来解决DHCP不能跨网段问题。
三层交换机上跨网段多VLAN的DHCP中继

实现与 Intemet 的通信,使用合法的 IP 地址、DNS 和网
关地址值。一台电脑 IP 地址设为 192.168.10.2,网关设为
192.168.10.1。另一台电脑 IP 设置为 192.168.20.2,网关设为
192.168.20.1,。另一台电脑 IP 设置为 192.168.30.30,网关为
实验结果与 体会
通过本次实验,通过三层交换机上配置 DHCP 中继来实现了 VLAN 中主 机 IP 的动态分配,在实验中遇到了很多困难,但在经过多次调试后完成了 IP 地址自动分配。
10. 将 S2 的 f0/24 口设为 trunk 口 11. 在 S3 中创建 vlan10、20、30 12. 为 S3 的虚拟接口 vlan10、20、30 设置地址
13..将 S3 的 f0/23 和 f0/24 口设为 trunk 口
14. 在 S3 中打开 DHCP 服务,并指定 DHCP 服务器地址
实
192.168.30.1
2.进入交换配置入口 验
步
骤
3.进入全局配置模式
4. 在 S1 中创建 vlan30
5. 将 S1 的 f0/1 口加入 vlan30
6. 将 S1 的 f0/24 口设为 trunk 口 7. 将 S1 的 f0/24 口设为 trunk 口 8. 在 S2 中创建 vlan10、20 9.将 S2 的 f0/1 加入 vlan10,f0/2 加入 vlan20
三层交换机上跨网段多 VLAN 的 DHCP 中继
实验室Байду номын сангаас称:
成绩:
姓名
学号
班级
试验台号
试验 组号
实验日期
如何在三层交换机配置DHCP

51CTO首页我的博客搜索社区:论坛博客下载读书更多登录注册首页|微软活动|Cisco |Security |VoIP |Office |Windows Server |Windows 7|IT职业生涯51cto 51cto博客之星博客之星 用户名:hackerjx 文章数:61 评论数:489 访问量:232011 无忧币:2031 博客积分:3371 博客等级:7注册日期:2008-05-18[Win 7]原来的桌面属性那.. 追梦五年-我和51CTO的那些事 Windows 7 中的“亮.. Windows XP Mode,发布应.. Office 2010 Beta 简体中.. 802.1X认证+DHCP+ACS Ser.. 配置在一台三层交换上,.. 揭秘Cisco NBAR封杀BT和.. 解密Windows 7中的XP Mode 企业网络中部署Cisco ACS.. 配置多台三层交换VLAN间.. [Win 7]安装Windows 7好.. 大中型企业中部署应用AAA.. Cisco SSL VPN 配置详解 配置Cisco IOS EASY VPN ..ISCW实验3:配置Cisco PP.. Cisco IP Communicator .. 使用SDM配置Cisco Easy VPN博客博客统计统计统计信息信息热门热门文章文章hackerjx 的BLOG写留言邀请进圈子发消息加友情链接进家园 加好友MSN/QQ 论坛 开心 人人 豆瓣 新浪微博 分享到:博主的更多文章>>标签:DHCP 多层交换配置 Cisco原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。
否则将追究法律责任。
/383839/215400通过本实验实验掌握掌握掌握,,如何在如何在Cisco Catalyst Cisco Catalyst Cisco Catalyst 3550 3550 3550交交换机来配置配置DHCP DHCP DHCP服服务,实现对实现对内内网主机分配IP IP地址地址地址,,网关,DNS DNS,,WINS WINS,,租期租期,,域名等域名等。
利用三层交换机自带的DHCP功能实现多VLAN的IP地址自动分配

利用三层交换机自带的DHCP功能实现多VLAN的IP地址自动分配(一) 配置方法一1.同时为多个VLAN的客户机分配地址2.VLAN内有部分地址采用手工分配的方式3.为客户指定网关、Wins服务器等4.VLAN 2的地址租用有效期限为1天,其它为3天5.按MAC地址为特定用户分配指定的IP地址最终配置如下:ip dhcp excluded-address 10.1.1.1 10.1.1.19 //不用于动态地址分配的地址ip dhcp excluded-address 10.1.1.240 10.1.1.254ip dhcp excluded-address 10.1.2.1 10.1.2.19!ip dhcp pool global //global是pool name,由用户指定network 10.1.0.0 255.255.0.0 //动态分配的地址段domain-name //为客户机配置域后缀dns-server 10.1.1.1 10.1.1.2 //为客户机配置dns服务器netbios-name-server 10.1.1.5 10.1.1.6 //为客户机配置wins服务器netbios-node-type h-node //为客户机配置节点模式(影响名称解释的顺利,如h-node=先通过wins服务器解释...)lease 3 //地址租用期限: 3天ip dhcp pool vlan1network 10.1.1.0 255.255.255.0 //本pool是global的子pool, 将从global pool继承domain-name等optiondefault-router 10.1.1.100 10.1.1.101 //为客户机配置默认网关!ip dhcp pool vlan2 //为另一VLAN配置的poolnetwork 10.1.2.0 255.255.255.0default-router 10.1.2.100 10.1.2.101lease 1!ip dhcp pool vlan1_john //总是为MAC地址为...的机器分配...地址host 10.1.1.21 255.255.255.0client-identifier 010050.bade.6384 //client-identifier=01加上客户机网卡地址!ip dhcp pool vlan1_tomhost 10.1.1.50 255.255.255.0client-identifier 010010.3ab1.eac8相关的DHCP调试命令:no service dhcp //停止DHCP服务[默认为启用DHCP服务]sh ip dhcp binding //显示地址分配情况show ip dhcp conflict //显示地址冲突情况debug ip dhcp server {events | packets | linkage} //观察DHCP服务器工作情况如果DHCP客户机分配不到IP地址,常见的原因有两个。