1.实验要求:
1、全网可达
2、拓扑中所需地址全部基于192.168.0.0/24划分所得
3、静态路由(不许使用其他动态)
4、R4有三个环回, 且环回需要汇总
2.实验拓扑:
3.分析:
地址
vlan2与vlan3为两个网段,为了方便静态路由的书写,可以将vlan2与vlan3的网段汇总,R4的环回也需要汇总,然后骨干链路一个网段,即划分4个网段,vlan与环回将进行汇总
192.168.0.0/24
192.168.0.0/26 骨干
192.168.0.4/30
…
192.168.0.60/30
192.168.0.64/26 环回
192.168.0.64/28
192.168.0.80/28
192.168.0.96/28
192.168.0.112/28
192.168.0.128/26 vlan2
192.168.0.192/26 vlan3
4.配置:
R1
[r1]dhcp enable
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.0.1 255.255.255.252
int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.0.14 255.255.255.252
int g0/0/2.1
[r1-GigabitEthernet0/0/2.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/2.1]ip address 192.168.0.129 255.255.255.192
[r1-GigabitEthernet0/0/2.1]arp broadcast enable
[r1-GigabitEthernet0/0/2.1]dhcp select global
[r1-GigabitEthernet0/0/2.1]int g 0/0/2.2
[r1-GigabitEthernet0/0/2.2]dot1q termination vid 3
[r1-GigabitEthernet0/0/2.2]ip address 192.168.0.193 255.255.255.192
[r1-GigabitEthernet0/0/2.2]arp broadcast enable
[r1-GigabitEthernet0/0/2.2]dhcp select global
[r1]ip pool vlan2
[r1-ip-pool-vlan2]gateway-list 192.168.0.129
[r1-ip-pool-vlan2]network 192.168.0.128 mask 255.255.255.192
[r1-ip-pool-vlan2]dns-list 114.114.114.114 8.8.8.8
[r1]ip pool vlan3
[r1-ip-pool-vlan3]gateway-list 192.168.0.193
[r1-ip-pool-vlan3]network 192.168.0.192 mask 255.255.255.192
[r1-ip-pool-vlan3]dns-list 114.114.114.114 8.8.8.8
[r1]ip route-static 0.0.0.0 0.0.0.0 192.168.0.2
[r1]ip route-static 192.168.0.8 255.255.255.252 192.168.0.13
[r1]ip route-static 192.168.0.64 255.255.255.192 192.168.0.13
(R2等类同)
5.结果:
互相ping通即可