实验拓扑如上.
第一步:
给所有的路由器配上IP地址
R1的配置IP:
R2的配置IP:
R3的配置IP:
R4的配置IP:
R5的配置IP:
R6的配置IP:
第二步:
接下来给所有的路由器配置静态路由,以达成全网通.
R1:
R2:
R3:
R4:
R5:
第三步:
给R3配置dhcp服务
[R3]dhcp enable
[R3]ip pool aa
[R3-ip-pool-aa]network 192.168.1.96 mask 27
[R3-ip-pool-aa]gateway-list 192.168.1.97
[R3-ip-pool-aa]dns-list 8.8.8.8
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
第四步:
验证全网通
在PC1中ping一下
全网通达成
第五步:
放环设计:
R1:
[R1]ip route-static 192.168.1.32 27 NULL 0
R2:
[R2]ip route-static 192.168.1.64 27 NULL 0
R4:
[R4]ip route-static 192.168.1.128 27 NULL 0
放环检查,发现多了一条NULL 0 的路线
第六步:
公网和内网通:
配置静态缺省路由
[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
测试:
第七步:
R1-R5都可以访问R6的环回
在边界路由(R5)上配置
测试:
ping通,说明内网的所有的设备都可以到达R5的接口
第八步:
R6 可以telnet R5 时可以登入 R1
在R1中配置远程登入服务器:
[R1]telnet server enable
[R1]aaa
[R1-aaa]local-user lingyou password cipher lingyou520 privilege level 15
[R1-aaa]local-user lingyou service-type telnet
[R1]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
测试:
进入telnet,测试成功.
第九步:
更改R4与R5两条线路的优先级,将100MB/s的优先级(数字越大优先级越低)要调低
通过第2步的图可知,正常的优先级为60.
[R4]ip route-static 0.0.0.0 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
[R5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.32 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.64 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.96 255.255.255.252 192.168.1.21 preference 61
[R5]ip route-static 192.168.1.128 255.255.255.252 192.168.1.21 preference 61
查看路由表的变化:
实验结束