静态浮动路由

一、实验要求

二、实验拓扑

三、实验分析

1.根据192.168.1.0/24网段进行网段划分

(1).总共有六条干路和五个路由器空接口。首先划出六个网段,拿出其中一个网段在划分的基础上再次进行划分成六个网段,分配给六条干路使用、剩下的五个网段分别分配给路由器做环回接口(由于每个路由器都有两个环回接口,分配的网段需要重新划分,除R3外)。

(2). 干路 192.168.1.0/24

192.168.1.0/30 R1-R2

192.168.1.4/30 R1-R3

192.168.1.8/30 R2-R4

192.168.1.12/30 R3-R4

192.168.1.16/30 R4-R5 1000M

192.168.1.20/30 R4-R5 100M

(3).环回接口

R1:192.168.1.32/27       

环回接口1:192.168.1.32/28    环回接口2:192.168.1..48/28

R2:192.168.1.64/27

环回接口1:192.168.1.64/28   环回接口:192.168.1.80/28 

R3:192.168.1.96/27

R4:192.168.1.128/27

环回接口1:192.168.1.128/28   环回接口:192.168.1.144/28 

R5:192.168.1.160/27

2. 根据网段的划分,依次给设备配置IP地址。

3.依次给路由器配置静态路由(注意缺省路由、浮动路由、空接口路由的配置)

4.给R3配置DHCP,让其自动下发地址。

5.在R1开启TELENT服务,在 R5上配置easy-ip,并开启端口映射。

四、实验配置

R1:

#
interface GigabitEthernet0/0/0
 ip address 192.168.1.1 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.5 255.255.255.252 
#

interface LoopBack1
 ip address 192.168.1.33 255.255.255.240 
#
interface LoopBack2
 ip address 192.168.1.49 255.255.255.240 

#
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.6
ip route-static 192.168.1.8 255.255.255.252 192.168.1.2
ip route-static 192.168.1.12 255.255.255.252 192.168.1.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
ip route-static 192.168.1.16 255.255.255.252 192.168.1.6
ip route-static 192.168.1.20 255.255.255.252 192.168.1.6 preference 70
ip route-static 192.168.1.20 255.255.255.252 192.168.1.2 preference 70
ip route-static 192.168.1.32 255.255.255.224 NULL0
ip route-static 192.168.1.64 255.255.255.224 192.168.1.2
ip route-static 192.168.1.96 255.255.255.224 192.168.1.6
ip route-static 192.168.1.128 255.255.255.224 192.168.1.6
ip route-static 192.168.1.128 255.255.255.224 192.168.1.2
ip route-static 192.168.1.160 255.255.255.224 192.168.1.2
ip route-static 192.168.1.160 255.255.255.224 192.168.1.6
#
user-interface vty 0 4

authentication-mode password 

Please configure the login password (maximum length 16):123

#
R2;

#
interface GigabitEthernet0/0/0
 ip address 192.168.1.2 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.9 255.255.255.252 
#
interface GigabitEthernet0/0/2
#
interface LoopBack1
 ip address 192.168.1.65 255.255.255.240 
#
interface LoopBack2
 ip address 192.168.1.81 255.255.255.240 
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
ip route-static 192.168.1.4 255.255.255.252 192.168.1.1
ip route-static 192.168.1.12 255.255.255.252 192.168.1.10
ip route-static 192.168.1.16 255.255.255.252 192.168.1.10
ip route-static 192.168.1.20 255.255.255.252 192.168.1.10 preference 70
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
ip route-static 192.168.1.64 255.255.255.224 NULL0
ip route-static 192.168.1.96 255.255.255.224 192.168.1.1
ip route-static 192.168.1.96 255.255.255.224 192.168.1.10
ip route-static 192.168.1.128 255.255.255.224 192.168.1.10
ip route-static 192.168.1.160 255.255.255.224 192.168.1.10
#
R3:

#
interface GigabitEthernet0/0/0
 ip address 192.168.1.6 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.13 255.255.255.252 
#
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
ip route-static 192.168.1.0 255.255.255.252 192.168.1.5
ip route-static 192.168.1.8 255.255.255.252 192.168.1.14
ip route-static 192.168.1.16 255.255.255.252 192.168.1.14
ip route-static 192.168.1.20 255.255.255.252 192.168.1.14 preference 70
ip route-static 192.168.1.32 255.255.255.224 192.168.1.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
ip route-static 192.168.1.64 255.255.255.224 192.168.1.5
ip route-static 192.168.1.128 255.255.255.224 192.168.1.14
ip route-static 192.168.1.160 255.255.255.224 192.168.1.14
#dhcp enable
#
ip pool 1
 gateway-list 192.168.1.97 
 network 192.168.1.96 mask 255.255.255.224 
interface GigabitEthernet0/0/2
 ip address 192.168.1.97 255.255.255.224 
 dhcp select global

#

R4:

#
interface GigabitEthernet0/0/0
 ip address 192.168.1.10 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 192.168.1.14 255.255.255.252 
#
interface GigabitEthernet0/0/2
 ip address 192.168.1.17 255.255.255.252 
#
interface GigabitEthernet4/0/0
 ip address 192.168.1.21 255.255.255.252 
#
interface LoopBack1
 ip address 192.168.1.129 255.255.255.240 
#
interface LoopBack2
 ip address 192.168.1.145 255.255.255.240 
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.18
ip route-static 0.0.0.0 0.0.0.0 192.168.1.22 preference 70
ip route-static 192.168.1.0 255.255.255.252 192.168.1.9
ip route-static 192.168.1.4 255.255.255.252 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
ip route-static 192.168.1.32 255.255.255.224 192.168.1.9
ip route-static 192.168.1.64 255.255.255.224 192.168.1.9
ip route-static 192.168.1.96 255.255.255.224 192.168.1.13
ip route-static 192.168.1.128 255.255.255.224 NULL0
ip route-static 192.168.1.160 255.255.255.224 192.168.1.18
ip route-static 192.168.1.160 255.255.255.224 192.168.1.22 preference 70
#
R5:

#
interface GigabitEthernet0/0/0
 ip address 192.168.1.18 255.255.255.252 
#
interface GigabitEthernet0/0/1
 ip address 12.0.0.1 255.255.255.0 
interface GigabitEthernet0/0/2
 ip address 192.168.1.22 255.255.255.252 
#
interface LoopBack1
 ip address 192.168.1.161 255.255.255.224 
#
ip route-static 0.0.0.0 0.0.0.0 12.0.0.2
ip route-static 192.168.1.0 255.255.255.252 192.168.1.17
ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 70
ip route-static 192.168.1.4 255.255.255.252 192.168.1.17
ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 70
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 70
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.17
ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 70
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference 70
ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference 70
ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference 70
ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
ip route-static 192.168.1.128 255.255.255.224 192.168.1.17
ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference 70
#
acl 2000

rule 5 permit source any 

interface GigabitEthernet0/0/1
nat outbound 2000
nat static global 12.0.0.3 inside 192.168.1.1 netmask 255.255.255.255

#

R6:

#
interface GigabitEthernet0/0/0
 ip address 12.0.0.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface LoopBack1
 ip address 1.1.1.1 255.255.255.0 
#

五、验证

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值