DHCP-基于全局地址池配置

概述:S1模拟为公司核心交换机,并作为DHCP服务器为市场部和财务部客户端分配IP地址。

S1配置

<Huawei>sys

[Huawei]sysname S1

[S1]vlan batch 10 20

[S1]int g0/0/1

[s1-GigabitEthernet0/0/1]port link-type trunk

[s1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10

[s1-GigabitEthernet0/0/1]int g0/0/2

[s1-GigabitEthernet0/0/2]port link-type trunk

[s1-GigabitEthernet0/0/2]port trunk allow-pass vlan 20

[s1-GigabitEthernet0/0/2]int vlan 10

[s1-Vlanif10]ip add 192.168.1.1 24

[s1-Vlanif10]dhcp select global

[s1-Vlanif10]int vlan 20

[s1-Vlanif20]ip add 192.168.2.1 24

[s1-Vlanif20]dhcp select global

[s1-Vlanif20]q

[S1]ip pool shichang

[s1-ip-pool-shichang]network 192.168.1.0 mask 24

[s1-ip-pool-shichang]gateway-list 192.168.1.1

[s1-ip-pool-shichang]dns-list 219.141.140.10 8.8.8.8

[s1-ip-pool-shichang]lease day 2 hour 0 minute

[s1-ip-pool-shichang]excluded-ip-address 192.168.1.2 192.168.1.100

[s1-ip-pool-shichang]q

[S1]ip pool caiwu

[s1-ip-pool-caiwu]network 192.168.2.0 mask 24

[s1-ip-pool-caiwu]gateway-list 192.168.2.1

[s1-ip-pool-caiwu]dns-list 219.141.140.10 8.8.8.8

[s1-ip-pool-caiwu]lease day 3 hour 0 minute 0

[s1-ip-pool-caiwu]excluded-ip-address 192.168.2.2 192.168.2.100

[s1-ip-pool-caiwu]static-bind ip-address 192.168.2.115 mac-address 5489-9873-3534

[s1-ip-pool-caiwu]q

[S1]

 

S2配置

<s2>sys

[s2]vlan 10

[s2]int e0/0/0

[s2-Ethernet0/0/1]port link-type trunk

[s2-Ethernet0/0/1]port trunk allow-pass vlan 20

[s2-Ethernet0/0/1]int e0/0/2

[s2-Ethernet0/0/2]port link-type access

[s2-Ethernet0/0/2]port default vlan 20

[s2-Ethernet0/0/2]q [s2]

S3配置

<s3>sys

[s3]vlan 10

[s3]int e0/0/0

[s3-Ethernet0/0/1]port link-type trunk

[s3-Ethernet0/0/1]port trunk allow-pass vlan 10

[s3-Ethernet0/0/1]int e0/0/2

[s3-Ethernet0/0/2]port link-type access

[s3-Ethernet0/0/2]port default vlan 10

[s3-Ethernet0/0/2]q

[s3]

 

转载于:https://www.cnblogs.com/Ro-Sw/articles/10671385.html

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值