某院校网络项目,请根据项目步骤完成配置
拓扑图
二、配置主机名称
1、根据拓扑图配置设备主机名,配置如下
配置每个名称
例:
[Huawei]sy Acc01
三、配置链路聚合
1、 在Agg01 和Agg02 的互联的链路使用Lacp 配置链路聚合,只允许存在一条活动链路。
2、 在 Agg01 上使用 dis eth-trunk 1 查看只要存在一条“Selected”的链路即可。
Agg01
[Agg01]lacp priority 10
[Agg01]interface Eth-Trunk 1
[Agg01-Eth-Trunk1]mode lacp-static
[Agg01-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5
[Agg01-Eth-Trunk1]max active-linknumber 1
[Agg01-Eth-Trunk1]lacp preempt enable
[Agg01-Eth-Trunk1]q
[Agg01]dis eth-trunk 1
Agg02
[Agg02]interface Eth-Trunk 1
[Agg02-Eth-Trunk1]mode lacp-static
[Agg02-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5
四、VLAN 配置
设备名称 | 端口 | 链路类型 | VLAN 参数 |
Acc01 | GE0/0/1 | Trunk | Pvid:1 Allow pass:10 20 |
GE0/0/2 | Trunk | Pvid:1 Allow pass:10 20 | |
Ethernet0/0/1 | Hybrid | Pvid:10 Untaged vlan:10 | |
Ethernet0/0/2 | Hybrid | Pvid:20 Untaged vlan:20 | |
Acc02 | GE0/0/1 | Trunk | Pvid:1 Allow pass:10 20 |
GE0/0/2 | Trunk | Pvid:1 Allow pass:10 20 | |
Ethernet 0/0/1 | Access | Pvid:10 | |
Ethernet 0/0/2 | Access | Pvid:20 | |
Agg01 | GE0/0/1 | Trunk | Pvid:1 Allow pass:10 20 |
GE0/0/2 | Trunk | Pvid:1 Allow pass:10 20 | |
Eth-trunk 1 | Trunk | Pvid:1 Allow pass:1 10 20 | |
G0/0/6 | Access | Pvid:100 | |
Agg02 | GE0/0/1 | Trunk | Pvid:1 Allow pass:10 20 |
GE0/0/2 | Trunk | Pvid:1 Allow pass:10 20 | |
Eth-trunk 1 | Trunk | Pvid:1 Allow pass:1 10 20 | |
GE0/0/6 | Access | Pvid:200 |
1、 在 Acc01,Acc02 创建 vlan10,20。
2、 在 Agg01,Agg02 创建 vlan10,vlan20,vlan100,vlan200。注意 Agg01 不用创建 vlan200,Agg02不用创建 Vlan100。
3、 根据 VLAN 配置表,将 eth-trunk 和交换机互联的链路配置为 Trunk 以及主机加入到对应 VLAN中。
Acc01
[Acc01]vlan batch 10 20
[Acc01]int GigabitEthernet 0/0/1
[Acc01-GigabitEthernet0/0/1]port link-type trunk
[Acc01-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[Acc01-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1[Acc01-GigabitEthernet0/0/1]q
g0/0/2与g0/0/1命令一致,下面使用简写
[Acc01]int g0/0/2
[Acc01-GigabitEthernet0/0/2]p l t
[Acc01-GigabitEthernet0/0/2]p t a v 10 20
[Acc01-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
q
[Acc01]int e0/0/1
[Acc01-Ethernet0/0/1]port link-type hybrid
[Acc01-Ethernet0/0/1]port hybrid pvid vlan 10
[Acc01-Ethernet0/0/1]port hybrid untagged vlan 10
q
[Acc01]int e0/0/2
[Acc01-Ethernet0/0/2]p h p v 20
[Acc01-Ethernet0/0/2]p h u v 20
Acc02
[Acc02]int g0/0/1
[Acc02-GigabitEthernet0/0/1]p l t[Acc02-GigabitEthernet0/0/1]p t a v 10 20
[Acc02-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[Acc02-GigabitEthernet0/0/1]int g0/0/2
[Acc02-GigabitEthernet0/0/2]p l t
[Acc02-GigabitEthernet0/0/2]p t a v 10 20
[Acc02-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
[Acc02-GigabitEthernet0/0/2]int e0/0/1
[Acc02-Ethernet0/0/1]port link-type access
[Acc02-Ethernet0/0/1]port default vlan 10
[Acc02-Ethernet0/0/1]int e0/0/2
[Acc02-Ethernet0/0/2]p l a
[Acc02-Ethernet0/0/2]p d v 20
Agg01
[Agg01]vlan batch 10 20 100
[Agg01]int g0/0/1
[Agg01-GigabitEthernet0/0/1]p l t
[Agg01-GigabitEthernet0/0/1]p t a v 10 20
[Agg01-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[Agg01-GigabitEthernet0/0/1]int g0/0/2
[Agg01-GigabitEthernet0/0/2]p l t
[Agg01-GigabitEthernet0/0/2]p t a v 10[Agg01-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
q
[Agg01]int Eth-Trunk 1
[Agg01-Eth-Trunk1]p l t
[Agg01-Eth-Trunk1]p t a v 10 20 1
[Agg01-Eth-Trunk1]int g0/0/6
[Agg01-GigabitEthernet0/0/6]p l a
[Agg01-GigabitEthernet0/0/6]p d v 100
Agg02
[Agg02]vlan batch 10 20 100
[Agg02]int g0/0/1
[Agg02-GigabitEthernet0/0/1]p l t
[Agg02-GigabitEthernet0/0/1]p t a v 10 20
[Agg02-GigabitEthernet0/0/1] undo port trunk allow-pass vlan 1
[Agg02-GigabitEthernet0/0/1]int g0/0/2
[Agg02-GigabitEthernet0/0/2]p l t
[Agg02-GigabitEthernet0/0/2]p t a v 10[Agg02-GigabitEthernet0/0/2] undo port trunk allow-pass vlan 1
q
[Agg02]int Eth-Trunk 1
[Agg02-Eth-Trunk1]p l t
[Agg02-Eth-Trunk1]p t a v 10 20 1
[Agg02-Eth-Trunk1]int g0/0/6
[Agg02-GigabitEthernet0/0/6]p l a
[Agg02-GigabitEthernet0/0/6]p d v 200
五、配置 RSTP 协议
1、Agg01,Agg02,Acc01,Acc02 运行 RSTP 协议,将 Agg01 配置为根桥,优先级为 4096,Agg02
配置为备份根桥,优先级为 8192.
2、将交换机连接 PC 的端口配置为边缘端口,可以快速进入到转发状态,并在 Acc01,Acc02 上启用BPDU 防护功能。
3、 将 Acc02 和 Agg02 的相应接口的 RSTP 开销修改为 200000,将 Acc01 和 Agg01 的相应接口的RSTP 开销修改为 200000,并开启环路防护功能。
4、在 Agg01 和 Agg02 的 G0/0/6 端口上启用 STP 的根防护功能。
1.
Agg01
[Agg01]stp mode rstp
[Agg01]stp priority 4096
Agg02[Agg02]stp mode rstp
[Agg02]stp priority 8192
Acc01
[Acc01]stp mode rstp
Acc02
[Acc02]stp mode rstp
2.
Acc01
[Acc01]port-group group-member Ethernet 0/0/1 to Ethernet 0/0/2
[Acc01-port-group]stp edged-port enable
q
[Acc01]stp bpdu-protection
Acc02
[Acc02]port-group group-member Ethernet 0/0/1 to Ethernet 0/0/2
[Acc02-port-group]stp edged-port enable
q
[Acc02]stp bpdu-protection
3.
Agg01/Agg02/Acc01/Acc02 接口都一致
[Agg01]int g0/0/2
[Agg01-GigabitEthernet0/0/2]stp cost 200000
[Agg01-GigabitEthernet0/0/2]stp loop-protection
4.
Agg01/Agg02
[Agg02-GigabitEthernet0/0/2]int g0/0/6
[Agg02-GigabitEthernet0/0/6]stp root-protection
六、配置 IP 地址
设备名称 | 接口 | IP 地址 |
Agg01 | Vlanif10 | 192.168.10.1/24 |
Vlanif20 | 192.168.20.1/24 | |
Vlanif100 | 10.1.100.1/30 | |
Loopback0 | 1.1.1.1/32 | |
Agg02 | Vlanif10 | 192.168.10.2/24 |
Vlanif20 | 192.168.20.2/24 | |
Vlanif200 | 10.1.200.1/30 | |
Loopback0 | 2.2.2.2/32 | |
Core1 | GE0/0/0 | 10.1.100.2/30 |
GE0/0/1 | 10.1.12.1/30 | |
GE0/0/2 | 10.1.22.1/30 | |
Looback0 | 3.3.3.3/32 | |
Core2 | GE0/0/0 | 10.1.200.2/30 |
GE0/0/1 | 10.1.12.2/30 | |
GE0/0/2 | 10.1.33.1/30 | |
Loopback0 | 4.4.4.4/32 | |
HZ-XiaoYuan-Edge HZ-XiaoYuan-Edge | GE0/0/0 | 10.1.22.2/30 |
GE0/0/1 | 10.1.33.2/30 | |
GE0/0/2 | 172.16.1.1/30 | |
Serial1/0/0 | 202.1.1.1/30 | |
Loopack0 | 5.5.5.5/32 | |
SH-XiaoYuan-Edge | GE0/0/0 | 192.168.30.254/24 |
GE0/0/1 | 172.16.1.2/30 | |
Loopback0 | 6.6.6.6/32 | |
HZ-EDU-Edge | Serial1/0/1 | 202.1.1.2/30 |
GE0/0/0 | 8.8.8.1/24 |
ip例:
[Agg01]int Vlanif 10
[Agg01-Vlanif10]ip add 192.168.10.1/24
[Agg01-Vlanif10]dis ip int brief 可检查端口ip是否配错了
七、配置 VRRP 协议。
1、在 Agg01 和 Agg02 上配置 VRRP 协议,Vlan10 的 vrid 为 1,Vlan20 的 vrid 为 2,Vlan10
虚拟网关地址为 192.168.10.254/20.254。
2、Agg01 为VLAN10 主网关,Vlan20 的备份网关,Agg02 为 VLAN20 主网关,优 VLAN10 的备份网关。主网关的优先级均为 120。
3、为了防止上行链路失效,当 Agg01 和 Agg02 的 G0/0/6 接口失效,则主网关优先级自己下降
30,当链路恢复,启用抢夺功能,抢夺延迟为 10s。
4、为了保证安全性,启动 VRRP 认证,vrid1 使用 md5 认证,密码为 huawei, vrid2 使用明文认证,密码为 huawei。
Agg01
[Agg01]int v 10
[Agg01-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
[Agg01-Vlanif10]vrrp vrid 1 priority 120
[Agg01-Vlanif10]vrrp vrid 1 track interface g0/0/6 reduced 30
[Agg01-Vlanif10]vrrp vrid 1 preempt-mode timer delay 10
[Agg01-Vlanif10]vrrp vrid 1 authentication-mode md5 huawei
q
[Agg01]int v 20
[Agg01-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.254
[Agg01-Vlanif20]vrrp vrid 2 authentication-mode simple huaweiAgg02
[Agg02]int Vlanif 10
[Agg02-Vlanif10]vrrp vrid 1 virtual-ip 192.168.10.254
[Agg02-Vlanif10]vrrp vrid 1 a m huawei
q
[Agg02]int v 20
[Agg02-Vlanif20]vrrp vrid 2 virtual-ip 192.168.20.254
[Agg02-Vlanif20]vrrp vrid 2 priority 120
[Agg02-Vlanif20]vrrp vrid 2 track interface g0/0/6 reduced 30
[Agg02-Vlanif20]vrrp vrid 2 preempt-mode timer delay 10
[Agg02-Vlanif20]vrrp vrid 2 authentication-mode simple huawei
dis vrrp 检查主备配置是否有误
八、配置 OSPF 协议
在 Agg01,Agg02,Core1 ,Core2,HZ-XiaoYuan-Edge,SH-XiaoYuan-Edge 上配置 OSPF 协议, 配置为骨干区域,进程号为 1,配置每台设备的全局 router id 为 loopback0 接口的地址,并作为 OSPF 协议的 router id,所有接口采用精确宣告的方式。
1、将 Agg01 的 vlanif10, vlanif20, vlanif100,loopback0 加入到 ospf 进程 1 中。2、将 Agg02 的 vlanif10, vlanif20, vlanif200,loopback0 加入到 ospf 进程 1 中。3、将 Core1,Core2 的所有接口加入到 ospf 进程 1,
4、将 HZ-XiaoYuan-Edge 的 G0/0/0,G0/01,G0/0/2 接口加入到 ospf 进程 1 中。
5、将 SH-XiaoYuan-Edge 的 G0/0/0,GE0/0/1 加入到 OSPF 进程 1 中。
6、配置 OSPF 区域认证,认证方式为 md5,密钥号为 1,加密方式为 ciper,密码为 Huawei。
7、配置 HZ-XiaoYuan-edge 的 G0/0/0 接口的优先级为最高,使其成为 DR。
8、在 Agg01,Agg02 上将Vlanif10 和Vlanif20 的OSPF 开销修改为 100,将Core2 和 HZ-XiaoYuan- Edge 之间的链路 OSPF 开销修改为 100.
9、将 HZ-XiaoYuan-Edge 的 G0/0/2 和 SH-XiaoYuan-Edge 的 G0/0/1 的链路配置为 P2P 链路。
1-6
Agg01
[Agg01]ospf 1 router-id 1.1.1.1
[Agg01-ospf-1]area 0
[Agg01-ospf-1-area-0.0.0.0]network 192.168.10.1 0.0.0.0
[Agg01-ospf-1-area-0.0.0.0]network 192.168.20.1 0.0.0.0
[Agg01-ospf-1-area-0.0.0.0]network 10.1.100.1 0.0.0.0
[Agg01-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[Agg01-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher Huawei
Agg02
[Agg02]ospf 1 r 2.2.2.2
[Agg02-ospf-1]area 0
[Agg02-ospf-1-area-0.0.0.0]network 192.168.10.2 0.0.0.0
[Agg02-ospf-1-area-0.0.0.0]network 192.168.20.2 0.0.0.0
[Agg02-ospf-1-area-0.0.0.0]network 10.1.200.1 0.0.0.0
[Agg02-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[Agg02-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher Huawei
Core1
[Core1]ospf 1 r 3.3.3.3
[Core1-ospf-1]area 0[Core1-ospf-1-area-0.0.0.0]network 10.1.100.2 0.0.0.0
[Core1-ospf-1-area-0.0.0.0]network 10.1.12.1 0.0.0.0
[Core1-ospf-1-area-0.0.0.0]network 10.1.22.1 0.0.0.0
[Core1-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0[Core1-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher Huawei
Core2
[Core2]ospf 1 router-id 4.4.4.4
[Core2-ospf-1]area 0
[Core2-ospf-1-area-0.0.0.0]network 10.1.200.2 0.0.0.0
[Core2-ospf-1-area-0.0.0.0]network 10.1.12.2 0.0.0.0
[Core2-ospf-1-area-0.0.0.0]network 10.1.33.1 0.0.0.0
[Core2-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0[Core2-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher Huawei
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge]ospf 1 router-id 5.5.5.5
[HZ-XiaoYuan-Edge-ospf-1]area 0
[HZ-XiaoYuan-Edge-ospf-1-area-0.0.0.0]network 10.1.22.2 0.0.0.0
[HZ-XiaoYuan-Edge-ospf-1-area-0.0.0.0]network 10.1.33.2 0.0.0.0
[HZ-XiaoYuan-Edge-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.0[HZ-XiaoYuan-Edge-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[HZ-XiaoYuan-Edge-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher Huawei
SH-XiaoYuan-Edge
[SH-XiaoYuan-Edge]ospf 1 router-id 6.6.6.6
[SH-XiaoYuan-Edge-ospf-1]area 0
[SH-XiaoYuan-Edge-ospf-1-area-0.0.0.0]network 192.168.30.254 0.0.0.0
[SH-XiaoYuan-Edge-ospf-1-area-0.0.0.0]network 172.16.1.2 0.0.0.0[SH-XiaoYuan-Edge-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0
[SH-XiaoYuan-Edge-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher Huawei7.
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge-ospf-1-area-0.0.0.0]int g0/0/0
[HZ-XiaoYuan-Edge-GigabitEthernet0/0/0]ospf dr-priority 2558.
Agg01/Agg02
[Agg01]int Vlanif 10
[Agg01-Vlanif10]ospf cost 100[Agg01-Vlanif10]int v 20
[Agg01-Vlanif20]ospf cost 100Core2
[Core2]int g0/0/2
[Core2-GigabitEthernet0/0/2]ospf cost 100[HZ-XiaoYuan-Edge-GigabitEthernet0/0/0]int g0/0/1
[HZ-XiaoYuan-Edge-GigabitEthernet0/0/1]ospf cost 1009.
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge-GigabitEthernet0/0/1]int g0/0/2
[HZ-XiaoYuan-Edge-GigabitEthernet0/0/2]ospf network-type p2pSH-XiaoYuan-Edge
[SH-XiaoYuan-Edge]int g0/0/1
[SH-XiaoYuan-Edge-GigabitEthernet0/0/1]ospf network-type p2p
九、配置 PAP 和 CHAP 认证
1、配置 PAP 认证,HZ-XiaoYuan-Edge 做为认证方,HZ-EDU-Edge 做为被认证方,用户名为 user1,密码为 Huawei@123, 密码模式为 simple。
2、配置 CHAP 认证,HZ-EDU-Edge 做为认证方,HZ-XiaoYuan-Edge 做为被认证方,用户名为 user2,密码为 Huawei,密码模式为 cipher
1.
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge]aaa
[HZ-XiaoYuan-Edge-aaa]local-user user1 password cipher Huawei@123
[HZ-XiaoYuan-Edge-aaa]local-user user1 service-type ppp
[HZ-XiaoYuan-Edge-aaa]int s1/0/0
[HZ-XiaoYuan-Edge-Serial1/0/0]ppp authentication-mode papHZ-EDU-Edge
[HZ-EDU-Edge]int s1/0/1
[HZ-EDU-Edge-Serial1/0/1]ppp pap local-user user1 password simple Huawei@1232.
HZ-EDU-Edge
[HZ-EDU-Edge]aaa
[HZ-EDU-Edge-aaa]local-user user2 password cipher Huawei
[HZ-EDU-Edge-aaa]local-user user service-type ppp
[HZ-EDU-Edge-aaa]int s1/0/1
[HZ-EDU-Edge-Serial1/0/1]ppp authentication-mode chapHZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge]int s1/0/0
[HZ-XiaoYuan-Edge-Serial1/0/0]ppp chap user user2
[HZ-XiaoYuan-Edge-Serial1/0/0]ppp chap password cipher Huawei
十、配置静态路由
1、在 HZ-XiaoYuan-Edge 配置静态路由,使得能访问 PC5,下一跳为 HZ-EDU-Edge,并配置缺省路由访问其他外部网络。
2、在 HZ-EDU-Edge 上配置静态路由使得教育网能访问校园网所有存在 PC 的网段,访问校园网其他网段时采用缺省路由。
3、在 HZ-XiaoYuan-Edge 引入静态路由到 OSPF 网络中,开销类型为 1,默认为类型 2.
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge]ip route-static 0.0.0.0 0.0.0.0 172.16.1.2
[HZ-XiaoYuan-Edge]ip route-static 8.8.8.8 255.255.255.255 202.1.1.2
[HZ-XiaoYuan-Edge]ospf 1
[HZ-XiaoYuan-Edge-ospf-1]import-route static cost 1 type 2HZ-EDU-Edge
[HZ-EDU-Edge]ip route-static 192.168.0.0 16 202.1.1.1
[HZ-EDU-Edge]ip route-static 0.0.0.0 0 202.1.1.1
十一、配置 DHCP 服务
1、在 Agg02 上的 vlanif20 接口上启用基于接口地址池的 DHCP 服务,为 PC2 动态分配地址,DNS 为 8.8.8.8。
2、在 SH-XiaoYuan-Edge 上配置基于全局地址池的 DHCP 服务,为 PC4 提供动态地址分配服务。网关为 192.168.30.254,DNS 为 8.8.8.8.
Agg02
[Agg02]dhcp enable
[Agg02]int v 20
[Agg02-Vlanif20]dhcp select interface
[Agg02-Vlanif20]dhcp server dns-list 8.8.8.8SH-XiaoYuan-Edge
[SH-XiaoYuan-Edge]dhcp en
[SH-XiaoYuan-Edge]ip pool 1
[SH-XiaoYuan-Edge-ip-pool-1]gateway-list 192.168.30.254
[SH-XiaoYuan-Edge-ip-pool-1]network 192.168.30.0 mask 255.255.255.0
[SH-XiaoYuan-Edge-ip-pool-1]dns-list 8.8.8.8
[SH-XiaoYuan-Edge-ip-pool-1]int g0/0/0
[SH-XiaoYuan-Edge-GigabitEthernet0/0/0]dhcp select global
十二、配置 NAT
1、 在 HZ-XiaoYuan-Edge 上配置 NAPT,使用 202.1.1.10-202.1.1.20 做为地址池,VLAN10, VLAN20 主机提供上网服务,需要能 ping 通 8.8.8.8,要求 ACL 编号为 2000,要求 address- group 为 1。
2、 在 HZ-XiaoYuan-Edge 上配置 easy ip,为 192.168.30.0/24 网段的用户提供上网服务,PC4 能ping 通 8.8.8.8,要求 ACL 编号为 2001。
3、在 Agg01 上配置 telnet 功能,将 Agg01 的 loopback0 接口映射到公网,让 HZ-EDU-Edeg 使用源地址 8.8.8.1 telnet 203.1.1.1 能管理到 Agg01。
4、 在 Agg01 上配置 telnet 登录服务,认证方式为密码认证,登录密码为 Huawei,使用 cipher 加密密码,登录级别 3。
5、 在 Agg02 配置 FTP 功能,将 Agg02 的 loopabck0 地址映射到公网,让 HZ-EDU-Edege 使用源地址 8.8.8.1 通过访问 ftp 203.1.1.1 访问到 Agg02。Agg02 的 ftp 用户名为 ftp,密码为Huawei,ftp 用户级别为 3。
6、 校园网有一台 WEB 服务器 Server1,希望 Client1 能通过 http:// 203.1.1.2 问到,Server1 的内网地址为 192.168.20.10
1.
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge]nat address-group 1 202.1.1.10 202.1.1.20
[HZ-XiaoYuan-Edge]acl number 2000
[HZ-XiaoYuan-Edge-acl-basic-2000]rule 5 permit source 192.168.10.0 0.0.0.255
[HZ-XiaoYuan-Edge-acl-basic-2000]rule 10 permit source 192.168.20.0 0.0.0.255
[HZ-XiaoYuan-Edge-acl-basic-2000]q
[HZ-XiaoYuan-Edge]int s1/0/0
[HZ-XiaoYuan-Edge-Serial1/0/0]nat outbound 2000 address-group 12.
[HZ-XiaoYuan-Edge]acl number 2001
[HZ-XiaoYuan-Edge-acl-basic-2001]rule 5 permit source 192.168.30.0 0.0.0.255
[HZ-XiaoYuan-Edge-acl-basic-2001]q
[HZ-XiaoYuan-Edge]int s1/0/0
[HZ-XiaoYuan-Edge-Serial1/0/0]nat outbound 20013.
[HZ-XiaoYuan-Edge-Serial1/0/0]nat server protocol tcp global 203.1.1.1 telnet in
side 1.1.1.1 telnet4.
Agg02
[Agg02]user-interface vty 0 4
[Agg02-ui-vty0-4]user privilege level 3
[Agg02-ui-vty0-4]authentication-mode password
[Agg02-ui-vty0-4]set authentication password cipher Huawei
[Agg02-ui-vty0-4]protocol inbound telnet5.
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge-Serial1/0/0]nat server protocol tcp global 203.1.1.1 ftp insid
e 2.2.2.2 ftpAgg02
[Agg02-ui-vty0-4]aaa
[Agg02-aaa]local-user ftp password cipher Huawei
[Agg02-aaa]local-user ftp privilege level 3
[Agg02-aaa]local-user ftp service-type ftp[Agg02-aaa] local-user ftp ftp-directory flash:
[Agg02-aaa]q
[Agg02]user-interface v 0 4
[Agg02-ui-vty0-4]authentication-mode aaa6.
HZ-XiaoYuan-Edge
[HZ-XiaoYuan-Edge-Serial1/0/0]nat server protocol tcp global 202.1.1.2 80 insid
e 192.168.20.10 80
十三、配置 ACL
1、在 HZ-XiaoYuan-Edge 上配置高级 ACL,不允许 1PC3 ping 通 8.8.8.8,要求 ACL 编号为3000。
[HZ-XiaoYuan-Edge]acl 3000
[HZ-XiaoYuan-Edge-acl-adv-3000]rule deny icmp source 192.168.10.20 0.0.0.0 desti
nation 8.8.8.8 0.0.0.0[HZ-XiaoYuan-Edge-acl-adv-3000]int s1/0/0
[HZ-XiaoYuan-Edge-Serial1/0/0]traffic-filter outbound acl 3000
十四、配置 telnet 网管。
在SH-XiaoYuan-Edge 上配置telnet 功能,使用aaa 认证,登录用户为telnet,密码为Huawei@123.密码 cipher 模式加密,登录级别为 15,并只允许 Agg01 的 1.1.1.1 登录 SH-XiaoYuan-Edge 的 6.6.6.6.其他设备均无法登录设备,要求 ACL 编号为 3000。
[SH-XiaoYuan-Edge]acl 3000
[SH-XiaoYuan-Edge-acl-adv-3000]rule permit tcp source 1.1.1.1 0.0.0.0 destinatio
n 6.6.6.6 0.0.0.0
[SH-XiaoYuan-Edge-acl-adv-3000]rule d tcp so any
[SH-XiaoYuan-Edge-acl-adv-3000]int g0/0/1
[SH-XiaoYuan-Edge-GigabitEthernet0/0/1]traffic-filter inbound acl 3000
[SH-XiaoYuan-Edge-GigabitEthernet0/0/1]aaa
[SH-XiaoYuan-Edge-aaa]local-user telnet password cipher Huawei@123
[SH-XiaoYuan-Edge-aaa]local-user telnet privilege level 15
[SH-XiaoYuan-Edge-aaa]local-user telnet ser telnet
[SH-XiaoYuan-Edge]user-interface vty 0 4
[SH-XiaoYuan-Edge-ui-vty0-4]authentication-mode aaa