静态路由综合配置

静态路由综合配置_第1张图片

思路总结 :首先进行IP地址划分 本图中路由器间存在6个网段 每个路由器又存在两个回环路由一共有2*4+6=14个网段 14<2的4次方 子网掩码右移四位

得出14个网段

192.168.1.0  28

192.168.1.0000 0000 ->192.168.1.0 28          AR1回环  192.168.1.0/27  划入同一网段

192.168.1.0001 0000 ->192.168.1.16 28        AR1回环

192.168.1.0010 0000 ->192.168.1.32 28        AR2回环192.168.1.32/27 划入同一网段

192.168.1.0011 0000 ->192.168.1.48 28        AR2回环

192.168.1.0100 0000 ->192.168.1.64 28        AR4回环192.168.1.64/27 划入同一网段

192.168.1.0101 0000 ->192.168.1.80 28        AR4回环

192.168.1.0110 0000 ->192.168.1.96 28        AR3回环192.168.1.96/27 划入同一网段

192.168.1.0111 0000 ->192.168.1.112 28       AR3回环

192.168.1.1000 0000 ->192.168.1.128 28      AR1 G0/0/0  AR2 G0/0/0

192.168.1.1001 0000 ->192.168.1.144 28      AR1 G0/0/1 AR3 G0/0/0

192.168.1.1010 0000 ->192.168.1.160 28      AR3 G0/0/1 AR4 G0/0/2

192.168.1.1011 0000 ->192.168.1.176 28      AR2 G0/0/1 AR4 G0/0/0

192.168.1.1100 0000 ->192.168.1.192 28     AR4 G0/0/1 AR5 G0/0/0

192.168.1.1101 0000 ->192.168.1.208 28      AR4 G4/0/0 AR5 G0/0/1

如此一来就可以开始配置各个接口的IP了

路由回环需要使用 

interfa loop back 【名字】来创建一个回环接口 并进入该接口

R1~R4没有直接到达5.5.5.5/24的静态路由 所以需要用 缺省路由 

IP route-static 0.0.0.0 0 下一跳的位置 

为了避免环路的出现 需要使用空接口技术来实现

AR 1:IP route-static 192.168.1.0 27 NULL 0

由于路由表会最长字段匹配 所以192.168.1.x 28 不会被路由AR0丢入null口

AR4与AR5之间存在速度不同的 线路 不能够负载均衡 于是要用浮动路由 

通过 修改路由优先级来备份一条路由 让1000m线做 主线路 100m线做 备份线路

实际操作:注意在操作连线时会出现缺少接口的情况 可以右键路由器在设置里面插入接口卡

静态路由综合配置_第2张图片

 静态路由综合配置_第3张图片

 将下面的板卡插入 即可获得对应功能

先配置IP 以及回环路由

这里只详细展现其中一个路由的配置 其它基本一致

环回路由:

[Huawei]sysname AR1
[AR1]int LoopBack 1
[AR1-LoopBack1]ip add 192.168.1.1 28
[AR1-LoopBack1]quit
[AR1]int LoopBack 2
[AR1-LoopBack2]ip add 192.168.1.17 28

接口地址:

[AR1-LoopBack2]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.129 28
May  9 2023 20:38:58-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[AR1-GigabitEthernet0/0/0]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 192.168.1.145 28
May  9 2023 20:39:25-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 

配置完成 

在r4上g4/0/0不能直接配置接口需要借助vlanif虚拟接口来配置接口

[Huawei]vlan 2
[Huawei-vlan2]quit
[Huawei]int vlanif 2
[Huawei-Vlanif2]ip add 192.168.1.209 28
[Huawei-GigabitEthernet4/0/0]port link-type access 
[Huawei-GigabitEthernet4/0/0]port default vlan 2

在实验中我发现将接口配置成trunk模式 并且允许所有vlan通过时 无法删除这一操作

经网络查询 明白了正确的删除方法 先

undo port trunk allow-pass vlan all

然后port trunk allow-pass vlan 1

然后 undo port link-type trunk

AR1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.129/28     up         up        
GigabitEthernet0/0/1              192.168.1.145/28     up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack1                         192.168.1.1/28       up         up(s)     
LoopBack2                         192.168.1.17/28      up         up(s)     
NULL0                             unassigned           up         up(s)     

AR2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.130/28     up         up        
GigabitEthernet0/0/1              192.168.1.177/28     up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack1                         192.168.1.33/28      up         up(s)     
LoopBack2                         192.168.1.49/28      up         up(s)     
NULL0                             unassigned           up         up(s)     

AR3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.146/28     up         up        
GigabitEthernet0/0/1              192.168.1.161/28     up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack1                         192.168.1.97/28      up         up(s)     
LoopBack2                         192.168.1.113/28     up         up(s)     
NULL0                             unassigned           up         up(s)     

AR4:

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.178/28     up         up        
GigabitEthernet0/0/1              192.168.1.193/28     up         up        
GigabitEthernet0/0/2              192.168.1.162/28     up         up        
LoopBack1                         192.168.1.65/28      up         up(s)     
LoopBack2                         192.168.1.81/28      up         up(s)     
NULL0                             unassigned           up         up(s)     
Vlanif2                           192.168.1.209/28     up         up        

AR5

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.194/28     up         up        
GigabitEthernet0/0/1              192.168.1.210/28     up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack1                         5.5.5.5/24           up         up(s)     
NULL0                             unassigned           up         up(s)     

现在可以进行测试用路由器ping临近网段

AR1

[AR1]ping 192.168.1.1
  PING 192.168.1.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=10 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/2/10 ms

[AR1]ping 192.168.1.17
  PING 192.168.1.17: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.17: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.17: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.17: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.17: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.17: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.17 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[AR1]ping192.168.1.129
     ^
Error: Unrecognized command found at '^' position.
[AR1]ping 192.168.1.129
  PING 192.168.1.129: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.129: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.129: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.129: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.129: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.129: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.129 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[AR1]ping 192.168.1.130
  PING 192.168.1.130: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.130: bytes=56 Sequence=1 ttl=255 time=60 ms
    Reply from 192.168.1.130: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.130: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 192.168.1.130: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.130: bytes=56 Sequence=5 ttl=255 time=30 ms

  --- 192.168.1.130 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/32/60 ms

[AR1]ping 192.168.1.145
  PING 192.168.1.145: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.145: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.145: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.145: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.145: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.145: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.145 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[AR1]ping 192.168.1.146
  PING 192.168.1.146: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.146: bytes=56 Sequence=1 ttl=255 time=70 ms
    Reply from 192.168.1.146: bytes=56 Sequence=2 ttl=255 time=30 ms
    Reply from 192.168.1.146: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 192.168.1.146: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.146: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 192.168.1.146 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/32/70 ms

AR4

[Huawei]PING 192.168.1.177
  PING 192.168.1.177: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.177: bytes=56 Sequence=1 ttl=255 time=50 ms
    Reply from 192.168.1.177: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.177: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 192.168.1.177: bytes=56 Sequence=4 ttl=255 time=10 ms
    Reply from 192.168.1.177: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 192.168.1.177 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/22/50 ms

[Huawei]PING 192.168.1.178
  PING 192.168.1.178: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.178: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.178: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.178: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.178: bytes=56 Sequence=4 ttl=255 time=1 ms

  --- 192.168.1.178 ping statistics ---
    4 packet(s) transmitted
    4 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[Huawei]PING192.168.1.161
        ^
Error: Unrecognized command found at '^' position.
[Huawei]PING 192.168.1.161
  PING 192.168.1.161: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.161: bytes=56 Sequence=1 ttl=255 time=40 ms
    Reply from 192.168.1.161: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.161: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 192.168.1.161: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.161: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 192.168.1.161 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/26/40 ms

[Huawei]PING 192.168.1.162
  PING 192.168.1.162: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.162: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.162: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.162: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.162: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.162: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.162 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[Huawei]PING 192.168.1.65
  PING 192.168.1.65: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.65: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.65: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.65 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[Huawei]PING 192.168.1.81
  PING 192.168.1.81: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.81: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.81: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.81: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.81: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.81: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.81 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[Huawei]PING 192.168.1.209
  PING 192.168.1.209: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.209: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.209: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.209: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.209: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.209: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.209 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[Huawei]
[Huawei]PING 192.168.1.210
  PING 192.168.1.210: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.210: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 192.168.1.210: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.210: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 192.168.1.210: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.210: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 192.168.1.210 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/22/30 ms

[Huawei]PING 192.168.1.193
  PING 192.168.1.193: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.193: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 192.168.1.193: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.193: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.193: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.193: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.193 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

[Huawei]PING 192.168.1.194
  PING 192.168.1.194: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.194: bytes=56 Sequence=1 ttl=255 time=10 ms
    Reply from 192.168.1.194: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.194: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 192.168.1.194: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.194: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 192.168.1.194 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/18/20 ms

AR5

PING 5.5.5.5
  PING 5.5.5.5: 56  data bytes, press CTRL_C to break
    Reply from 5.5.5.5: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 5.5.5.5 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

终于 我们可以开始写路由了

这里主要给大家展示AR4的配置

其他只展现路由表

配置错误 可以直接undo IP route-static all这一命令可以清楚所有静态路由

AR1路由表

Routing Tables: Public
         Destinations : 23       Routes : 27       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.130   GigabitEthernet
0/0/0
                    Static  60   0          RD   192.168.1.146   GigabitEthernet
0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/27  Static  60   0           D   0.0.0.0         NULL0
    192.168.1.0/28  Direct  0    0           D   192.168.1.1     LoopBack1
    192.168.1.1/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.15/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.16/28  Direct  0    0           D   192.168.1.17    LoopBack2
   192.168.1.17/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.31/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.32/27  Static  60   0          RD   192.168.1.130   GigabitEthernet
0/0/0
   192.168.1.64/27  Static  60   0          RD   192.168.1.130   GigabitEthernet
0/0/0
                    Static  60   0          RD   192.168.1.146   GigabitEthernet
0/0/1
   192.168.1.96/27  Static  60   0          RD   192.168.1.146   GigabitEthernet
0/0/1
  192.168.1.128/28  Direct  0    0           D   192.168.1.129   GigabitEthernet
0/0/0
  192.168.1.129/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.143/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.144/28  Direct  0    0           D   192.168.1.145   GigabitEthernet
0/0/1
  192.168.1.145/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.159/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.192/28  Static  60   0          RD   192.168.1.130   GigabitEthernet
0/0/0
                    Static  60   0          RD   192.168.1.146   GigabitEthernet
0/0/1
  192.168.1.208/28  Static  60   0          RD   192.168.1.130   GigabitEthernet
0/0/0
                    Static  60   0          RD   192.168.1.146   GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

AR2

Routing Tables: Public
         Destinations : 25       Routes : 26       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.178   GigabitEthernet
0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/27  Static  60   0          RD   192.168.1.129   GigabitEthernet
0/0/0
   192.168.1.32/27  Static  60   0           D   0.0.0.0         NULL0
   192.168.1.32/28  Direct  0    0           D   192.168.1.33    LoopBack1
   192.168.1.33/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.47/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.48/28  Direct  0    0           D   192.168.1.49    LoopBack2
   192.168.1.49/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.63/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.64/27  Static  60   0          RD   192.168.1.178   GigabitEthernet
0/0/1
   192.168.1.96/27  Static  60   0          RD   192.168.1.178   GigabitEthernet
0/0/1
                    Static  60   0          RD   192.168.1.129   GigabitEthernet
0/0/0
  192.168.1.128/28  Direct  0    0           D   192.168.1.130   GigabitEthernet
0/0/0
  192.168.1.130/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.143/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.144/28  Static  60   0          RD   192.168.1.129   GigabitEthernet
0/0/0
  192.168.1.160/28  Static  60   0          RD   192.168.1.178   GigabitEthernet
0/0/1
  192.168.1.176/28  Direct  0    0           D   192.168.1.177   GigabitEthernet
0/0/1
  192.168.1.177/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.191/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.192/28  Static  60   0          RD   192.168.1.178   GigabitEthernet
0/0/1
  192.168.1.208/28  Static  60   0          RD   192.168.1.178   GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

AR3

Routing Tables: Public
         Destinations : 25       Routes : 26       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.162   GigabitEthernet
0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/27  Static  60   0          RD   192.168.1.145   GigabitEthernet
0/0/0
   192.168.1.32/27  Static  60   0          RD   192.168.1.145   GigabitEthernet
0/0/0
                    Static  60   0          RD   192.168.1.162   GigabitEthernet
0/0/1
   192.168.1.64/27  Static  60   0          RD   192.168.1.162   GigabitEthernet
0/0/1
   192.168.1.96/27  Static  60   0           D   0.0.0.0         NULL0
   192.168.1.96/28  Direct  0    0           D   192.168.1.97    LoopBack1
   192.168.1.97/32  Direct  0    0           D   127.0.0.1       LoopBack1
  192.168.1.111/32  Direct  0    0           D   127.0.0.1       LoopBack1
  192.168.1.112/28  Direct  0    0           D   192.168.1.113   LoopBack2
  192.168.1.113/32  Direct  0    0           D   127.0.0.1       LoopBack2
  192.168.1.127/32  Direct  0    0           D   127.0.0.1       LoopBack2
  192.168.1.128/28  Static  60   0          RD   192.168.1.145   GigabitEthernet
0/0/0
  192.168.1.144/28  Direct  0    0           D   192.168.1.146   GigabitEthernet
0/0/0
  192.168.1.146/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.159/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.160/28  Direct  0    0           D   192.168.1.161   GigabitEthernet
0/0/1
  192.168.1.161/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.175/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.176/28  Static  60   0          RD   192.168.1.162   GigabitEthernet
0/0/1
  192.168.1.192/28  Static  60   0          RD   192.168.1.162   GigabitEthernet
0/0/1
  192.168.1.208/28  Static  60   0          RD   192.168.1.162   GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

AR4

[Huawei]IP route-static 192.168.1.128 28 192.168.1.177
[Huawei]IP route-static 192.168.1.144 28 192.168.1.161
[Huawei]IP route-static 192.168.1.0 27 192.168.1.161
[Huawei]IP route-static 192.168.1.0 27 192.168.1.177
[Huawei]IP route-static 192.168.1.32 27 192.168.1.177
[Huawei]IP route-static 192.168.1.96 27 192.168.1.161
[Huawei]IP route-static 0.0.0.0 0 192.168.1.210
[Huawei]IP route-static 0.0.0.0 0 192.168.1.194 preference 61
[Huawei]IP route-static 192.168.1.64 27 NULL 0

TABLE

Routing Tables: Public
         Destinations : 29       Routes : 30       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.210   Vlanif2
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/27  Static  60   0          RD   192.168.1.161   GigabitEthernet
0/0/2
                    Static  60   0          RD   192.168.1.177   GigabitEthernet
0/0/0
   192.168.1.32/27  Static  60   0          RD   192.168.1.177   GigabitEthernet
0/0/0
   192.168.1.64/27  Static  60   0           D   0.0.0.0         NULL0
   192.168.1.64/28  Direct  0    0           D   192.168.1.65    LoopBack1
   192.168.1.65/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.79/32  Direct  0    0           D   127.0.0.1       LoopBack1
   192.168.1.80/28  Direct  0    0           D   192.168.1.81    LoopBack2
   192.168.1.81/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.95/32  Direct  0    0           D   127.0.0.1       LoopBack2
   192.168.1.96/27  Static  60   0          RD   192.168.1.161   GigabitEthernet
0/0/2
  192.168.1.128/28  Static  60   0          RD   192.168.1.177   GigabitEthernet
0/0/0
  192.168.1.144/28  Static  60   0          RD   192.168.1.161   GigabitEthernet
0/0/2
  192.168.1.160/28  Direct  0    0           D   192.168.1.162   GigabitEthernet
0/0/2
  192.168.1.162/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
  192.168.1.175/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
  192.168.1.176/28  Direct  0    0           D   192.168.1.178   GigabitEthernet
0/0/0
  192.168.1.178/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.191/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.192/28  Direct  0    0           D   192.168.1.193   GigabitEthernet
0/0/1
  192.168.1.193/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.207/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.208/28  Direct  0    0           D   192.168.1.209   Vlanif2
  192.168.1.209/32  Direct  0    0           D   127.0.0.1       Vlanif2
  192.168.1.223/32  Direct  0    0           D   127.0.0.1       Vlanif2
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

AR5非常简单 只需要配一个缺省路由 

[Huawei]IP route-static 0.0.0.0 0 192.168.1.209
[Huawei]IP route-static 0.0.0.0 0 192.168.1.193 preference 61
Routing Tables: Public
         Destinations : 14       Routes : 14       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   192.168.1.209   GigabitEthernet
0/0/1
        5.5.5.0/24  Direct  0    0           D   5.5.5.5         LoopBack1
        5.5.5.5/32  Direct  0    0           D   127.0.0.1       LoopBack1
      5.5.5.255/32  Direct  0    0           D   127.0.0.1       LoopBack1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
  192.168.1.192/28  Direct  0    0           D   192.168.1.194   GigabitEthernet
0/0/0
  192.168.1.194/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.207/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.208/28  Direct  0    0           D   192.168.1.210   GigabitEthernet
0/0/1
  192.168.1.210/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.1.223/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

测试结果 用AR5挨个ping了一遍

[Huawei]ping 192.168.1.1
  PING 192.168.1.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=253 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=253 time=40 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=253 time=20 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=253 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=253 time=30 ms

  --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/30/40 ms

[Huawei]ping 192.168.1.17
  PING 192.168.1.17: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.17: bytes=56 Sequence=1 ttl=253 time=50 ms
    Reply from 192.168.1.17: bytes=56 Sequence=2 ttl=253 time=30 ms
    Reply from 192.168.1.17: bytes=56 Sequence=3 ttl=253 time=30 ms
    Reply from 192.168.1.17: bytes=56 Sequence=4 ttl=253 time=20 ms
    Reply from 192.168.1.17: bytes=56 Sequence=5 ttl=253 time=30 ms

  --- 192.168.1.17 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/32/50 ms

[Huawei]ping 192.168.1.129
  PING 192.168.1.129: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.129: bytes=56 Sequence=1 ttl=253 time=40 ms
    Reply from 192.168.1.129: bytes=56 Sequence=2 ttl=253 time=30 ms
    Reply from 192.168.1.129: bytes=56 Sequence=3 ttl=253 time=30 ms
    Reply from 192.168.1.129: bytes=56 Sequence=4 ttl=253 time=50 ms
    Reply from 192.168.1.129: bytes=56 Sequence=5 ttl=253 time=50 ms

  --- 192.168.1.129 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/40/50 ms

[Huawei]ping 192.168.1.177
  PING 192.168.1.177: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.177: bytes=56 Sequence=1 ttl=254 time=40 ms
    Reply from 192.168.1.177: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 192.168.1.177: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 192.168.1.177: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 192.168.1.177: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 192.168.1.177 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/24/40 ms

[Huawei]ping 192.168.1.64
  PING 192.168.1.64: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 192.168.1.65: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.65: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 192.168.1.64 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/18/30 ms

[Huawei]ping 192.168.1.32
  PING 192.168.1.32: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.33: bytes=56 Sequence=1 ttl=254 time=30 ms
    Reply from 192.168.1.33: bytes=56 Sequence=2 ttl=254 time=20 ms
    Reply from 192.168.1.33: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 192.168.1.33: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 192.168.1.33: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 192.168.1.32 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/22/30 ms

[Huawei]ping 192.168.1.97
  PING 192.168.1.97: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.97: bytes=56 Sequence=1 ttl=254 time=20 ms
    Reply from 192.168.1.97: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 192.168.1.97: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 192.168.1.97: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 192.168.1.97: bytes=56 Sequence=5 ttl=254 time=30 ms

  --- 192.168.1.97 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/26/30 ms

[Huawei]ping 192.168.1.144
  PING 192.168.1.144: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out

  --- 192.168.1.144 ping statistics ---
    3 packet(s) transmitted
    0 packet(s) received
    100.00% packet loss

[Huawei]ping 192.168.1.145
  PING 192.168.1.145: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.145: bytes=56 Sequence=1 ttl=253 time=40 ms
    Reply from 192.168.1.145: bytes=56 Sequence=2 ttl=253 time=30 ms
    Reply from 192.168.1.145: bytes=56 Sequence=3 ttl=253 time=10 ms
    Reply from 192.168.1.145: bytes=56 Sequence=4 ttl=253 time=20 ms
    Reply from 192.168.1.145: bytes=56 Sequence=5 ttl=253 time=30 ms

  --- 192.168.1.145 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/26/40 ms

[Huawei]ping 5.5.5.5
  PING 5.5.5.5: 56  data bytes, press CTRL_C to break
    Reply from 5.5.5.5: bytes=56 Sequence=1 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 5.5.5.5 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/1/1 ms

很显然 全网段可达 满足题目要求!!!

你可能感兴趣的:(智能路由器,网络)