华为路由路径优先设置
配置命令:
AR1:
SYS
int GigabitEthernet 0/0/1
ip address 172.16.3.1 24
q
int GigabitEthernet 0/0/2
ip address 172.16.2.1 24
q
int GigabitEthernet 0/0/0
ip address 172.16.1.2 24
q
ip route-static 172.16.4.0 255.255.255.0 172.16.2.2
ip route-static 172.16.4.0 255.255.255.0 172.16.3.2 preference 60
Q
AR2:
sys
int GigabitEthernet 0/0/0
ip address 172.16.3.2 24
q
int GigabitEthernet 0/0/1
ip address 172.16.2.2 24
q
int GigabitEthernet 0/0/2
ip address 172.16.4.2 24
q
ip route-static 172.16.1.0 24 172.16.3.1
ip route-static 172.16.1.0 24 172.16.2.1 preference 60
注意:
1.在配置静态路由时,要按照所要要求进行,以及优先级的设定
2.在给主机设定ip地址的时候,要设定网关以外的同网段的ip地址