要求
1.全网可达
2.拓扑中所需地址全部基于192.168.0.0/24划分所得
3.静态路由(不许使用其他动态路由)
4.R8环回需要汇总
地址划分
192.168.0.0/24
——————————————————
由图可知本实验需要9个网段,所以子网掩码定为28
192.168.0.0/28
192.168.0.16/28
192.168.0.32/28
192.168.0.48/28
192.168.0.64/28
192.168.0.80/28
192.168.0.96/28
192.168.0.112/28
192.168.0.128/28
R8的三个环回,使用192.168.0.0/28 划分
192.168.0.0/30
192.168.0.4/30
192.168.0.8/30
R7和R8之间的网段为:192.168.0.16/28
R7和R9之间的网段为:192.168.0.32/28
R9和R11之间的网段为:192.168.0.48/28
R9和R11之间的网段为:192.168.0.64/28
R9和R10之间的网段为:192.168.0.80/28
R8和R10之间的网段为:192.168.0.96/28
vlan2 192.168.0.112/28
vlan3 192.168.0.128/28
R7
<Huawei>sys
[Huawei]sys R7
[R7]int g 0/0/0
[R7-GigabitEthernet0/0/0]ip address 192.168.0.18 28
[R7-GigabitEthernet0/0/0]int g 0/0/1
[R7-GigabitEthernet0/0/1]ip add 192.168.0.33 28
静态路由
ip route-static 192.168.0.96 255.255.255.240 192.168.0.17
ip route-static 192.168.0.48 255.255.255.240 192.168.0.34
ip route-static 192.168.0.64 255.255.255.240 192.168.0.34
ip route-static 192.168.0.80 255.255.255.240 192.168.0.34
ip route-static 192.168.0.112 255.255.255.240 192.168.0.34
ip route-static 192.168.0.128 255.255.255.240 192.168.0.34
汇总
ip route-static 192.168.0.0 28 192.168.0.17
R8
<Huawei>sys
[Huawei]sys R8
[R8]int l 0
[R8-LoopBack0]ip address 192.168.0.1 30
[R8-LoopBack0]q
[R8]int l 1
[R8-LoopBack1]ip address 192.168.0.5 30
[R8-LoopBack1]q
[R8]int l 2
[R8-LoopBack2]ip address 192.168.0.9 30
[R8-LoopBack2]q
[R8]int g 0/0/0
[R8-GigabitEthernet0/0/0]ip address 192.168.0.17 28
[R8-GigabitEthernet0/0/0]int g 0/0/1
[R8-GigabitEthernet0/0/1]ip address 192.168.0.98 28
静态路由
ip route-static 192.168.0.32 255.255.255.240 192.168.0.18
ip route-static 192.168.0.48 255.255.255.240 192.168.0.18
ip route-static 192.168.0.64 255.255.255.240 192.168.0.18
ip route-static 192.168.0.80 255.255.255.240 192.168.0.97
ip route-static 192.168.0.112 255.255.255.240 192.168.0.97
ip route-static 192.168.0.128 255.255.255.240 192.168.0.97
R9
<Huawei>sys
[Huawei]sys R9
[R9]int g 0/0/0
[R9-GigabitEthernet0/0/0]ip add 192.168.0.34 28
[R9-GigabitEthernet0/0/0]int g 0/0/3
[R9-GigabitEthernet0/0/3]ip add 192.168.0.49 28
[R9-GigabitEthernet0/0/3]int g 0/0/2
[R9-GigabitEthernet0/0/2]ip add 192.168.0.66 28
[R9-GigabitEthernet0/0/2]int g 0/0/1
[R9-GigabitEthernet0/0/1]ip add 192.168.0.81 28
静态路由
ip route-static 192.168.0.96 255.255.255.240 192.168.0.82
ip route-static 192.168.0.16 255.255.255.240 192.168.0.33
ip route-static 192.168.0.112 255.255.255.240 192.168.0.82
ip route-static 192.168.0.128 255.255.255.240 192.168.0.82
汇总
ip route-static 192.168.0.0 28 192.168.0.33
ip route-static 192.168.0.0 28 192.168.0.82
R10
接口
<Huawei>sys
[Huawei]sys R10
[R10]int g 0/0/0
[R10-GigabitEthernet0/0/0]ip add 192.168.0.82 28
[R10-GigabitEthernet0/0/0]int g0/0/1
[R10-GigabitEthernet0/0/1]ip add 192.168.0.97 28
VLAN
[R10]int g 0/0/2.1
[R10-GigabitEthernet0/0/2.1]dot1q termination vid 2
[R10-GigabitEthernet0/0/2.1]ip add 192.168.0.113 28
[R10-GigabitEthernet0/0/2.1]arp broadcast enable
[R10-GigabitEthernet0/0/2.1]int g0/0/2.2
[R10-GigabitEthernet0/0/2.2]dot1q termination vid 3
[R10-GigabitEthernet0/0/2.2]ip add 192.168.0.129 28
[R10-GigabitEthernet0/0/2.2]arp broadcast enable
DHCP
[R10]dhcp enable
[R10]int g0/0/2.1
[R10-GigabitEthernet0/0/2.1]dhcp select global
[R10-GigabitEthernet0/0/2.1]int g0/0/2.2
[R10-GigabitEthernet0/0/2.2]dhcp select global
静态路由
ip route-static 192.168.0.32 255.255.255.240 192.168.0.98
ip route-static 192.168.0.16 255.255.255.240 192.168.0.98
ip route-static 192.168.0.48 255.255.255.240 192.168.0.81
ip route-static 192.168.0.64 255.255.255.240 192.168.0.81
汇总
ip route-static 192.168.0.0 28 192.168.0.98
R11
<Huawei>sys
[Huawei]sys R11
[R11]int g 0/0/0
[R11-GigabitEthernet0/0/0]ip add 192.168.0.50 28
[R11-GigabitEthernet0/0/0]int g0/0/1
[R11-GigabitEthernet0/0/1]ip add 192.168.0.65 28
静态路由
ip route-static 192.168.0.96 255.255.255.240 192.168.0.49
ip route-static 192.168.0.16 255.255.255.240 192.168.0.49
ip route-static 192.168.0.32 255.255.255.240 192.168.0.49
ip route-static 192.168.0.80 255.255.255.240 192.168.0.49
ip route-static 192.168.0.112 255.255.255.240 192.168.0.49
ip route-static 192.168.0.128 255.255.255.240 192.168.0.49
汇总
ip route-static 192.168.0.0 28 192.168.0.82
ISP
<Huawei>sys
[Huawei]sys ISP
[ISP]int g 0/0/0
[ISP-GigabitEthernet0/0/0]ip add 100.1.1.2 24
SW1
[SW4]vlan batch 2 3
[SW4]int E0/0/4
[SW4-Ethernet0/0/4]port link-type trunk
[SW4-Ethernet0/0/4]port trunk allow-pass vlan all
[SW4-Ethernet0/0/4]int e0/0/3
[SW4-Ethernet0/0/3]port link-type trunk
[SW4-Ethernet0/0/3]port trunk allow-pass vlan all
[SW4-Ethernet0/0/3]int g0/0/1
[SW4-GigabitEthernet0/0/1]port link-type access
[SW4-GigabitEthernet0/0/1]port default vlan 2
[SW4-GigabitEthernet0/0/1]int g0/0/2
[SW4-GigabitEthernet0/0/1]port link-type access
[SW4-GigabitEthernet0/0/1]port default vlan 3
SW2
[SW5]vlan batch 2 3
[SW5]int E0/0/3
[SW5-Ethernet0/0/4]port link-type trunk
[SW5-Ethernet0/0/4]port trunk allow-pass vlan all
[SW5-Ethernet0/0/4]int e0/0/2
[SW5-Ethernet0/0/3]port link-type trunk
[SW5-Ethernet0/0/3]port trunk allow-pass vlan all
[SW5-Ethernet0/0/3]int g0/0/1
[SW5-GigabitEthernet0/0/1]port link-type access
[SW5-GigabitEthernet0/0/1]port default vlan 2
[SW5-GigabitEthernet0/0/1]int g0/0/2
[SW5-GigabitEthernet0/0/1]port link-type access
[SW5-GigabitEthernet0/0/1]port default vlan 3