码迷,mamicode.com
首页 > 其他好文 > 详细

H3C ——DHCP配置实列

时间:2017-03-03 19:32:14      阅读:267      评论:0      收藏:0      [点我收藏+]

标签:h3c ——dhcp配置实列

实现场景

   公司网络想实现一部分VLAN使用dhcp服务器动态分配ip地址,另一部分使用核心交换机做dhcp服务器为客户端分配ip地址,本实列信息如下:


VLAN50为管理vlan,vlan41—vlan45使用核心交换作为dhcp服务器,vlan46—vlan48使用dhcp服务器10.100.44.2分配ip地址。

技术分享

配置信息:

<H3C>dis cu

#

 version 5.20, Release 2202

#

 sysname H3C

#

 dhcprelay server-group 1 ip 10.100.44.2(配置DHCP服务器地址)

#

 irfmac-address persistent timer

 irfauto-update enable

 undoirf link-delay

#

 domain default enable system

#

 telnet server enable

#

 undoip ttl-expires

#

vlan 1

#

vlan 41 to 48

#

vlan 50 to 58

#

vlan 100

#

vlan 200

#

vlan 600

#

vlan 800

#

radius scheme system

 server-type extended

 primary authentication 127.0.0.1 1645

 primary accounting 127.0.0.1 1646

 user-name-format without-domain

#

domain system

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

domain trc.beyond

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

#

dhcp server ip-pool 41(创建DHCP地址池)

 network 10.100.41.0 mask 255.255.255.0(配置DHCP动态地址分配范围)

 gateway-list 10.100.41.1(配置DHCP客户端网关地址)

 dns-list 10.100.44.2 114.114.114.114(配置DHCP客户端DNS相关信息)

#

dhcp server ip-pool 42

 network 10.100.42.0 mask 255.255.255.0

 gateway-list 10.100.42.1

 dns-list 10.100.44.2 114.114.114.114

#

dhcp server ip-pool 43

 network 10.100.43.0 mask 255.255.255.0

 gateway-list 10.100.43.1

 dns-list 10.100.44.2 114.114.114.114

#

dhcp server ip-pool 44

 network 10.100.44.0 mask 255.255.255.0

 gateway-list 10.100.44.1

 dns-list 10.100.44.2 114.114.114.114

#

dhcp server ip-pool 45

 network 10.100.45.0 mask 255.255.255.0

 gateway-list 10.100.45.1

 dns-list 10.100.44.2 114.114.114.114

#

dhcp server ip-pool -pool

#

user-group system

#

local-user admin

 password cipher =HKQ#]ZB:0;Q=^Q`MAF4<1!!

 authorization-attribute level 3

 service-type telnet

local-user super

 password cipher =HKQ#]ZB:0;Q=^Q`MAF4<1!!

 authorization-attribute level 3

 service-type telnet

#

interface NULL0

#

interface Vlan-interface41

 ipaddress 10.100.41.1 255.255.255.0

#

interface Vlan-interface42

 ipaddress 10.100.42.1 255.255.255.0

#

interface Vlan-interface43

 ipaddress 10.100.43.1 255.255.255.0

#

interface Vlan-interface44

 ipaddress 10.100.44.1 255.255.255.0

#

interface Vlan-interface45

 ipaddress 10.100.45.1 255.255.255.0

#

interface Vlan-interface46

 ipaddress 10.100.46.1 255.255.255.0(配置VLAN接口地址)

 dhcpselect relay(配置VLAN接口46工作在DHCP中继模式)

 dhcprelay server-select 1(配置VLAN接口46对应DHCP服务器组1

#

interface Vlan-interface47

 ipaddress 10.100.47.1 255.255.255.0

 dhcpselect relay

 dhcprelay server-select 1

#

interface Vlan-interface48

 ipaddress 10.100.48.1 255.255.255.0

 dhcpselect relay

 dhcprelay server-select 1

#

interface Vlan-interface50

 ipaddress 10.100.50.40 255.255.255.0

#

interface GigabitEthernet1/0/1

 portaccess vlan 41

#

interface GigabitEthernet1/0/2

 portaccess vlan 41

#

interface GigabitEthernet1/0/3

 portaccess vlan 41

#

interface GigabitEthernet1/0/4

 portaccess vlan 41

#

interface GigabitEthernet1/0/5

 portaccess vlan 41

#

interface GigabitEthernet1/0/6

 portaccess vlan 42

#

interface GigabitEthernet1/0/7

 portaccess vlan 42

#

interface GigabitEthernet1/0/8

 portaccess vlan 42

#

interface GigabitEthernet1/0/9

 portaccess vlan 42

#

interface GigabitEthernet1/0/10

 portaccess vlan 42

#

interface GigabitEthernet1/0/11

 portaccess vlan 43

#

interface GigabitEthernet1/0/12

 portaccess vlan 43

#

interface GigabitEthernet1/0/13

 portaccess vlan 43

#

interface GigabitEthernet1/0/14

 portaccess vlan 43

#

interface GigabitEthernet1/0/15

 portaccess vlan 43

#

interface GigabitEthernet1/0/16

 portaccess vlan 44

#

interface GigabitEthernet1/0/17

 portaccess vlan 44

#

interface GigabitEthernet1/0/18

 portaccess vlan 44

#

interface GigabitEthernet1/0/19

 portaccess vlan 44

#

interface GigabitEthernet1/0/20

 portaccess vlan 44

#

interface GigabitEthernet1/0/21

 portaccess vlan 45

#

interface GigabitEthernet1/0/22

 portaccess vlan 800

#

interface GigabitEthernet1/0/23

 portaccess vlan 50

#

interface GigabitEthernet1/0/24

 portlink-type trunk

 porttrunk permit vlan all

 porttrunk pvid vlan 50

#

interface GigabitEthernet1/0/25

 shutdown

#

interface GigabitEthernet1/0/26

 shutdown

#

interface GigabitEthernet1/0/27

 shutdown

#

interface GigabitEthernet1/0/28

 shutdown

#

 iproute-static 0.0.0.0 0.0.0.0 10.100.50.130

 iproute-static 10.100.51.0 255.255.255.0 10.100.50.2

 iproute-static 10.100.52.0 255.255.255.0 10.100.50.2

 iproute-static 10.100.53.0 255.255.255.0 10.100.50.2

 iproute-static 10.100.54.0 255.255.255.0 10.100.50.2

 iproute-static 10.100.55.0 255.255.255.0 10.100.50.2

 iproute-static 10.100.56.0 255.255.255.0 10.100.50.10

 iproute-static 10.100.57.0 255.255.255.0 10.100.50.10

 iproute-static 10.100.58.0 255.255.255.0 10.100.50.10

#

 dhcpenable(全局使能DHCP

#

user-interface aux 0 8

user-interface vty 0 4

 userprivilege level 3

 setauthentication password cipher =HKQ#]ZB:0;Q=^Q`MAF4<1!!

 protocol inbound telnet

#

return


本文出自 “Times” 博客,请务必保留此出处http://yunliu.blog.51cto.com/11871317/1903021

H3C ——DHCP配置实列

标签:h3c ——dhcp配置实列

原文地址:http://yunliu.blog.51cto.com/11871317/1903021

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!