1.拓扑图
2.要求
3.分析
(1)配置路由
(2)给R7配置DHCP
(3)配置环回地址
(4)浮动静态路由
(5)全网可达,测试
4.配置
(1)接口配地址+下一跳配路由
[Huawei]sysname R1//改名
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.12.1 30//接口配IP
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.13.1 30
//下一跳
[R1]ip route-static 192.168.24.0 30 192.168.12.2
[R1]ip route-static 192.168.45.0 30 192.168.12.2
[R1]ip route-static 192.168.5.0 24 192.168.12.2
[R1]ip route-static 192.168.34.0 30 192.168.13.2
[R1]ip route-static 192.168.45.0 30 192.168.13.2
[R1]ip route-static 192.168.5.0 24 192.168.13.2
//R2,R3,R4,R5配置基本相同
(2)R5配DHCP
[R5]dhcp enable
[R5]ip pool huawei
[R5-ip-pool-huawei]network 192.168.5.0 mask 24
[R5-ip-pool-huawei]gateway-list 192.168.5.254
[R5-ip-pool-huawei]dns-list 114.114.114.114
[R5]interface g0/0/2
[R5-GigabitEthernet0/0/2]ip address 192.168.5.254 24
[R5-GigabitEthernet0/0/2]dhcp select global
分配成功显示
(3)环回
[R1]interface LoopBack 0
[R1-LoopBack0]ip address 1.1.1.1 24
[R1]interface LoopBack 1
[R1-LoopBack1]ip address 2.2.2.2 24
每个路由均配置两个环回
(4)浮动静态路由
[R1]ip route-static 192.168.54.0 30 192.168.12.2 preference 100
[R1]ip route-static 192.168.54.0 30 192.168.13.2 preference 100
其他路由基本配置相同
(5)全网可达