华为H3C配置单臂路由、静态默认浮动路由的配置方法

实验案例拓扑图
华为H3C配置单臂路由、静态默认浮动路由的配置方法_第1张图片

给交换机配置,配置trunk链路

[Huawei]interface GigabitEthernet 0/0/1

[Huawei-GigabitEthernet0/0/1]port link-type trunk

[Huawei-GigabitEthernet0/0/1]port
trunk allow-pass vlan all

创建vlan将接口加入到vlan

[Huawei]vlan
batch 10 20

[Huawei]interface Ethernet 0/0/1

[Huawei-Ethernet0/0/1]port
link-type access

[Huawei-Ethernet0/0/1]port default
vlan 10

[Huawei]interface Ethernet 0/0/2

[Huawei-Ethernet0/0/2]port
link-type access

[Huawei-Ethernet0/0/2]port default
vlan 20

配置单臂路由

[Huawei]interface GigabitEthernet 0/0/0.2

[Huawei-GigabitEthernet0/0/0.2]arp
broadcast enable

[Huawei-GigabitEthernet0/0/0.2]dot1q
termination vid 10

[Huawei-GigabitEthernet0/0/0.2]ip
address 192.168.10.10 24

[Huawei]interface GigabitEthernet 0/0/0.3

[Huawei-GigabitEthernet0/0/0.3]arp
broadcast enable

[Huawei-GigabitEthernet0/0/0.3]dot1q
termination vid 20

[Huawei-GigabitEthernet0/0/0.3]ip
address 192.168.20.20 24

客户端验证

华为H3C配置单臂路由、静态默认浮动路由的配置方法_第2张图片

配置静态默认浮动路由实现全网互通

实验拓扑图

华为H3C配置单臂路由、静态默认浮动路由的配置方法_第3张图片
AR3上配置两条静态AR2上配置一条默认
Huawei]ip route-static 192.168.10.0 24 GigabitEthernet 0/0/0 192.168.40.1
Huawei]ip route-static 192.168.20.0 24 GigabitEthernet 0/0/0 192.168.40.1
配置浮动路由
[Huawei]ip route-static 192.168.20.0 255.255.255.0 GigabitEthernet 0/0/2 192.168.60.1 preference 70
[Huawei]ip route-static 192.168.10.0 255.255.255.0 GigabitEthernet 0/0/1 192.168.40.1 preference 70
AR2回一条默认
Huawei]ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet 0/0/2 192.168.60.2
关闭接口验证浮动路由
[Huawei]interface GigabitEthernet 0/0/1
关闭接口 [Huawei-GigabitEthernet0/0/1]shutdown
华为H3C配置单臂路由、静态默认浮动路由的配置方法_第4张图片
查看路由表
display ip routing-table
查看端口状态
display ip interface brief

你可能感兴趣的:(Linux,单臂路由静态浮动默认的配置方法)