当前位置:首页 » 《资源分享》 » 正文

网络基础(五)------静态路由--实操_shengli515的博客

19 人参与  2021年10月02日 13:23  分类 : 《资源分享》  评论

点击全文阅读


 问题描述:

 一.划分子网

从图可知,一共需要14个网段,包括6个骨干链路和8个环回接口。

在192.168.1.0/24上进行子网划分,划分如下:

借三位,得到8个网段

(一)192.168.1.000 00000/27         骨干链路---------再借三位得到每个骨干链路包含的接口

        192.168.1.000000 00/30    ------192.168.1.0/30

        192.168.1.000001 00/30    ------192.168.1.4/30

        192.168.1.000010 00/30    ------192.168.1.8/30

        192.168.1.000011 00/30    ------192.168.1.12/30

        192.168.1.000100 00/30    ------192.168.1.16/30

        192.168.1.000101 00/30    ------192.168.1.20/30

        // 192.168.1.000110 00/30

        // 192.168.1.000111 00/30

这个色代表的是192.168.1.0/24划分出来的8个这个色代表的是骨干链路划分出来的8个这个色代表划分出来但未使用的

再借一位得到每个路由器的环回接口:

(二)192.168.1.001 00000/27          AR1的环回接口------192.168.1.32/27

192.168.1.0010 0000/28--------------192.168.1.32/28

192.168.1.0011 0000/28---------------192.168.1.64/28

(三)192.168.1.010 00000/27          AR2的环回接口------192.168.1.64/27

192.168.1.0100 0000/28 ---------192.168.1.64/28

192.168.1.0100 0000/28----------192.168.1.80/28

(四)192.168.1.011 00000/27          A R3的环回接口-------192.168.1.96/27

192.168.1.0110 0000/28-----------192.168.1.96/28

192.168.1.0110 0000/28-----------192.168.1.112/28

(五)192.168.1.100 00000/27          AR4的环回接口--------192.168.1.128/27

192.168.1.1000 0000/28-----------192.168.1.128/28

192.168.1.1000 0000/28-----------192.168.1.144/28

// (六)192.168.1.101 00000/27        

// (七)192.168.1.110 00000/27

// (八)192.168.1.111 00000/27

二.配置IP和环回地址

 AR1

[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add	
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[Huawei-GigabitEthernet0/0/0]
Sep 11 2021 20:43:51-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add	
[Huawei-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[Huawei-GigabitEthernet0/0/1]
Sep 11 2021 20:44:16-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int l0
[Huawei-LoopBack0]ip add	
[Huawei-LoopBack0]ip address 192.168.1.33 28
[Huawei-LoopBack0]int l1
[Huawei-LoopBack1]ip add 192.168.1.49 28
pback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/30       up         up        
GigabitEthernet0/0/1              192.168.1.5/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.33/28      up         up(s)     
LoopBack1                         192.168.1.49/28      up         up(s)     
NULL0                             unassigned           up         up(s) 

AR2

[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add	
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[Huawei-GigabitEthernet0/0/0]
Sep 11 2021 20:50:31-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add	
[Huawei-GigabitEthernet0/0/1]ip address 192.168.1.9 30
Sep 11 2021 20:50:53-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int l0
[Huawei-LoopBack0]ip add	
[Huawei-LoopBack0]ip address 192.168.1.65 28
[Huawei-LoopBack0]int l1
[Huawei-LoopBack1]ip add 192.168.1.81 28
[Huawei-LoopBack1]dis	
[Huawei-LoopBack1]discard
[Huawei-LoopBack1]display ip in	
[Huawei-LoopBack1]display ip interface b	
[Huawei-LoopBack1]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.2/30       up         up        
GigabitEthernet0/0/1              192.168.1.9/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.65/28      up         up(s)     
LoopBack1                         192.168.1.81/28      up         up(s)     
NULL0                             unassigned           up         up(s)  

 AR3

[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.6 30
[Huawei-GigabitEthernet0/0/0]
Sep 11 2021 20:54:32-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.1.13 30
Sep 11 2021 20:54:50-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int l0
[Huawei-LoopBack0]ip add 192.168.1.97 28
[Huawei-LoopBack0]int l1
[Huawei-LoopBack1]ip add 192.168.1.113 28
[Huawei-LoopBack1]disp	
[Huawei-LoopBack1]display ip i	
[Huawei-LoopBack1]display ip interface b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.6/30       up         up        
GigabitEthernet0/0/1              192.168.1.13/30      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         192.168.1.97/28      up         up(s)     
LoopBack1                         192.168.1.113/28     up         up(s)     
NULL0                             unassigned           up         up(s) 

AR4

[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.14 30
[Huawei-GigabitEthernet0/0/0]
Sep 11 2021 20:57:13-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.1.10 30
Sep 11 2021 20:57:41-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int g 0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 192.168.1.17 30
Sep 11 2021 20:58:20-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g 4/0/0
[Huawei-GigabitEthernet4/0/0]ip add 192.168.1.21 30
Sep 11 2021 20:59:20-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
 IP on the interface GigabitEthernet4/0/0 has entered the UP state. 
[Huawei-GigabitEthernet4/0/0]int l0
[Huawei-LoopBack0]ip add 192.168.1.129 28
[Huawei-LoopBack0]int l1
[Huawei-LoopBack1]ip add 192.168.1.145 28
[Huawei-LoopBack1]dis	
[Huawei-LoopBack1]discard
[Huawei-LoopBack1]display ip in	
[Huawei-LoopBack1]display ip interface b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 7
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 7
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.14/30      up         up        
GigabitEthernet0/0/1              192.168.1.10/30      up         up        
GigabitEthernet0/0/2              192.168.1.17/30      up         up        
GigabitEthernet4/0/0              192.168.1.21/30      up         up        
GigabitEthernet4/0/1              unassigned           down       down      
GigabitEthernet4/0/2              unassigned           down       down      
GigabitEthernet4/0/3              unassigned           down       down      
LoopBack0                         192.168.1.129/28     up         up(s)     
LoopBack1                         192.168.1.145/28     up         up(s)     
NULL0                             unassigned           up         up(s) 

AR5

[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.18 30
Sep 11 2021 21:04:18-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]
[Huawei-GigabitEthernet0/0/0]int g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.1.22 30
Sep 11 2021 21:04:47-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int l0
[Huawei-LoopBack0]ip add	
[Huawei-LoopBack0]ip address 5.5.5.5 24
[Huawei-LoopBack0]dis	
[Huawei-LoopBack0]discard
[Huawei-LoopBack0]display ip i	
[Huawei-LoopBack0]display ip interface b	
[Huawei-LoopBack0]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.18/30      up         up        
GigabitEthernet0/0/1              192.168.1.22/30      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         5.5.5.5/24           up         up(s)     
NULL0                             unassigned           up         up(s) 

三.配置静态路由

AR1

[Huawei]ip route-static 192.168.1.64 27 192.168.1.2
[Huawei]ip ro s	
[Huawei]ip ro	
[Huawei]ip route
[Huawei]ip route-static 192.168.1.8 30 192.168.1.2
[Huawei]ip route-static 192.168.1.128 27 192.168.1.2
[Huawei]ip route-static 192.168.1.128 27 192.168.1.6
[Huawei]
[Huawei]ip route-static 192.168.1.16 30 192.168.1.2
[Huawei]ip route-static 192.168.1.16 30 192.168.1.6
[Huawei]ip route-static 192.168.1.12 30 192.168.1.6
[Huawei]ip route-static 192.168.1.96 27 192.168.1.6

 AR2

[Huawei]ip route-static 192.168.1.128 27 192.168.1.10
[Huawei]ip route-static 192.168.1.16 30 192.168.1.10
[Huawei]ip route-static 192.168.1.12 30 192.168.1.10
[Huawei]ip route-static 192.168.1.96 27 192.168.1.10
[Huawei]ip route-static 192.168.1.96 27 192.168.1.1
[Huawei]ip route-static 192.168.1.4 30 192.168.1.1
[Huawei]ip route-static 192.168.1.32 27 192.168.1.1

AR3

[Huawei]ip route-static 192.168.1.32 27 192.168.1.5
[Huawei]ip route-static 192.168.1.0 27 192.168.1.5
[Huawei]ip route-static 192.168.1.64 27 192.168.1.5
[Huawei]ip route-static 192.168.1.64 27 192.168.1.14
[Huawei]ip route-static 192.168.1.8 27 192.168.1.14
[Huawei]ip route-static 192.168.1.8 30 192.168.1.14
[Huawei]ip route-static 192.168.1.128 27 192.168.1.14
[Huawei]ip route-static 192.168.1.16 30 192.168.1.14

AR4

[Huawei]ip route-static 192.168.1.96 27 192.168.1.13
[Huawei]ip route-static 192.168.1.4 30 192.168.1.13
[Huawei]ip route-static 192.168.1.32 27 192.168.1.9
[Huawei]ip route-static 192.168.1.0 30 192.168.1.9
[Huawei]ip route-static 192.168.1.64 27 192.168.1.9

 AR5

[Huawei]ip route-static 192.168.1.32 27 192.168.1.17    /
[Huawei]ip route-static 192.168.1.64 27 192.168.1.17
[Huawei]ip route-static 192.168.1.96 27 192.168.1.17
[Huawei]ip route-static 192.168.1.128 27 192.168.1.17   //环回地址
[Huawei]ip route-static 192.168.1.0 30 192.168.1.17    /
[Huawei]ip route-static 192.168.1.4 30 192.168.1.17
[Huawei]ip route-static 192.168.1.8 30 192.168.1.17 
[Huawei]ip route-static 192.168.1.12 30 192.168.1.17   //骨干链路

四.写缺省和处理黑洞

AR1

[Huawei]ip route-static 0.0.0.0 0 192.168.1.2
[Huawei]ip route-static 0.0.0.0 0 192.168.1.16
ip route-static 192.168.1.32 27 NULL0

 AR2

[Huawei]ip route-static 0.0.0.0 0 192.168.1.10
[Huawei]ip route-static 192.168.1.64 27 NULL 0

AR3

[Huawei]ip route-static 0.0.0.0 0 192.168.1.14
[Huawei]ip route-static 192.168.1.96 27 NULL 0

AR4

[Huawei]ip route-static 0.0.0.0 0 192.168.1.18
[Huawei]ip route-static 192.168.1.128 27 NULL 0

五.做浮动静态

AR5


[Huawei]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 preference 68
[Huawei]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 preference 68
[Huawei]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 preference 68
[Huawei]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 preference 68
[Huawei]ip route-static 192.168.1.32 255.255.255.252 192.168.1.21 preference 68
[Huawei]ip route-static 192.168.1.64 255.255.255.252 192.168.1.21 preference 68
[Huawei]ip route-static 192.168.1.96 255.255.255.252 192.168.1.21 preference 68
[Huawei]ip route-static 192.168.1.128 255.255.255.252 192.168.1.21 preference 68

将AR5 1000M的接口shutdown,即切换到100M接口的,打开,即恢复到1000M的


点击全文阅读


本文链接:http://zhangshiyu.com/post/29203.html

接口  划分  骨干  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1