多个VLAN向DHCP Server请求IP

实验内容:
远端DHCP Server分别为vlan10和20分配IP

实验拓扑:
多个VLAN向DHCP Server请求IP

实验分析:
1,三层交换机和DHCP Server要有分别去往各自的路由
2,要创建一个vlan和交换机直连的路由器通信,注意直连的物理接口要加入这个 vlan

实验配置:
[Switch]vlan batch 10 20
[Switch]dhcp enable
[Switch]inter vlan 10
[Switch-Vlanif10]dhcp select relay
[Switch-Vlanif10]dhcp relay server-ip 4.4.4.2
[Switch-Vlanif10]inter vlan 20
[Switch-Vlanif20]dhcp sel rel
[Switch-Vlanif20]dhcp relay server-ip 4.4.4.2
[Switch-Vlanif20]inter vlan 1
[Switch-Vlanif1]ip add 3.3.3.1 24
[Switch]inter g0/0/1
[Switch-GigabitEthernet0/0/1]port link-type access
[Switch-GigabitEthernet0/0/1]port default vlan 10
[Switch-GigabitEthernet0/0/2]port link-type access
[Switch-GigabitEthernet0/0/2]port default vlan 20
[Switch]ip route-static 4.4.4.0 24 3.3.3.2

[Route2]inter g0/0/0
[Route2-GigabitEthernet0/0/0]ip add 3.3.3.2 24
[Route2-GigabitEthernet0/0/0]inter g0/0/1
[Route2-GigabitEthernet0/0/1]ip add 4.4.4.1 24
[Route2]ip route-static 1.1.1.0 24 3.3.3.1
[Route2]ip route-static 2.2.2.0 24 3.3.3.1

[DHCP Server]dhcp enable
[DHCP Server]inter g0/0/0
[DHCP Server-GigabitEthernet0/0/0]dhcp select global
[DHCP Server]ip pool vlan10
[DHCP Server-ip-pool-vlan10]network 1.1.1.0 mask 24
[DHCP Server-ip-pool-vlan10]gateway-list 1.1.1.1
[DHCP Server-ip-pool-vlan10]lease day 1
[DHCP Server]ip pool vlan20
[DHCP Server-ip-pool-vlan20]network 2.2.2.0 mask 24
[DHCP Server-ip-pool-vlan20]gateway-list 2.2.2.1
[DHCP Server-GigabitEthernet0/0/0]ip add 4.4.4.2 24
[DHCP Server]ip route-static 3.3.3.0 24 4.4.4.1
[DHCP Server]ip route-static 1.1.1.0 24 4.4.4.1
[DHCP Server]ip route-static 2.2.2.0 24 4.4.4.1

实验验证
多个VLAN向DHCP Server请求IP

多个VLAN向DHCP Server请求IP

蔡瑞

转载于:https://blog.51cto.com/xwxhvip/2045615

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值