要求:
分析以及配置:
首先对所有路由器以及接口设定合理的ip
[R1-LoopBack1]int loop 0
[R1-LoopBack0]ip add 192.168.0.1 30
[R1-LoopBack1]ip add 192.168.0.5 30
[R1-LoopBack1]int loop 2
[R1-LoopBack2]ip add 192.168.0.9 30
[R1-LoopBack2]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.0.17 28
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.0.65 28
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.0.18 28
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.0.33 28
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.0.49 28
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.0.66 28
[R3-GigabitEthernet0/0/1]int g0/0/2.1
[R3-GigabitEthernet0/0/2.1]ip add 192.168.0.113 28
[R3-GigabitEthernet0/0/2.1]int g0/0/2.2
[R3-GigabitEthernet0/0/2.2]ip add 192.168.0.129 28
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.0.34 28
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.0.50 28
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 192.168.0.97 28
[R4-GigabitEthernet0/0/2]int g4/0/0
[R4-GigabitEthernet4/0/0]ip add 192.168.0.81 28
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 192.168.0.98 28
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 100.1.1.1 24
[R5-GigabitEthernet0/0/1]int g0/0/2
[R5-GigabitEthernet0/0/2] ip add 192.168.0.82 28
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 100.1.1.2 24
然后在R3上面配置DHCP
[R3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]ip pool qiqi
Info: It's successful to create an IP address pool.
[R3-ip-pool-qiqi]net
[R3-ip-pool-qiqi]netbios-type
[R3-ip-pool-qiqi]network 192.168.0.112 ma
[R3-ip-pool-qiqi]network 192.168.0.112 mask 255.255.255.240
[R3-ip-pool-qiqi]dns
[R3-ip-pool-qiqi]dns-list 8.8.8.8
[R3-ip-pool-qiqi]gat
[R3-ip-pool-qiqi]gateway-list 192.168.0.113
[R3-ip-pool-qiqi]q
[R3]ip pool xiaoqi
Info: It's successful to create an IP address pool.
[R3-ip-pool-xiaoqi]netw
[R3-ip-pool-xiaoqi]network 192.168.0.128 mas
[R3-ip-pool-xiaoqi]network 192.168.0.128 mask 255.255.255.240
[R3-ip-pool-xiaoqi]gat
[R3-ip-pool-xiaoqi]gateway-list 192.168.0.129
[R3-ip-pool-xiaoqi]dns
[R3-ip-pool-xiaoqi]dns-list 8.8.8.8
[R3-ip-pool-xiaoqi]int g0/0/2.1
[R3-GigabitEthernet0/0/2.1]dhcp sele
[R3-GigabitEthernet0/0/2.1]dhcp select gl
[R3-GigabitEthernet0/0/2.1]dhcp select global
[R3-GigabitEthernet0/0/2.1]int g0/0/2.2
[R3-GigabitEthernet0/0/2.2]dhcp sele
[R3-GigabitEthernet0/0/2.2]dhcp select gl
[R3-GigabitEthernet0/0/2.2]dhcp select global
然后给sw分配vlan
[SW1]vlan batch 2 3
[SW1]interface e0/0/1
[SW1-Ethernet0/0/1]port link-type trunk
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]port link-type access
[SW1-Ethernet0/0/2]port default vlan 2
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]port link-type access
[SW1-Ethernet0/0/3]port default vlan 3
[SW2]vlan batch 2 3
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]port l
[SW2-Ethernet0/0/1]port link-type trunk
[SW2-Ethernet0/0/1]int e0/0/2
[SW2-Ethernet0/0/2]port l
[SW2-Ethernet0/0/2]port link-type access
[SW2-Ethernet0/0/2]int e0/0/2
[SW2-Ethernet0/0/2]port link-type access
[SW2-Ethernet0/0/2]port default vlan 3
[SW2-Ethernet0/0/2]int e0/0/2
[SW2-Ethernet0/0/2]port de
[SW2-Ethernet0/0/2]port default vlan 2
然后写全网静态路由 并添加缺省路由
[R1]ip route-static 192.168.0.32 28 192.168.0.18
[R1]ip route-static 192.168.0.80 28 192.168.0.18
[R1]ip route-static 192.168.0.48 28 192.168.0.66
[R1]ip route-static 192.168.0.96 28 192.168.0.66
[R1]ip route-static 192.168.0.112 28 192.168.0.66
[R1]ip route-static 192.168.0.128 28 192.168.0.66
[R1]ip route-static 0.0.0.0 0 192.168.0.66
[R2]ip route-static 192.168.0.64 28 192.168.0.17
[R2]ip route-static 192.168.0.0 28 192.168.0.17
[R2]ip route-static 192.168.0.80 28 192.168.0.34
[R2]ip route-static 192.168.0.48 28 192.168.0.34
[R2]ip route-static 192.168.0.96 28 192.168.0.34
[R2]ip route-static 192.168.0.112 28 192.168.0.17
[R2]ip route-static 192.168.0.128 28 192.168.0.17
[R2]ip route-static 0.0.0.0 0 192.168.0.34
[R3]ip route-static 192.168.0.0 28 192.168.0.65
[R3]ip route-static 192.168.0.80 28 192.168.0.50
[R3]ip route-static 192.168.0.96 28 192.168.0.50
[R3]ip route-static 192.168.0.16 28 192.168.0.65
[R3]ip route-static 192.168.0.32 28 192.168.0.50
[R3]ip route-static 0.0.0.0 0 192.168.0.50
[R4]ip route-static 192.168.0.0 28 192.168.0.49
[R4]ip route-static 192.168.0.64 28 192.168.0.49
[R4]ip route-static 192.168.0.112 28 192.168.0.49
[R4]ip route-static 192.168.0.128 28 192.168.0.49
[R4]ip route-static 192.168.0.16 28 192.168.0.33
[R4]ip route-static 0.0.0.0 0 192.168.0.98
[R4]ip route-static 0.0.0.0 0 192.168.0.82 preference 61