OSPF、ACL以及Telnet实验
一、搭建拓扑
二、设备配置
·R1配置
systemview # 进入系统视图
int g0/0/0 # 进入g0/0/0接口视图
ip add 10.1.2.1 24 # 配置IP地址
int loop 0 # 进入loopback 0 接口
ip add 10.1.1.1 24 # 配置IP地址
int loop 1
ip add 10.1.4.1 24
ospf # 创建ospf
area 0 # 进入区域0
network 10.1.1.1 0.0.0.0 # 发布自己的网段信息
network 10.1.2.1 0.0.0.0
network 10.1.4.1 0.0.0.0
·R2配置
systemview
int g0/0/0
ip add 10.1.2.2 24
acl 3000 # 创建acl
# 创建一条规则,允许匹配的源目地址和端口号的通过
rule 5 permit tcp source 10.1.4.1 0 destination 10.1.3.1 0 destination-port eq 23
rule 10 deny tcp source any # 拒绝其他通过
int g0/0/0
traffic-filter inbound acl 3000 # 将acl绑定到g0/0/0接口上
int g0/0/1
ip add 10.1.3.2 24
ospf
area 0
network 10.1.2.2 0.0.0.0
network 10.1.3.2 0.0.0.0
·R3配置
systemview
int g0/0/0
ip add 10.1.3.1 24
ospf
area 0
network 10.1.3.2 0.0.0.0
telnet server enable # 启动telnet服务
user-interface vty 0 4 # 进入vty用户界面
set authentication password cipher huawei # 设置为密码认证模式,密码为huawei
user privilege level 3 # 设置用户等级为3级
三、连通性测试