Ensp静态路由、RIPv1混合路由
文章目录
什么是静态路由
简介:
静态路由(英语:Static routing)是一种路由的方式,路由项(routing entry)由手动配置,而非动态决定。与动态路由不同,静态路由是固定的,不会改变,即使网络状况已经改变或是重新被组态。一般来说,静态路由是由网络管理员逐项加入路由表。
优点:
使用静态路由的另一个好处是网络安全保密性高。动态路由因为需要路由器之间频繁地交换各自的路由表,而对路由表的分析可以揭示网络的拓扑结构和网络地址等信息。因此,网络出于安全方面的考虑也可以采用静态路由。不占用网络带宽,因为静态路由不会产生更新流量。静态路由适用于中小型网络。
缺点:
大型和复杂的网络环境通常不宜采用静态路由。一方面,网络管理员难以全面地了解整个网络的拓扑结构;另一方面,当网络的拓扑结构和链路状态发生变化时,路由器中的静态路由信息需要大范围地调整,这一工作的难度和复杂程度非常高。当网络发生变化或网络发生故障时,不能重选路由,很可能使路由失败。
常见问题:
1)为什么要有默认路由
路由得查看路由表而决定怎么转发数据包,用静态路由一个个的配置,繁琐易错。如果路由器有个邻居知道怎么前往所有的目的地,可以把路由表匹配的任务交给它,省了很多事。
例,网关会知道所有的路由,如果一个路由器连接到网关,就可以配置默认路由,把所有的数据包都转发到网关。
2)为什么默认路由是0.0.0.0
匹配IP地址时,0表示wildcard, 任何值都可以。所以0.0.0.0和任何目的地址匹配都会成功,造成默认路由要求的效果。
本文章取自于静态路由_百度百科 (baidu.com)
什么是RIP距离矢量路由协议
RIP版本介绍
RIP在IPv4中有v1和v2两个版本,IPV6中有RIPng版本。在配置RIP时,如果不指定版本,接口默认情况下能接收 v1和v2 的报文,但只能发送 v1 的报文;在指定版本的情况下,RIPv1只能接收和发送v1的报文,RIPv2只能接收和发送v2的报文。
RIP 在IPV4中有两个版本:RIPv1 和 RIPv2。RIPv1没有认证的功能,RIPv2可以支持认证,并且有明文和MD5两种认证。
- RIPv1 是有类别路由协议(Class Routing Protocol),它只支持以广播方式发布协议报文。RIP-1 的协议报文中没有携带掩码信息,它只能识别A、B、C 类这样的自然网段的路由, 因此RIP-1 无法支持路由聚合, 也不支持不连续子网(Discontiguous Subnet)。RIPv1默认开启路由自动汇总,且无法关闭,也不支持手动汇总。
- RIPv2 是一种无分类路由协议(Classless Routing Protocol),RIP-2 有两种报文传送方式:广播方式和组播方式,缺省将采用组播方式发送报文,使用的组播地址为224.0.0.9。当接口运行RIP-2 广播方式时,也可接收RIP-1 的报文。RIP-2 的协议报文中携带掩码信息,支持手动路由汇总和自动路由汇总两种方式。RIPv2支持路由自动汇总,默认是开启的,并且可以关闭。
在华为设备上,以太网接口和串口都默认启用了水平分割功能。为了防止环路和不连续子网问题的产生,在启用了水平分割或毒性逆转的接口上,RIPv2的默认自动汇总就会失效。要使RIPv2的默认自动汇总生效,有两种方法。
本文章取自于[eNSP实验五:RIP路由协议 - 知乎 (zhihu.com)](https://zhuanlan.zhihu.com/p/660380355#:~:text=RIPv1 是有类别路由协议(Class Routing Protocol),它只支持以广播方式发布协议报文。 RIP-1 的协议报文中没有携带掩码信息,它只能识别A、B、C,类这样的自然网段的路由, 因此RIP-1 无法支持路由聚合, 也不支持不连续子网(Discontiguous Subnet)。 RIPv1默认开启路由自动汇总,且无法关闭,也不支持手动汇总。)
为什么要使用混合模式
在一些现实场景中为了安全会使用混合模式来搭建网络
例如:
在一个公司中有一台路由器连接着运营上的设备,运营商那边的网络不可能会让公司内部路由器知晓,所以会在公司内部路由器的出接口上配置一条静态默认路由来宣告通往外面的网络。
网络TOPO
配置命令
R1
<HUAWEI>system-view
[HUAWEI]sysname R1
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]description go to routeR2
[R1-GigabitEthernet0/0/0]ip address 1.1.1.1 255.255.255.252
[R1-GigabitEthernet0/0/0]quit
[R1]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1] description go to hexinjioahuanSW1
[R1-GigabitEthernet0/0/1]ip address 3.3.3.2 255.255.255.252
[R1-GigabitEthernet0/0/1]quit
[R1]rip 1
[R1-rip-1]network 1.0.0.0
[R1-rip-1]quit
[R1]ip route-static 4.4.4.0 255.255.255.252 1.1.1.2
[R1]ip route-static 5.5.5.0 255.255.255.252 1.1.1.2
[R1]ip route-static 10.0.0.0 255.255.255.0 3.3.3.1
[R1]ip route-static 20.0.0.0 255.255.255.0 3.3.3.1
[R1]ip route-static 30.0.0.0 255.255.255.0 3.3.3.1
[R1]ip route-static 40.0.0.0 255.255.255.0 3.3.3.1
[R1]ip route-static 50.1.1.0 255.255.255.0 1.1.1.2
[R1]ip route-static 60.1.1.0 255.255.255.0 1.1.1.2
[R1]ip route-static 70.1.1.0 255.255.255.0 1.1.1.2
[R1]ip route-static 80.1.1.0 255.255.255.0 1.1.1.2
[R1]ip route-static 90.0.0.0 255.255.255.0 1.1.1.2
[R1]ip route-static 100.0.0.0 255.255.255.0 1.1.1.2
[R1]ip route-static 110.0.0.0 255.255.255.0 1.1.1.2
R1路由表
[R1]display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 24 Routes : 24
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.1 GigabitEthernet
0/0/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
1.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
2.0.0.0/8 RIP 100 1 D 1.1.1.2 GigabitEthernet
0/0/0
3.3.3.0/30 Direct 0 0 D 3.3.3.2 GigabitEthernet
0/0/1
3.3.3.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
3.3.3.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
4.4.4.0/30 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
5.5.5.0/30 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
10.0.0.0/24 Static 60 0 RD 3.3.3.1 GigabitEthernet
0/0/1
20.0.0.0/24 Static 60 0 RD 3.3.3.1 GigabitEthernet
0/0/1
30.0.0.0/24 Static 60 0 RD 3.3.3.1 GigabitEthernet
0/0/1
40.0.0.0/24 Static 60 0 RD 3.3.3.1 GigabitEthernet
0/0/1
50.1.1.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
60.1.1.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
70.1.1.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
80.1.1.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
90.0.0.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
100.0.0.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
110.0.0.0/24 Static 60 0 RD 1.1.1.2 GigabitEthernet
0/0/0
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
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
R2
<HUAWEI>system-view
[HUAWEI]sysname R2
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]description go to routeR1
[R2-GigabitEthernet0/0/0]ip address 1.1.1.2 255.255.255.252
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]description go to routeR3
[R2-GigabitEthernet0/0/1]ip address 2.2.2.1 255.255.255.252
[R2-GigabitEthernet0/0/1]quit
[R2]interface GigabitEthernet0/0/2
[R2-GigabitEthernet0/0/2]description go to hexinjiaohuanSW2
[R2-GigabitEthernet0/0/1]ip address 4.4.4.2 255.255.255.252
[R2-GigabitEthernet0/0/1]quit
[R2]rip 1
[R2-rip-1]network 1.0.0.0
[R2-rip-1]network 2.0.0.0
[R2-rip-1]quit
[R2]ip route-static 3.3.3.0 255.255.255.252 1.1.1.1
[R2]ip route-static 5.5.5.0 255.255.255.252 2.2.2.2
[R2]ip route-static 10.0.0.0 255.255.255.0 1.1.1.1
[R2]ip route-static 20.0.0.0 255.255.255.0 1.1.1.1
[R2]ip route-static 30.0.0.0 255.255.255.0 1.1.1.1
[R2]ip route-static 40.0.0.0 255.255.255.0 1.1.1.1
[R2]ip route-static 50.1.1.0 255.255.255.0 4.4.4.1
[R2]ip route-static 60.1.1.0 255.255.255.0 4.4.4.1
[R2]ip route-static 70.1.1.0 255.255.255.0 4.4.4.1
[R2]ip route-static 80.1.1.0 255.255.255.0 4.4.4.1
[R2]ip route-static 90.0.0.0 255.255.255.0 2.2.2.2
[R2]ip route-static 100.0.0.0 255.255.255.0 2.2.2.2
[R2]ip route-static 110.0.0.0 255.255.255.0 2.2.2.2
R2路由表
[R2]display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 26 Routes : 26
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/30 Direct 0 0 D 1.1.1.2 GigabitEthernet
0/0/0
1.1.1.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
1.1.1.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
2.2.2.0/30 Direct 0 0 D 2.2.2.1 GigabitEthernet
0/0/1
2.2.2.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
2.2.2.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
3.3.3.0/30 Static 60 0 RD 1.1.1.1 GigabitEthernet
0/0/0
4.4.4.0/30 Direct 0 0 D 4.4.4.2 GigabitEthernet
0/0/2
4.4.4.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
4.4.4.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
5.5.5.0/30 Static 60 0 RD 2.2.2.2 GigabitEthernet
0/0/1
10.0.0.0/24 Static 60 0 RD 1.1.1.1 GigabitEthernet
0/0/0
20.0.0.0/24 Static 60 0 RD 1.1.1.1 GigabitEthernet
0/0/0
30.0.0.0/24 Static 60 0 RD 1.1.1.1 GigabitEthernet
0/0/0
40.0.0.0/24 Static 60 0 RD 1.1.1.1 GigabitEthernet
0/0/0
50.1.1.0/24 Static 60 0 RD 4.4.4.1 GigabitEthernet
0/0/2
60.1.1.0/24 Static 60 0 RD 4.4.4.1 GigabitEthernet
0/0/2
70.1.1.0/24 Static 60 0 RD 4.4.4.1 GigabitEthernet
0/0/2
80.1.1.0/24 Static 60 0 RD 4.4.4.1 GigabitEthernet
0/0/2
90.0.0.0/24 Static 60 0 RD 2.2.2.2 GigabitEthernet
0/0/1
100.0.0.0/24 Static 60 0 RD 2.2.2.2 GigabitEthernet
0/0/1
110.0.0.0/24 Static 60 0 RD 2.2.2.2 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
R3
<HUAWEI>system-view
[HUAWEI]sysname R3
[R3]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]description go to route R2
[R3-GigabitEthernet0/0/1]ip address 2.2.2.2 255.255.255.252
[R3-GigabitEthernet0/0/1]quit
[R3]interface GigabitEthernet0/0/2
[R3-GigabitEthernet0/0/2]description go to hexinjiaohuanSW3
[R3-GigabitEthernet0/0/2] ip address 5.5.5.2 255.255.255.252
[R3-GigabitEthernet0/0/2]quti
[R3]rip 1
[R3-rip-1]network 2.0.0.0
[R3]ip route-static 3.3.3.0 255.255.255.252 2.2.2.1
[R3]ip route-static 4.4.4.0 255.255.255.252 2.2.2.1
[R3]ip route-static 10.0.0.0 255.255.255.0 2.2.2.1
[R3]ip route-static 20.0.0.0 255.255.255.0 2.2.2.1
[R3]ip route-static 30.0.0.0 255.255.255.0 2.2.2.1
[R3]ip route-static 40.0.0.0 255.255.255.0 2.2.2.1
[R3]ip route-static 50.1.1.0 255.255.255.0 2.2.2.1
[R3]ip route-static 60.1.1.0 255.255.255.0 2.2.2.1
[R3]ip route-static 70.1.1.0 255.255.255.0 2.2.2.1
[R3]ip route-static 90.0.0.0 255.255.255.0 5.5.5.1
[R3]ip route-static 100.0.0.0 255.255.255.0 5.5.5.1
[R3]ip route-static 110.0.0.0 255.255.255.0 5.5.5.1
R3路由表
[R3]display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 23 Routes : 23
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.0.0.0/8 RIP 100 1 D 2.2.2.1 GigabitEthernet
0/0/1
2.2.2.0/30 Direct 0 0 D 2.2.2.2 GigabitEthernet
0/0/1
2.2.2.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
2.2.2.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
3.3.3.0/30 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
4.4.4.0/30 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
5.5.5.0/30 Direct 0 0 D 5.5.5.2 GigabitEthernet
0/0/2
5.5.5.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
5.5.5.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
10.0.0.0/24 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
20.0.0.0/24 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
30.0.0.0/24 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
40.0.0.0/24 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
50.1.1.0/24 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
60.1.1.0/24 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
70.1.1.0/24 Static 60 0 RD 2.2.2.1 GigabitEthernet
0/0/1
90.0.0.0/24 Static 60 0 RD 5.5.5.1 GigabitEthernet
0/0/2
100.0.0.0/24 Static 60 0 RD 5.5.5.1 GigabitEthernet
0/0/2
110.0.0.0/24 Static 60 0 RD 5.5.5.1 GigabitEthernet
0/0/2
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
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
核心交换1
<HUAWEi>system-view
[HUAWEI]sysname SW1
[SW1]vlan batch 10 20 30 40 1000
[SW1]interface Vlanif10
[SW1-Vlanif10]ip address 10.0.0.254 255.255.255.0
[SW1-Vlanif10]quit
[SW1]interface Vlanif20
[SW1-Vlanif20]ip address 20.0.0.254 255.255.255.0
[SW1-Vlanif20]quit
[SW1]interface Vlanif30
[SW1-Vlanif30]ip address 30.0.0.254 255.255.255.0
[SW1-Vlanif30]quit
[SW1]interface Vlanif40
[SW1-Vlanif40]ip address 40.0.0.254 255.255.255.0
[SW1-Vlanif40]quit
[SW1]interface Vlanif1000
[SW1-Vlanif1000]ip address 3.3.3.1 255.255.255.252
[SW1-Vlanif1000]quit
[SW1]interface GigabitEthernet0/0/1
[SW1-GigabitEthernet0/0/1]description go to routeR1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 1000
[SW1-GigabitEthernet0/0/1]quit
[SW1]interface GigabitEthernet0/0/2
[SW1-GigabitEthernet0/0/2]description go to jietujiaohuanS1
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20 30 40
[SW1-GigabitEthernet0/0/2]quit
[SW1]ip route-static 0.0.0.0 0.0.0.0 3.3.3.2
核心交换1路由表
[SW1]display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 3.3.3.2 Vlanif1000
3.3.3.0/30 Direct 0 0 D 3.3.3.1 Vlanif1000
3.3.3.1/32 Direct 0 0 D 127.0.0.1 Vlanif1000
10.0.0.0/24 Direct 0 0 D 10.0.0.254 Vlanif10
10.0.0.254/32 Direct 0 0 D 127.0.0.1 Vlanif10
20.0.0.0/24 Direct 0 0 D 20.0.0.254 Vlanif20
20.0.0.254/32 Direct 0 0 D 127.0.0.1 Vlanif20
30.0.0.0/24 Direct 0 0 D 30.0.0.254 Vlanif30
30.0.0.254/32 Direct 0 0 D 127.0.0.1 Vlanif30
40.0.0.0/24 Direct 0 0 D 40.0.0.254 Vlanif40
40.0.0.254/32 Direct 0 0 D 127.0.0.1 Vlanif40
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
核心交换2
<HUAWEI>system-view
[HUAWEI]sysname SW2
[SW2]vlan batch 10 20 30 40 1000
[SW2]interface Vlanif10
[SW2-Vlanif10]ip address 50.1.1.254 255.255.255.0
[SW2-Vlanif10]quit
[SW2]interface Vlanif20
[SW2-Vlanif20]ip address 60.1.1.254 255.255.255.0
[SW2-Vlanif20]quit
[SW2]interface Vlanif30
[SW2-Vlanif30]ip address 70.1.1.254 255.255.255.0
[SW2-Vlanif30]quit
[SW2]interface Vlanif40
[SW2-Vlanif40]ip address 80.1.1.254 255.255.255.0
[SW2-Vlanif40]quit
[SW2]interface Vlanif1000
[SW2-Vlanif1000]ip address 4.4.4.1 255.255.255.252
[SW2-Vlanif1000]
[SW2]interface GigabitEthernet0/0/1
[SW2-GigabitEthernet0/0/1]description go to jierujioahuanS2
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20 30 40
[SW2-GigabitEthernet0/0/1]quit
[SW2]interface GigabitEthernet0/0/2
[SW2-GigabitEthernet0/0/2]description go to routeR2
[SW2-GigabitEthernet0/0/2]port link-type access
[SW2-GigabitEthernet0/0/2]port default vlan 1000
[SW2-GigabitEthernet0/0/2]quit
[SW2]ip route-static 0.0.0.0 0.0.0.0 4.4.4.2
核心交换2路由表
[SW2]display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 4.4.4.2 Vlanif1000
4.4.4.0/30 Direct 0 0 D 4.4.4.1 Vlanif1000
4.4.4.1/32 Direct 0 0 D 127.0.0.1 Vlanif1000
50.1.1.0/24 Direct 0 0 D 50.1.1.254 Vlanif10
50.1.1.254/32 Direct 0 0 D 127.0.0.1 Vlanif10
60.1.1.0/24 Direct 0 0 D 60.1.1.254 Vlanif20
60.1.1.254/32 Direct 0 0 D 127.0.0.1 Vlanif20
70.1.1.0/24 Direct 0 0 D 70.1.1.254 Vlanif30
70.1.1.254/32 Direct 0 0 D 127.0.0.1 Vlanif30
80.1.1.0/24 Direct 0 0 D 80.1.1.254 Vlanif40
80.1.1.254/32 Direct 0 0 D 127.0.0.1 Vlanif40
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
核心交换3
<HUAWEI>system-view
[HUAWEI]sysname SW3
[SW3]vlan batch 10 20 30 40 1000
[SW3]interface Vlanif10
ip address 90.0.0.254 255.255.255.0
#
[SW3]interface Vlanif20
[SW3-Vlanif10]ip address 100.0.0.254 255.255.255.0
[SW3-Vlanif10]quit
[SW3]interface Vlanif30
[SW3-Vlanif30]ip address 110.0.0.254 255.255.255.0
[SW3-Vlanif30]quit
[SW3]interface Vlanif1000
[SW3-Vlanif1000]ip address 5.5.5.1 255.255.255.252
[SW3-Vlanif1000]quit
[SW3]interface GigabitEthernet0/0/1
[SW3-GigabitEthernet0/0/1]description go to jierujioahuanS3
[SW3-GigabitEthernet0/0/1]port link-type trunk
[SW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20 30 40
[SW3-GigabitEthernet0/0/1]quit
[SW3]interface GigabitEthernet0/0/2
[SW3-GigabitEthernet0/0/2]description go to routeR3
[SW3-GigabitEthernet0/0/2]port link-type access
[SW3-GigabitEthernet0/0/2]port default vlan 1000
[SW3-GigabitEthernet0/0/2]quit
[SW3]ip route-static 0.0.0.0 0.0.0.0 5.5.5.2
核心交换3路由表
[SW3]display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 5.5.5.2 Vlanif1000
5.5.5.0/30 Direct 0 0 D 5.5.5.1 Vlanif1000
5.5.5.1/32 Direct 0 0 D 127.0.0.1 Vlanif1000
90.0.0.0/24 Direct 0 0 D 90.0.0.254 Vlanif10
90.0.0.254/32 Direct 0 0 D 127.0.0.1 Vlanif10
100.0.0.0/24 Direct 0 0 D 100.0.0.254 Vlanif20
100.0.0.254/32 Direct 0 0 D 127.0.0.1 Vlanif20
110.0.0.0/24 Direct 0 0 D 110.0.0.254 Vlanif30
110.0.0.254/32 Direct 0 0 D 127.0.0.1 Vlanif30
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