静态路由实验
1.地址划分如下:
2.按照所划分的地址,给路由器配IP,配环回
3.写静态路由使局域网内可以互相通信
[R1]ip route-static 192.168.1.96 28 192.168.1.34
[R1]ip route-static 192.168.1.160 28 192.168.1.34
[R1]ip route-static 192.168.1.16 28 192.168.1.34
[R1]ip route-static 192.168.1.128 28 192.168.1.66
[R1]ip route-static 192.168.1.0 28 192.168.1.66
[R1]ip route-static 192.168.1.80 28 192.168.1.66
[R1]ip route-static 192.168.1.144 28 192.168.1.34
[R1]ip route-static 192.168.1.176 28 192.168.1.34
[R1]ip route-static 192.168.1.112 28 192.168.1.34
4.R3两台PC通过DHCP获取IP地址,在路由器上进行dhcp配置
[R3]dhcp enable
[R3]ip pool 1
[R3-ip-pool-1]network 192.168.1.0 mask 28
[R3-ip-pool-1]gateway-list 192.168.1.1
[R3-ip-pool-1]dns-list 114.114.114.114
[R3-ip-pool-1]int g0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
5.R1-R5均可访问R6的环回
(1)R1-R5路由器上写缺省指向外网
[R1]ip route-static 0.0.0.0 0 192.168.1.34
[R2]ip route-static 0.0.0.0 0 192.168.1.98
[R3]ip route-static 0.0.0.0 0 192.168.1.130
[R4]ip route-static 0.0.0.0 0 192.168.1.162
[R4]ip route-static 0.0.0.0 0 192.168.1.18
[R5]ip route-static 0.0.0.0 0 12.1.1.2
(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]q
[R5]int g0/0/2
[R5-GigabitEthernet0/0/2]nat outbound 2000
6.R6telnetR5的公有ip,实际登录到R1上
(1)在R1开启远程登录服务
[R1]aaa
[R1-aaa]local-user xixi password cipher cisco123
[R1-aaa]local-user xixi service-type telnet
[R1-aaa]local-user xixi privilege level 15
[R1-aaa]q
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
(2)在R5上做端口映射
[R5-GigabitEthernet0/0/2]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.33 23
7.R4与R5正常通过1000链路,故障通过100兆链路
[R4]ip route-static 192.168.1.176 28 192.168.1.162 preference 80
[R4]ip route-static 192.168.1.176 28 192.168.1.18 preference 100