静态路由综合实验

静态路由综合实验

二、实验要求

1、R6为ISP,接口IP地址均为公有地址,该设备只能配置I地址之后不能冉对其进行任何配置

2、R1-R5为局域网,私有Ip地址192.168.1.0/24,请合理分配;

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

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

5、选路最佳,路由表尽量小,避免环路;

6、R1-R5均可以访问R6的环回;

7、在R1上配置telnet服务,使R6能通过R5的公有地址telnet到R1上;

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

三、实验思路

1、根据192.168.1.0 /24 合理划分网段

2、配置IP地址

3、配置静态路由使得192.168.1.0 私网内全网通

4、配置手工汇总、空接口,手工汇总:减少路由条目,空接口:防止路由黑洞成环

5、在R5上配置NAT服务,从R1到R4上配置缺省路由

6、在R1上开启telnet服务,在R5上做NATserver一对多地址映射

7、R4与R5之间的100m链路做浮动静态做备份

四、实验步骤

1、IP划分

R1: 192.168.1.32/27   L0:192.168.1.32/28   L1:192.168.1.48/28

R2: 192.168.1.64/27   L0:192.168.1.64/28   L1:192.168.1.80/28

R3: 192.168.1.96/27

R4: 192.168.1.128/27 L0:192.168.1.128/28  L1:192.168.1.144/28

R5: 192.168.1.160/27

R6: 1.0.0.0/24

R1—R2:192.168.1.0/30

R2—R4:192.168.1.8/30

R3—R4:192.168.1.12/30

R4—R5:192.168.1.16/30(1000M) 192.168.1.20/30(100M)

R5—R6:12.0.0.0/24

2、进接口配IP

Eg: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—R5:同上

3、R1—R5静态路由配置

Eg:R1

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.2

ip route-static 192.168.1.20 255.255.255.252 192.168.1.6

ip route-static 192.168.1.64 255.255.255.240 192.168.1.2

ip route-static 192.168.1.80 255.255.255.240 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.240 192.168.1.2

ip route-static 192.168.1.128 255.255.255.240 192.168.1.6

ip route-static 192.168.1.144 255.255.255.240 192.168.1.2

ip route-static 192.168.1.144 255.255.255.240 192.168.1.6

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

R2—R5同上

***R3***(需要开启DHCP服务)

dhcp enable       //开启服务

ip pool 1         //创建池塘

 gateway-list 192.168.1.97 //设置网关

 network 192.168.1.96 mask 255.255.255.224 //关联接口,可分配地址范围

 dns-list 114.114.114.114 8.8.8.8 //设置DNS

切记:华为设备要求在需要分配ip地址的接口上再次开启服务

[r3]interface g0/0/2

[r3-GigabitEthernet0/0/2]dhcp select global Ipconfig

静态路由配置完成后192.168.1.0/24私网网段全网通

测试:(R1ping同私网内的任意网段)

4、配置手工汇总、空接口

Eg:R1

手工汇总:(减少路由条目)

ip route-static 192.168.1.64 255.255.255.224 192.168.1.2

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

空接口:(防止路由黑洞)

[r1]ip route-static 192.168.1.32 27 NULL 0

5、R5上配置NAT服务

1)私网、公网地址转换

acl number 2000          //抓取私网流量做一张表2000

 rule 5 permit source 192.168.1.0 0.0.0.255 //抓取规则

interface GigabitEthernet0/0/2     //进接口

nat outbound 2000               //在流量出接口配置nat

2)R1—R4配置访问公网的缺省路由

R1:ip route-static 0.0.0.0 0.0.0.0 192.168.1.2

R2: ip route-static 0.0.0.0 0.0.0.0 192.168.1.10

R3: ip route-static 0.0.0.0 0.0.0.0 192.168.1.14

R4: ip route-static 0.0.0.0 0.0.0.0 192.168.1.18

此时全网通(r1—r5上所有网段均可访问公网IP)

测试:

6、在R1上开启telnet服务,在R5上做NATserver一对多地址映射

[r1]aaa               //进入aaa服务,该服务用于管理账号信息 

[r1-aaa]local-user liuhao privilege level 15 password cipher 123456

                账号                   权限                      秘钥

[r1-aaa]local-user liuhao service-type telnet  // 定义账号功能

[r1-aaa]q

[r1]user-interface vty 0 4  //再在VTY(远程登录虚拟接口)上调用aaa服务

[r1-ui-vty0-4]authentication-mode aaa

R5:地址映射

interface GigabitEthernet0/0/2

nat server protocol tcp global current-interface telnet inside 192.168.1.1 telnet

在R6上测试:

7、R4与R5之间的100m链路做浮动静态做备份

R4:

ip route-static 0.0.0.0 0.0.0.0 192.168.1.22 preference 61

ip route-static 192.168.1.160 255.255.255.224 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.240 192.168.1.21 preference 61

ip route-static 192.168.1.48 255.255.255.240 192.168.1.21 preference 61

ip route-static 192.168.1.64 255.255.255.240 192.168.1.21 preference 61

ip route-static 192.168.1.80 255.255.255.240 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.240 192.168.1.21 preference 61

ip route-static 192.168.1.144 255.255.255.240 192.168.1.21 preference 61

相关推荐

  1. eNSP 静态综合实验

    2024-07-22 08:26:01       36 阅读

最近更新

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

    2024-07-22 08:26:01       50 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-22 08:26:01       54 阅读
  3. 在Django里面运行非项目文件

    2024-07-22 08:26:01       43 阅读
  4. Python语言-面向对象

    2024-07-22 08:26:01       54 阅读

热门阅读

  1. MySQL8的备份方案——增量备份(CentOS)

    2024-07-22 08:26:01       13 阅读
  2. T-SQL编程基础

    2024-07-22 08:26:01       18 阅读
  3. B - Array Craft(cf960)

    2024-07-22 08:26:01       14 阅读
  4. Rust编程-模式匹配

    2024-07-22 08:26:01       17 阅读
  5. 软件测试面试

    2024-07-22 08:26:01       16 阅读
  6. Vbox虚拟机+Ubuntu motest测试drm

    2024-07-22 08:26:01       19 阅读
  7. 力扣1882.使用服务器处理任务

    2024-07-22 08:26:01       17 阅读