静态路综合实验

目录

一:拓扑搭建

二:实验需求

三、实验思路

四、配置

(1)配置IP地址

(2)配置静态路由

(3)给R3配置HDLC服务

(4)在R5上配置NAT

(5)完成空接口防环

(6)完成远程登陆协议

(7)浮动路由

(8)测试

​编辑


一:拓扑搭建

二:实验需求

1、R6 为 ISP,接口 P 地址均为公有地址,该设备只能配置 P 地址,之后不能再对其进行任何配置;
2、R1-R5 为局域网,私有IP地址192.168.1.0/24,请合理分配;

3、R1、R2、R4,各有两个环回IP 地址;RS,R6 各有一个环回地址;所有路由器上环回均代表连接用户的接口:

4、R3 下面的两台 PC 通过 DHCP 自动获取地址;

5、选路最佳,路由表尽量小,避免环路;
6、RI-R5 均可以访问 R6 的环回:
7、R6 telmet R5 的公有地址时,实际登录到 R1 上;

8、R4 与 R5 正常通过 1000M 链路,故障时通过 100M 链路

三、实验思路

1、划分 IP(划分IP 的方式有多种,以下划分方式可做为参考)并给相应设备配置IP地址。

        骨干链路:192.168.1.0/27

        再次划分192.168.1.000 000 00    30

                        192.168.1.0

                        192.168.1.4

                        192.168.1.8

                        192.168.1.16

                        …….

                        192.168.1.48
        R1环回:192.168.1.32/27
                  L0:192.168.1.32/28
                  L1:192.168.1.48/28
        R2环回:192.168.1.64/27
                  Le:192.168.1.64/28
                  L1:192.168.1.80/28
        R3环回:192.168.1.96/27
        R4环回:192.168.1.128/27

                  Le:192.168.1.128/28
                  L1:192.168.1.144/28
        R5环回:192.168.1.160/27

        保留地址:

                 192.168.1.160/27

                 192.168.1.192/27

                 192.168.1.224/27

2、配置 DHCP,使 R3 下面的两台 PC 通过 DHCP 自动获取 I 地址。

3、编写除了到达 1.0.0.0/24 之外,到达其他网段的静态路由。

4、配置缺省路由,实现到 1.0.0.0/24 互通。此时实现内网通;在 R5 路由器上配置 nat,可用 esayip,此时实现全网通做汇总,做防环,做黑洞路由配置

5、做备份,通过改变路由条目优先级实现

6、7、测试,观察 1000Mb/s 链路故障时,数据能否走 100Mb/s 链路

8、R6 telnetR5 的公有地址时,实际登录到 R1 上,在 R1 上配置 telnet服务,通过 nat server 发布到R5 的公网接口。

四、配置

(1)配置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 LoopBack0
 ip address 192.168.1.33 255.255.255.240 
interface LoopBack1
 ip address 192.168.1.49 255.255.255.240

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 LoopBack0
 ip address 192.168.1.65 255.255.255.240 
interface LoopBack1
 ip address 192.168.1.81 255.255.255.252

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 
interface GigabitEthernet0/0/2
 ip address 192.168.1.97 255.255.255.224

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 GigabitEthernet4/0/0
 ip address 192.168.1.17 255.255.255.252 
interface GigabitEthernet0/0/2
 ip address 192.168.1.21 255.255.255.252 
interface LoopBack0
 ip address 192.168.1.129 255.255.255.240 
interface LoopBack1
 ip address 192.168.1.145 255.255.255.240 

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 LoopBack0
 ip address 192.168.1.193 255.255.255.224 

R6

interface GigabitEthernet0/0/0
 ip address 12.0.0.2 255.255.255.0 
interface LoopBack0
 ip address 1.0.0.1 255.255.255.0 

(2)配置静态路由

R1

ip route-static 12.0.0.0 255.255.255.0 192.168.1.2
ip route-static 12.0.0.0 255.255.255.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.6
ip route-static 192.168.1.16 255.255.255.252 192.168.1.2
ip route-static 192.168.1.20 255.255.255.252 192.168.1.6
ip route-static 192.168.1.20 255.255.255.252 192.168.1.2
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.2
ip route-static 192.168.1.128 255.255.255.224 192.168.1.6
ip route-static 192.168.1.192 255.255.255.224 192.168.1.2
ip route-static 192.168.1.192 255.255.255.224 192.168.1.6
ip route-static 0.0.0.0 0 192.168.1.2
ip route-static 0.0.0.0 0 192.168.1.6

R2

ip route-static 12.0.0.0 255.255.255.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
ip route-static 192.168.1.32 255.255.255.224 192.168.1.1
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.192 255.255.255.224 192.168.1.10
ip route-static 0.0.0.0 0 192.168.1.10

R3

ip route-static 12.0.0.0 255.255.255.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
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.5
ip route-static 192.168.1.64 255.255.255.224 192.168.1.14
ip route-static 192.168.1.128 255.255.255.224 192.168.1.14
ip route-static 192.168.1.192 255.255.255.224 192.168.1.14
ip route-static 0.0.0.0 0 192.168.1.14

R4

ip route-static 12.0.0.0 255.255.255.0 192.168.1.18
ip route-static 12.0.0.0 255.255.255.0 192.168.1.22
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.9
ip route-static 192.168.1.32 255.255.255.224 192.168.1.13
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 192.168.1.18
ip route-static 192.168.1.128 255.255.255.224 192.168.1.22
ip route-static 0.0.0.0 0 192.168.1.18
ip route-static 0.0.0.0 0 192.168.1.22

R5

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
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
ip route-static 192.168.1.8 255.255.255.252 192.168.1.17
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21
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
ip route-static 192.168.1.32 255.255.255.224 192.168.1.17
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21
ip route-static 192.168.1.64 255.255.255.224 192.168.1.17
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21
ip route-static 192.168.1.96 255.255.255.224 192.168.1.17
ip route-static 192.168.1.96 255.255.255.224 192.168.1.21
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

(3)给R3配置HDLC服务

[R1]dhcp enable  启动DHCP服务

[R3]ip pool aaa (池塘名字例如aaa)  创建名为aaa的DHCP池塘,
[R3-ip-pool-aaa]network 192.168.1.96 mask 27        绑定接口,可分配地址范围
[R3-ip-pool-aaa]gateway-list 192.168.1.97        下发网关
[R3-ip-pool-aaa]dns-list 114.114.114.114 8.8.8.8        下发DNS服务器信息
[R3-GigabitEthernet/0/02]dhcp select global         对应接口激活全局池塘的配置

测试:

(4)在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 g 0/0/1
[R5-GigabitEthernet0/0/1]nat outbound  2000                接口调用NAT

(5)完成空接口防环

[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

(6)完成远程登陆协议

[R1]telnet server enable  开启远程登录服务
 Error: TELNET server has been enabled
[R1]aaa    
[R1-aaa]local-user  huawei password  cipher 123456 privilege  level 15
[R1-aaa]local-user huawei service-type telnet 
[R1-aaa]q

[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]quit 

开启端口映射:

[R5]int g0/0/1

[R5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.1 23 
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y

解析含义:

[R5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 inside 192.168.1.1 23 

若有人访问R5的0/0/01接口的23号端口那么就映射为192.168.1.1 的23端口

在R6上登陆

<R1><R6>telnet  12.0.0.1

(7)浮动路由

R4

ip route-static 0.0.0.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
ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference  61
ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference  61
ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference  61
ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 preference  61
ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 preference  61
ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 preference  61
ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 preference  61

目的完成千兆百兆路径选择!

(8)测试

R6远程连接R1

在PC端ping路由器 

相关推荐

  1. eNSP 静态综合实验

    2024-07-20 22:48:03       36 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-20 22:48:03       50 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-20 22:48:03       54 阅读
  3. 在Django里面运行非项目文件

    2024-07-20 22:48:03       43 阅读
  4. Python语言-面向对象

    2024-07-20 22:48:03       54 阅读

热门阅读

  1. 力扣第二十二题——括号生成

    2024-07-20 22:48:03       16 阅读
  2. WebKit简介及工作流程

    2024-07-20 22:48:03       13 阅读
  3. 编程中的智慧之设计模式一

    2024-07-20 22:48:03       16 阅读
  4. NVM配置

    NVM配置

    2024-07-20 22:48:03      15 阅读
  5. 获取磁盘剩余容量-----c++

    2024-07-20 22:48:03       14 阅读
  6. springboot3.2 RedisCacheManager配置

    2024-07-20 22:48:03       14 阅读
  7. springSecurity学习之springSecurity简介

    2024-07-20 22:48:03       20 阅读