静态路由练习

1.拓扑图

 

 2.需求分析

  • 全网用192.168.1.0/24进行IP地址分配
  • R7作为DHCP服务器为PC分配Ip地址
  • 路由上均具备2个环回地址
  • R6与R7之间正常走1000M,备份走100M
  • 全网尽量负载均衡
  • 减少路由表数量,并避免环路产生
  • 全网可达

3.所有配置内容

[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
May  2 2023 16:22:58-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]q
 
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
May  2 2023 16:23:14-08:00 r1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1-GigabitEthernet0/0/1]q
 
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]q
 
[r1]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.1.49 28
[r1-LoopBack1]q
 
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[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
 
[r1]ip route-static 192.168.1.32 27 NULL 0
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
May  2 2023 16:25:09-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]q
 
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
May  2 2023 16:25:39-08:00 r2 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r2-GigabitEthernet0/0/1]q
 
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack0]q
 
[r2]interface LoopBack 1
[r2-LoopBack1]ip address 192.168.1.81 28
[r2-LoopBack1]q
 
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 0.0.0.0 0 192.168.1.10
 
[r2]ip route-static 192.168.1.64 27 NULL 0

[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
May  2 2023 16:27:48-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]q
 
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
May  2 2023 16:28:08-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r3-GigabitEthernet0/0/1]q
 
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack0]q
 
[r3]interface LoopBack 1
[r3-LoopBack1]ip address 192.168.1.113 28
[r3-LoopBack1]q
 
[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 0.0.0.0 0 192.168.1.14
 
[r3]ip route-static 192.168.1.96 27 NULL 0
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
May  2 2023 16:29:55-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r4-GigabitEthernet0/0/0]q
 
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
May  2 2023 16:30:26-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r4-GigabitEthernet0/0/1]q
 
[r4]interface GigabitEthernet 0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
May  2 2023 16:30:52-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r4-GigabitEthernet0/0/2]q
 
[r4]interface GigabitEthernet 4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
May  2 2023 16:31:37-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet4/0/0 has entered the UP state. 
[r4-GigabitEthernet4/0/0]q
 
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack0]q
 
[r4]interface LoopBack 1
[r4-LoopBack1]ip address 192.168.1.145 28
[r4-LoopBack1]q
 
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.32 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 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.96 27 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 90
 
[r4]ip route-static 192.168.1.128 27 NULL 0
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
May  2 2023 16:35:21-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r5-GigabitEthernet0/0/0]q
 
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]ip address 192.168.1.22 30
May  2 2023 16:35:39-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r5-GigabitEthernet0/0/1]q
 
[r5]interface GigabitEthernet 0/0/2
[r5-GigabitEthernet0/0/2]ip address 192.168.1.193 27
May  2 2023 16:36:24-08:00 r5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[r5-GigabitEthernet0/0/2]q
 
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 192.168.1.161 28
[r5-LoopBack0]q
 
[r5]interface LoopBack 1
[r5-LoopBack1]ip address 192.168.1.177 28
[r5-LoopBack1]q
 
[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 preference 90
 
[r5]ip route-static 192.168.1.24 29 NULL 0
[r5]ip route-static 192.168.1.224 27 NULL 0

4.测试结果 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值