- 先对各路由器配置其接口IP地址,再对其环回接口配置ip地址
- [R1]int g0/0/0
- [R1]ip add 192.168.1.1 30
- [R1]int loopback 0
- [R1]ip add 192.168.1.33 28
- [R1]int loopback 1
- [R1]ip add 192.168.1.49 28
- 将ip地址配置完成后,接下来进行下一步使pc自动获取ip地址
- 【R3】dhcp enable
- 【R3】IP pool a
- 【R3-ip- pool-1】network 192.168.1.96 mask 27
- 【R3-ip- pool-1】gateway-list 192.168.1.97
- 【R3-ip- pool-1】dns-list 8.8.8.8 114.114.114.114
- 【R3】int g0/0/2
- 【R3】dhcp select global
- 此时打开pc端,即可获取其ip地址
- 下一步,寻找最短路径,并开始联通全网
- 【R1】IP route-static 192.168.1.64 27 192.168.1.2
- 以此类推,将路径全部划分出来
- 配置完路径后,进行Ping通操作
- 此时,R1与R5之间已经相互ping通
- 再对路由器进行防环配置
- [R1]IP route-static 192.168.1.32 27 null 0
- [R2]ip route-static 192.168.1.64 27 null 0
- [R4]ip route-static 192.168.1.128 27 null 0
- 此时使R1到R5访问R6,需要配置缺省路由
- 【R1】IP route-static 0.0.0.0 0 192.168.1.2
- 【R1】IP route-static 0.0.0.0 0 192.168.1.6
- 【R2】IP route-static 0.0.0.0 0 192.168.1.10
- 【R3】IP route-static 0.0.0.0 0 192.168.1.14
- 【R4】IP route-static 0.0.0.0 0 192.168.1.18
- 【R4】IP route-static 0.0.0.0 0 192.168.1.22
- 【R5】IP route-static 0.0.0.0 0 12.0.0.2
- 接下来在R5上面配置nat
- 【R5】acl 2000
- 【R5-acl-basic-2000】rule permit source 192.168.1.0 0.0.0.255
- 【R5-acl-basic-2000】int g0/0/1
- nat outbound 2000
- ping通12.0.0.2
- 接下来在r1上配置telnet服务
- [R1]aaa
- [R1-aaa]local-user wangdaye privilege level 15 password cipher wdy12345
- [R1-aaa]local-user wangdaye service-type telnet
- [R1-aaa]user-interface vty 0 4
- [R1-ui-vty0-4]authentication-mode aaa
- 然后在R5上远程协议
- [R5]int g0/0/1
[R5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.1 23 - 接着在R6上进行远程登陆
- [R6]telnet 12.0.0.1
- 登录成功即可
1.接下来通过改变优先级从来改变路径
[R4]ip route-static 0.0.0.00 0 192.168.1.22 preference 61
[R5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 61
Info: Succeeded in modifying route.
[R5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61
Info: Succeeded in modifying route.
[R5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61
Info: Succeeded in modifying route.
[R5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61
Info: Succeeded in modifying route.
[R5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 61
Info: Succeeded in modifying route.
[R5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 61
Info: Succeeded in modifying route.
[R5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference 61
Info: Succeeded in modifying route.
[R5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 61
Info: Succeeded in modifying route.
再进行追踪路径
实验成功