华为路由器浮动静态路由及负载均衡
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验目的:浮动静态路由、负载均衡
1、拓扑
2、配置地址
R1配置
interface GigabitEthernet0/0/0
ip address 200.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 200.1.3.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 192.168.1.254 255.255.255.0
查看接口地址配置
[AR1]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 0 The number of interface that is UP in Protocol is 4 The number of interface that is DOWN in Protocol is 0
Interface IP Address/Mask Physical
Protocol
GigabitEthernet0/0/0 200.1.1.1/24 up up GigabitEthernet0/0/1 200.1.3.1/24 up up GigabitEthernet0/0/2 192.168.1.254/24 up up NULL0 unassigned up up(s)
R2
#
interface GigabitEthernet0/0/1
ip address 200.1.2.2 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 200.1.1.2 255.255.255.0
R3
interface GigabitEthernet0/0/1
ip address 200.1.2.3 255.255.255.0
interface GigabitEthernet0/0/0
ip address 200.1.3.3 255.255.255.0
interface GigabitEthernet0/0/
ip address 192.168.2.254 255.255.255.0
3、配置路由
[AR1]ip route-static 192.168.2.0 24 200.1.3.3
[AR3]ip route-static 192.168.1.0 24 200.1.3.1
[AR2]ip route-static 192.168.1.0 24 200.1.1.1 去A
[AR2]ip route-static 192.168.2.0 24 200.1.2.3 去B
跟踪路由
4、配置浮动静态路由实现路由备份
[AR1]ip route-static 192.168.1.0 24 200.1.2.2 preference 100
[AR1]ip route-static 192.168.2.0 24 200.1.1.2 preference 100
查看路由表没有上面的路由条目,原因优先级高才写入路由表
192.168.2.0/24 Static 60 0 RD 200.1.3.3
[AR1]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 1 Routes : 2 Configured Routes : 2
Static routing table status :
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.2.0/24 Static 600 RD 200.1.3.3 GigabitEthernet0/0/1
Static routing table status :
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.2.0/24 Static 1000 R 200.1.1.2 GigabitEthernet0/0/0
5、手动制造故障
[AR1]interface g0/0/1
[AR1-GigabitEthernet0/0/1]shutdown
浮动路由写入路由表
192.168.2.0/24 Stati c 100 0 200.1.1.2
---------------------------------------------------------------------------------------------------------------------
二、通过负载均衡实现网络优化
创建等价路由:优先级、cost、目标地址、掩码相同
[AR3]ip route-static 192.168.1.0 24 200.1.2.2
[AR1]ip route-static 192.168.2.024 200.1.1.2
[AR1]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 1 Routes : 2 Configured Routes : 2
Static routing table status :
Destinations : 1 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.2.0/24 Static 60 0 RD 200.1.3.3 GigabitEthernet0/0/1 Static 600 RD 200.1.1.2 GigabitEthernet0/0/0
验证:在两条链路上抓包看有流量经过两条链路!