内容目录
DHCP综合实验
实验目的
- DHCP服务器属于vlan 88
- 市场部、运营部、设计部分别属于 vlan 10 /20 /30
- 规划每个部门的网关
- PC端自动获取IP地址参数
- 每个vlan 的网段为192.168.xx.0/24(XX是vlan号)
- 所有PC之间互通
老师效果图
配置思路
- DHCP客户端
- DHCP服务器
- 中继 (网关接口)
- 客户端和中继之间的交换网络
- 中继与服务器之间的路由网络
- 验证互通
实验步骤
1.搭建框架
2.配置PC1 - PC6 IP为DHCP
3.对ar1进行配置
开启DHCP全局,配置IP池 默认路由
sys
sys DHCP
un t m
dhcp enable
in g0/0/1
ip add 192.168.88.1 24
dhcp select global
ip policy-based-route
ip pool vlan-10
network 192.168.10.0 mask 24
gateway-list 192.168.10.254
dns-list 8.8.8.8
ip pool vlan-20
network 192.168.20.0 mask 24
gateway-list 192.168.20.254
dns-list 8.8.8.8
ip pool vlan-30
network 192.168.30.0 mask 24
gateway-list 192.168.30.254
dns-list 8.8.8.8
ip route-static 0.0.0.0 0 192.168.88.254
4.配置交换机1 DHCP中继
开启DHCP 建立vlan 10 20 30 88 配置聚合链路 ip地址
sys
sys SW1
un in en
dhcp enable
vlan batch 10 20 30 88 12
in g0/0/1
port link-type access
port default vlan 88
port-group group-member g0/0/2 g0/0/3 g0/0/4
port link-type trunk
port trunk allow-pass vlan all
q
interface Vlanif 10
ip add 192.168.10.254 24
dhcp select relay
dhcp relay server-ip 192.168.88.1
interface Vlanif 30
ip add 192.168.30.254 24
dhcp select relay
dhcp relay server-ip 192.168.88.1
interface Vlanif 12
ip add 192.168.12.1 24
interface Vlanif 88
ip add 192.168.88.254 24
q
ip route-static 192.168.20.0 24 192.168.12.2
5.配置交换机2 SW2
sys
sys SW2
un in en
dhcp enable
vlan batch 10 20 30 12
port-group group-member g0/0/2 g0/0/23
port link-type trunk
port trunk allow-pass vlan all
q
in g0/0/11
port link-type access
port default vlan 10
in g0/0/12
port link-type access
port default vlan 20
q
in Vlanif 20
ip add 192.168.20.254 24
dhcp select relay
dhcp relay server-ip 192.168.88.1
in Vlanif 12
ip add 192.168.12.2 24
q
ip route-static 192.168.88.0 24 192.168.12.1
ip route-static 192.168.10.0 24 192.168.12.1
ip route-static 192.168.30.0 24 192.168.12.1
至于为什么是LSW5 而不是LSW2,那是因为我配错了中间不知道哪里,排错排了一个小时未果,就删了再来了一遍,直接通了,玄学!
6.配置交换机3
un t m
sys
sys SW3
vlan batch 10 20 30
port-group group-member g0/0/3 g0/0/23 g 0/0/24
port link-type trunk
port trunk allow-pass vlan all
q
in g0/0/13
port link-type access
port default vlan 10
in g0/0/14
port link-type access
port default vlan 30
7.配置交换机4
un t m
sys
sys SW4
vlan batch 10 20 30
port-group group-member g0/0/4 g0/0/24
port link-type trunk
port trunk allow-pass vlan all
q
in g0/0/15
port link-type access
port default vlan 20
in g0/0/16
port link-type access
port default vlan 30
下面是PC1-PC6的截图
下面是PC1 ping通PC2-PC6的截图
到这里这个实验就结束了!,下面是最终成果图
Comments 2 条评论
博主 bets10 giris
这是一条私密评论
博主 porno
这是一条私密评论