实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事

动态路由配置

需求

pc7–>R8数据路径为PC7–R9–R8.若12.0.0.0/24网段出现故障时,pc7–>R8数据路径为PC7–R9–R10–R8.
实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第1张图片

  • R8配置
[Huawei]interface loo 0
[Huawei-LoopBack0]ip address 1.1.1.1 24
[Huawei-LoopBack0]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 12.0.0.1 24
[Huawei-GigabitEthernet0/0/0]undo shutdown
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 13.0.0.1 24	
[Huawei-GigabitEthernet0/0/1]undo shutdown
[Huawei]ip route-static 192.168.10.0 24 12.0.0.2
[Huawei]ip route-static 192.168.10.0 24 13.0.0.3 preference 70
  • R9配置
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 12.0.0.2 24
[Huawei-GigabitEthernet0/0/0]undo shutdown 
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 23.0.0.2 24
[Huawei-GigabitEthernet0/0/1]undo shutdown 
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip address 192.168.10.1 24
[Huawei-GigabitEthernet0/0/2]undo shutdown
[Huawei]ip route-static 1.1.1.1 24 12.0.0.1
[Huawei]ip route-static 1.1.1.1 24 23.0.0.3 preference 70
  • R10配置
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 13.0.0.3 24
[Huawei-GigabitEthernet0/0/0]undo shutdown 	
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 23.0.0.3 24
[Huawei-GigabitEthernet0/0/1]undo shutdown
[Huawei]ip route-static 1.1.1.1 24 13.0.0.1
[Huawei]ip route-static 192.168.10.0 24 23.0.0.2

实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第2张图片
实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第3张图片
现在断开12.0.0.0/24网段
进入R8
[Huawei-GigabitEthernet0/0/0]shutdown
在pc上测试,也能ping通。
在R8上查看路由表
实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第4张图片

默认路由配置

实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第5张图片

  • R1配置
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]ip address 192.168.10.1 24
[Huawei-Ethernet0/0/1]undo shutdown
[Huawei-Ethernet0/0/1]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.0.0.1 24
[Huawei]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第6张图片

  • R2配置
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.0.0.2 24
[Huawei-GigabitEthernet0/0/0]undo shutdown
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 11.0.0.1 24
[Huawei-GigabitEthernet0/0/1]undo shutdown
[Huawei]ip route-static 192.168.10.0 24 10.0.0.1
[Huawei]ip route-static 192.168.20.0 24 11.0.0.2

实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第7张图片

  • R3配置
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 11.0.0.2 24
[Huawei-GigabitEthernet0/0/1]undo shutdown
[Huawei-GigabitEthernet0/0/1]int e0/0/1
[Huawei-Ethernet0/0/1]ip address 192.168.20.1 24
[Huawei-Ethernet0/0/1]undo shutdown 
[Huawei]ip route-static 0.0.0.0 0.0.0.0 11.0.0.1

实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第8张图片
实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第9张图片
实操演示:路由表配置(静态,动态,默认)-------------------------实操干货 照着敲就完事_第10张图片
测试成功实验完成

你可能感兴趣的:(网络,华为,路由表,运维)