需求分析:
ping:PC1不能ping通R1,但是可以ping通R2;PC2可以ping通R1,但是不能ping通R2
telnet:PC1不能telnet成功R2,但是可以telnetR1;PC2可以telnetR2,但是不能telnetR1
解:
此时分析需要进行的ACL决策为高级ACL,因为已经给定了源ip和目标ip
对于给出的三个接口,此时需要选择R1的g0/0/0口,因为此时为了不浪费资源,所以选择R1的g0/0/0口的inband
思考:R1有两个接口G0/0/0和G0/0/1两个接口,此时如果去设置ACL策略需要两个接口都要去设置,所以总共需要设置的ACL决策为2+2+1+1=6(每个端口都要把关)
配置:
首先是R1和R2的基础配置:
//R2的配置
[R2]interface G0/0/0
[R2-GigabitEthernet0/0/0]ip a
[R2-GigabitEthernet0/0/0]ip accounting
[R2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
Nov 16 2021 20:08:12-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
//R1的配置
[R1]interface G0/0/0
[R1-GigabitEthernet0/0/0]ip a
[R1-GigabitEthernet0/0/0]ip accounting
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Nov 16 2021 20:08:12-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1]interface G0/0/1
[R1-GigabitEthernet0/0/1]ip a
[R1-GigabitEthernet0/0/1]ip accounting
[R1-GigabitEthernet0/0/1]ip address 192.168.1.2 24
Nov 16 2021 20:08:12-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
然后开始去配置telnet接口配置
//设置R2的telnet,权限为15,密码为654321(密文),账号为xlb
[R2]aaa
[R2-aaa]loca
[R2-aaa]local-user xlb pr
[R2-aaa]local-user xlb privilege
[R2-aaa]local-user xlb privilege l
[R2-aaa