静态路由实验

一、拓扑图

在这里插入图片描述

二、需求

1.整张网络使用192.168.1.0/24
2.网段进行划分R1、R2、R3、R4均有两个环回来模拟用户网段
3.R5使用DHCP为PC分配IP地址
4、R2、R3、R4、R5开启Telnet功能;账号密码:admin/admin.
5.完成所有路由器的静态路由配置,要求使用最简化路由表的方式
6.使用R1进行Telnet测试登录其他设备
7.R4、R5之间,正常1000M链路通信,故障时改为10M
8.全网可达

三、需求分析

1.子网划分

2.配置IP,创建环回接口

3.R5使用DHCP为PC分配IP地址

5.最简化路由表的方式完成所有路由器的静态路由配置,.R4、R5之间,正常1000M链路通信,故障时改为10M

6.R2、R3、R4、R5开启Telnet功能;使用R1进行Telnet测试登录其他设备

四、配置过程

1.子网划分

192.168.1.000 00000 ==>192.168.1.0/27–骨干链路

    192.168.1.000 000 00 ==>192.168.1.0/30        可用IP: 1.1~1.2

    192.168.1.000 001 00 ==>192.168.1.4/30        可用IP: 1.5~1.6

    192.168.1.000 010 00 ==>192.168.1.8/30        可用IP: 1.9~1.10

    192.168.1.000 011 00 ==>192.168.1.12/30       可用IP: 1.13~1.14

    192.168.1.000 100 00 ==>192.168.1.16/30       可用IP: 1.17~1.118

    192.168.1.000 101 00 ==>192.168.1.20/30       可用IP: 1.21~1.22

    192.168.1.000 110 00 ==>192.168.1.24/30     

    192.168.1.000 111 00 ==>192.168.1.28/30   

192.168.1.001 00000 ==>192.168.1.32/27–R1环回–划分俩个子网

    192.168.1.32/28

    192.168.1.48/28

192.168.1.010 00000 ==>192.168.1.64/27–R2环回

    192.168.1.64/28

    192.168.1.80/28

192.168.1.011 00000 ==>192.168.1.96/27–R3环回

    192.168.1.96/28

    192.168.1.112/28

192.168.1.100 00000 ==>192.168.1.128/27–R4环回

    192.168.1.128/28

    192.168.1.144/28

192.168.1.101 00000 ==>192.168.1.160/27–R5

192.168.1.110 00000 ==>192.168.1.192/27

192.168.1.111 00000 ==>192.168.1.124/27

2.配置接口IP地址

R1接口
<Huawei>sys
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
R2接口
<Huawei>sys
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[R2-GigabitEthernet0/0/0]q
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
R3接口<Huawei>sys
[Huawei]sysname R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[R3-GigabitEthernet0/0/0]q
[R3]int g0/0/1	
[R3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
R4接口
<Huawei>sys
[Huawei]sysname R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[R4-GigabitEthernet0/0/0]q
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[R4-GigabitEthernet0/0/1]q
[R4]int g0/0/2
[R4-GigabitEthernet0/0/2]ip address 192.168.1.21 30
[R4-GigabitEthernet0/0/2]q
[R4]int g4/0/0
[R4-GigabitEthernet4/0/0]ip address 192.168.1.17 30
R5接口
<Huawei>sys
[Huawei]sysname R5
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.1.161 27
[R5-GigabitEthernet0/0/1]q
[R5]int g0/0/2
[R5-GigabitEthernet0/0/2]ip address 192.168.1.22 30
[R5-GigabitEthernet0/0/2]q
[R5]int g4/0/0
[R5-GigabitEthernet4/0/0]ip address 192.168.1.18 30

3.DHCP为PC分配IP地址

[r5]dhcp enable
[r5]ip pool lhs
[r5-ip-pool-lhs]network 192.168.1.160 mask 27
[r5-ip-pool-lhs]gateway-list 192.168.1.161
[r5-ip-pool-lhs]int g0/0/2
[r5-GigabitEthernet0/0/2]dhcp select global

在这里插入图片描述

在这里插入图片描述

4.简化路由完成路由器的静态路由配置

[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip route-static 192.168.1.4 30 192.168.1.2
[R1]ip route-static 192.168.1.12 30 192.168.1.10
[R1]ip route-static 192.168.1.96 27 192.168.1.2
[R1]ip route-static 192.168.1.96 27 192.168.1.10
[R1]ip route-static 192.168.1.128 27 192.168.1.10
[R1]ip route-static 0.0.0.0 0 192.168.1.10
 
[R2]ip route-static 192.168.1.128 27 192.168.1.1
[R2]ip route-static 192.168.1.128 27 192.168.1.6
[R2]ip route-static 192.168.1.32 27 192.168.1.1
[R2]ip route-static 192.168.1.96 27 192.168.1.6
[R2]ip route-static 192.168.1.8 30 192.168.1.1
[R2]ip route-static 192.168.1.12 30 192.168.1.6
[R2]ip route-static 0.0.0.0 0 192.168.1.1
[R2]ip route-static 0.0.0.0 0 192.168.1.6
 
 
[R3]ip route-static 192.168.1.64 27 192.168.1.5
[R3]ip route-static 192.168.1.128 27 192.168.1.14
[R3]ip route-static 192.168.1.32 27 192.168.1.5
[R3]ip route-static 192.168.1.32 27 192.168.1.14
[R3]ip route-static 192.168.1.0 30 192.168.1.5
[R3]ip route-static 192.168.1.8 30 192.168.1.14
[R3]ip route-static 0.0.0.0 0 192.168.1.14
 
[R4]ip route-static 192.168.1.64 27 192.168.1.9
[R4]ip route-static 192.168.1.64 27 192.168.1.13
[R4]ip route-static 192.168.1.32 27 192.168.1.9
[R4]ip route-static 192.168.1.96 27 192.168.1.13
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[R4]ip route-static 192.168.1.4 30 192.168.1.13
[R4]ip route-static 0.0.0.0 0 192.168.1.18
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
//设置优先级
 
[R5]ip route-static 192.168.1.0 24 192.168.1.17
[R5]ip route-static 192.168.1.0 24 192.168.1.21

5.R5使用缺省路由

[R1]ip route-static 0.0.0.0 0 192.168.1.2
[R1]ip route-static 0.0.0.0 0 192.168.1.6
[R2]ip route-static 0.0.0.0 0 192.168.1.1
[R3]ip route-static 0.0.0.0 0 192.168.1.14
[R4]ip route-static 0.0.0.0 0 192.168.1.18
[R5]ip route-static 192.168.1.0 30  192.168.1.17
[R5]ip route-static 192.168.1.4 30 192.168.1.17
[R5]ip route-static 192.168.1.8 30 192.168.1.17
[R5]ip route-static 192.168.1.12 30 192.168.1.17
[R5]ip route-static 192.168.1.32 27 192.168.1.17
[R5]ip route-static 192.168.1.64 27 192.168.1.17
[R5]ip route-static 192.168.1.96 27 192.168.1.17
[R5]ip route-static 192.168.1.128 27 192.168.1.17

6.使用R1进行Telnet测试登录R2、R3、R4、R5设备

设置账号admin密码admin
[r2]user vty 0 4
[r2-ui-vty0-4]authentication-mode aaa
[r2-ui-vty0-4]q
[r2]aaa
[r2-aaa]local-user admin password cipher admin
[r2-aaa]local-user admin privilege level 15
[r2-aaa]local-user admin service-type telnet 
[r2-aaa]

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

6.结果验证

在这里插入图片描述

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值