华为路由器学习指南-基于全局地址…

华为路由器学习指南-基于全局地址池的DHCP服务器的配置示例

R1配置
ip pool vlan10
 gateway-list 10.1.1.1 !-要与VLANIF10接口IP地址一致
 network 10.1.1.0 mask 255.255.255.128 
 excluded-ip-address 10.1.1.2 
 excluded-ip-address 10.1.1.4 
 lease day 10 hour 0 minute 0 
 dns-list 10.1.1.2 
#
ip pool vlan20
 gateway-list 10.1.1.129 
 network 10.1.1.128 mask 255.255.255.128 
 lease day 2 hour 0 minute 0 
 dns-list 10.1.1.2 
#
interface Vlanif10
 ip address 10.1.1.1 255.255.255.128 
 dhcp select global
#
interface Vlanif20
 ip address 10.1.1.129 255.255.255.128 
 dhcp select global
#
interface Ethernet0/0/0
 port link-type trunk
 port trunk allow-pass vlan 10
#
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 20
#
SW1配置
interface Ethernet0/0/1
  port link-type access
  port default vlan 10
#
interface Ethernet0/0/2
  port link-type access
  port default vlan 10
#
interface Ethernet0/0/3
  port link-type trunk
  port trunk allow-pass vlan 10
SW2配置
interface Ethernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 20
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 20
#


display ip pool 
  -----------------------------------------------------------------------
  Pool-name      : vlan10
  Pool-No        : 0
  Position       : Local           Status           : Unlocked
  Gateway-0      : 10.1.1.1        
  Mask           : 255.255.255.128
  VPN instance   : --

  -----------------------------------------------------------------------
  Pool-name      : vlan20
  Pool-No        : 1
  Position       : Local           Status           : Unlocked
  Gateway-0      : 10.1.1.129      
  Mask           : 255.255.255.128
  VPN instance   : --


  IP address Statistic
    Total       :250   
    Used        :3          Idle        :245   
    Expired     :0          Conflict    :0          Disable   :2   

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值