静态路由实验

静态路由实验

实验拓扑:

**实验要求:** ①R6为ISP,接口IP地址为公有地址;该设备只能配IP地址,之后不能在对其进行任何配置; ②R1-R5为局域网,私有IP地址192.168.1.0/24请合理分配; ③所有的路由器上均有换回,代表用户接口; ④R3下的两台PC通过DHCP自动获取IP地址; ⑤选路最佳,路由表尽量小,避免环路; ⑥R1-R5均可访问R6的环回; ⑦R6 telnet R5的公有IP地址时,实际登录到R1上; ⑧R4与R5正常通过千兆链路,故障时,通过百兆链路。

地址划分:

配用户接口IP地址:
【R1】
int lo 0
ip ad 192.168.1.33 28
int lo 1
ip ad 192.168.1.49 28
【R2】
int lo 0
ip ad 192.168.1.65 28
int lo 1
ip ad 192.168.1.81 28
【R3】
int g0/0/2
ip ad 192.168.1.97 27
【R4】
int lo 0
ip ad 192.168.1.129 28
int lo 1
ip ad 192.168.1.145 28
【R5】
int lo 0
ip ad 192.168.1.161 26
配骨干接口IP地址:
【R1】
int g0/0/0
ip ad 192.168.1.1 30
int g0/0/1
ip ad 192.168.1.14 30
【R2】
int g0/0/1
ip ad 192.168.1.2 30
int g0/0/0
ip ad 192.168.1.5 30
【R3】
int g0/0/1
ip ad 192.168.1.10 30
int g0/0/0
ip ad 192.168.1.13 30
【R4】
int g0/0/1
ip ad 192.168.1.6 30
int g0/0/0
ip ad 192.168.1.9 30
int g0/0/2
ip ad 192.168.1.17 30
int e4/0/0
ip ad 192.168.1.21 30
【R5】
int g0/0/1
ip ad 192.168.1.18 30
int e4/0/0
ip ad 192.168.1.22 30
int g0/0/0
ip ad 56.1.1.1 24
【R6】
int g0/0/1
ip ad 56.1.1.2 24
int lo 0
ip ad 6.6.6.6 24
配DHCP:
【R3】
dhcp enable
ip pool a
network 192.168.1.96 mask 27
gateway-list 192.168.1.97
dns-list 114.114.114.114 8.8.8.8
int g0/0/2
dhcp select global
【PC1】

【PC2】

写静态路由:
【R1】
ip route-static 0.0.0.0 0.0.0.0 192.168.1.2 //缺省走上
ip route-static 0.0.0.0 0.0.0.0 192.168.1.13 //缺省走下
ip route-static 192.168.1.64 27 192.168.1.2 //到R2环回走上
ip route-static 192.168.1.4 30 192.168.1.2 //到R2-R4走上
ip route-static 192.168.1.96 27 192.168.1.13 //到R3接口走下
ip route-static 192.168.1.8 30 192.168.1.13 //到R4-R3走下
ip route-static 192.168.1.32 27 NULL 0 //环回空口闭环
【R2】
ip route-static 0.0.0.0 0.0.0.0 192.168.1.6 //缺省走右
ip route-static 192.168.1.32 27 192.168.1.1 //到R1环回走左
ip route-static 192.168.1.12 30 192.168.1.1 //到R3-R1走左
ip route-static 192.168.1.96 27 192.168.1.1 //到R3接口负载均衡
ip route-static 192.168.1.96 27 192.168.1.6 //到R3接口负载均衡
ip route-static 192.168.1.64 27 NULL 0 //环回空口闭环
【R3】
ip route-static 0.0.0.0 0.0.0.0 192.168.1.9 //缺省走右
ip route-static 192.168.1.32 27 192.168.1.14 //到R1环回
ip route-static 192.168.1.0 20 192.168.1.14 //到R1-R2走左
ip route-static 192.168.1.64 27 192.168.1.14 //到R2环回负载均衡
ip route-static 192.168.1.64 27 192.168.1.9 //到R2环回负载均衡
【R4】
ip route-static 0.0.0.0 0.0.0.0 192.168.1.18 //缺省走右
ip routr-static 192.168.1.64 27 192.168.1.5 //到R2环回走上
ip route-static 192.168.1.0 30 192.168.1.5 //到R1-R2走上
ip route-static 192.168.1.32 27 192.168.1.5 //到R1环回负载均衡
ip route-static 192.168.1.32 27 192.168.1.10 //到R1环回负载均衡
ip route-static 192.168.1.96 27 192.168.1.10 //到R3接口走下
ip route-static 192.168.1.12 30 192.168.1.10 //到R3-R1走下
ip route-static 0.0.0.0 0.0.0.0 192.168.1.22 preference 61 //缺省走右(备份)
ip route-static 192.168.1.192 26 NULL 0 //不存在的网段转发至空接口
ip route-static 192.168.1.128 27 NULL 0 //环回空口闭环
ip route-static 192.168.1.24 30 NULL 0 //预留地址空口闭环
ip route-static 192.168.1.80 30 NULL 0 //预留地址空口闭环
【R5】
ip route-static 0.0.0.0 0.0.0.0 56.1.1.2 //缺省走右
ip route-static 192.168.1.0 24 192.168.1.17 //到局域网走左
ip route-static 192.168.1.0 24 192.168.1.21 preference 61 //到局域网走左(备份)
配置NAT
【R5】
acl 2000
rule permit source 192.168.1.0 0.0.0.255
int g0/0/0
nat outbound 2000
开启Telnet:
【R1】
aaa
local-user root privilege level 15 password cipher root
local-user root service-type telnet
q
user-interface vty 0 4
authentication-mode aaa
端口映射:
【R5】
int g0/0/0
nat server protocol tcp global current-interface 23 inside 192.168.1.33 23
Y

实验结果测试:
R1/2/4ping测试:



PCping测试:

R6telnetR5公有地址测试:

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值