要求描述:
- 配置路由器和ASA的接口,实现网络互通
- 配置路由
- 分别配置R1,R3和R4模拟PC,并启用Telnet,验证在R1上可以Telnet到R3和R4,在R3上可以Telnet到R4但不能Telnet到R1,在R4上不能Telnet到R1和R3
- 使用show conn detail 命令查看Conn表
- 分别查看ASA和R2的路由表
- 配置ACL禁止在R3上Telnet到R4
拓扑如下:
IP地址规划:
实验步骤
1.配置ASA接口IP、路由接口IP、以及路由配置
R1配置
R1(config)#interface ethernet 0/0
R1(config-if)#duplex full
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.254
R2配置
R2(config)#interface ethernet 0/0
R2(config-if)#ip address 172.16.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config-if)#ip address 172.16.2.254 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#ip route 10.1.1.0 255.255.255.0 172.16.1.254
R2(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.254
R3配置
R3(config)#interface ethernet 0/0
R3(config-if)#duplex full
R3(config-if)#ip address 192.168.1.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.254
R4配置
R4(config)#interface ethernet 0/0
R4(config-if)#ip address 172.16.2.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.254
ASA配置
ASA(config)# interface gigabitEthernet 0
ASA(config-if)# nameif inside
ASA(config-if)# security-level 100
ASA(config-if)# ip address 10.1.1.254 255.255.255.0
ASA(config-if)# no shutdown
ASA(config-if)# exit
ASA(config)# interface gigabitEthernet 1
ASA(config-if)# nameif dmz
ASA(config-if)# security-level 50
ASA(config-if)# ip address 192.168.1.254 255.255.255.0
ASA(config-if)# no shutdown
ASA(config-if)# exit
ASA(config)# interface gigabitEthernet 2
ASA(config-if)# nameif outside
ASA(config-if)# security-level 0
ASA(config-if)# ip address 172.16.1.254 255.255.255.0
ASA(config-if)# no shutdown
ASA(config-if)# exit
ASA(config)# route outside 172.16.2.0 255.255.255.0 172.16.1.1
2.配置telnet服务
R1配置
R1(config)#username bdqn privilege 15 password bdqn
R1(config)#line vty 0 4
R1(config-line)#login local
R1(config-line)#transport input telnet
R1(config-line)#exit
R3配置
R3(config)#username bdqn privilege 15 password bdqn
R3(config)#line vty 0 4
R3(config-line)#login local
R3(config-line)#transport input telnet
R3(config-line)#exit
R4配置
R4(config)#username bdqn privilege 15 password bdqn
R4(config)#line vty 0 4
R4(config-line)#login local
R4(config-line)#transport input telnet
R4(config-line)#exit
验证在R1上可以Telnet到R3和R4
在R3上可以Telnet到R4但不能Telnet到R1
在R4上不能Telnet到R1和R3
分别查看ASA和R2的路由表
ASA路由表
R2路由表
3.配置ACL禁止在R3上Telnet到R4
ASA配置
ASA(config)# access-list telnet deny tcp 192.168.1.0 255.255.255.0 172.168.2.0 255.255.255.0
ASA(config)# access-group telnet in interface dmz
ASA(config)# exit
验证禁止在R3上Telnet到R4