一、实验拓扑
二、实验划分
三、实验需求
如上图所见;
四、实验结果
1.实现内网通;
(1)配置R1~R5的接口IP(以及环回接口);
R1接口:
[R1]int GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[R1]int GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
R2接口:
[R2]int GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
R3接口:
[R3]int GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
R4接口:
[R4]int GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[R4-GigabitEthernet0/0/2]int g4/0/0
[R4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
R5接口:
[R5]int GigabitEthernet 0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ip address 12.0.0.5 24
[R5-GigabitEthernet0/0/1]int g0/0/2
[R5-GigabitEthernet0/0/2]ip address 192.168.1.22 30
R1环回:
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip ad 192.168.1.33 28
[Huawei]interface LoopBack 1
[Huawei-LoopBack1]ip ad 192.168.1.49 28
R2环回:
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip ad 192.168.1.65 28
[Huawei]interface LoopBack 1
[Huawei-LoopBack1]ip ad 192.168.1.81 28
R4环回:
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 192.168.1.129 28
[Huawei]interface LoopBack 1
[Huawei-LoopBack1]ip ad 192.168.1.145 28
R5环回:
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 192.168.1.161 27
2)使用DHCP为PC1和PC2分配IP地址
pc1和pc2改为dhcp动态:
R3上配置:
[Huawei]dhcp enable
[Huawei]ip pool jio
[Huawei-ip-pool-jio]network 192.168.1.96 mask 27
[Huawei-ip-pool-jio]gateway-list 192.168.1.97
[Huawei-ip-pool-jio]dns-list 114.114.114.114
[Huawei-ip-pool-jio]int g0/0/2
[Huawei-GigabitEthernet0/0/2]dhcp select global
(3)每个设备配置静态路由表
从R1到R5依次配置非直连网段的静态路由
R1:
2.为避免环路,R1-R3配置缺省路由
3.外网通,R5配置静态R6的路由
4.R5配置nat公私网转换
5.R1配置telnet服务器
6.R4上到下一跳为1.22的路由条目优先级改到大于60;R5上到下一跳为1.21的路由条目优先级改到大于60