一.实验要求
二、实验步骤
1.建立新的拓扑
2.基于192.168.0.0/2划分所有IP
3. 然后在R3上配置DHCP
[r3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r3]ip pool 111
Info: It's successful to create an IP address pool.
[r3-ip-pool-111]network 192.168.0.112 mask 255.255.255.240
[r3-ip-pool-111]gateway-list 192.168.0.113
[r3-ip-pool-111]dns-list 8.8.8.8
[r3]ip pool 222
Info: It's successful to create an IP address pool.
[r3-ip-pool-222]network 192.168.0.128 mask 255.255.255.240
[r3-ip-pool-222]gateway-list 192.168.0.129
[r3-ip-pool-222]dns-list 8.8.8.8
[r3-ip-pool-222]q
[r3]int g 0/0/2.1
[r3-GigabitEthernet0/0/2.1]dhcp select global
[r3-GigabitEthernet0/0/2.1]int g 0/0/2.2
[r3-GigabitEthernet0/0/2.2]dhcp select global
4.配置静态路由
R1:
[r1]ip route-static 192.168.0.32 28 192.168.0.18
[r1]ip route-static 192.168.0.48 28 192.168.0.18
[r1]ip route-static 192.168.0.64 28 192.168.0.18
[r1]ip route-static 192.168.0.80 28 192.168.0.98
[r1]ip route-static 192.168.0.112 28 192.168.0.98
[r1]ip route-static 192.168.0.128 28 192.168.0.98
R2:
[r2]ip route-static 192.168.0.96 28 192.168.0.17
[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 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.64 28 192.168.0.34
R3:
[r3]ip route-static 192.168.0.16 28 192.168.0.97
[r3]ip route-static 192.168.0.32 28 192.168.0.97
[r3]ip route-static 192.168.0.48 28 192.168.0.82
[r3]ip route-static 192.168.0.64 28 192.168.0.82
R4:
[r4]ip route-static 192.168.0.96 28 192.168.0.81
[r4]ip route-static 192.168.0.112 28 192.168.0.81
[r4]ip route-static 192.168.0.128 28 192.168.0.81
R5:
[r5]ip route-static 192.168.0.16 28 192.168.0.49
[r5]ip route-static 192.168.0.32 28 192.168.0.49
[r5]ip route-static 192.168.0.96 28 192.168.0.49
[r5]ip route-static 192.168.0.80 28 192.168.0.49
[r5]ip route-static 192.168.0.112 28 192.168.0.49
[r5]ip route-static 192.168.0.128 28 192.168.0.49
5.配置缺省路由
R1:
[r1]ip route-static 0.0.0.0 0 192.168.0.18
[r1]ip route-static 0.0.0.0 0 192.168.0.98
R2:
[r2]ip route-static 0.0.0.0 0 192.168.0.34
R3:
[r3]ip route-static 0.0.0.0 0 192.168.0.82
R4:配置浮动静态路由
[r4]ip route-static 0.0.0.0 0 192.168.0.50 preference 80
[r4]ip route-static 0.0.0.0 0 192.168.0.66
R5:
[r5]ip route-static 0.0.0.0 0 100.1.1.2
6.配置nat
[r5]acl 2000
[r5-acl-basic-2000]rule 1 permit source any
[r5-acl-basic-2000]q
[r5]int g 0/0/2
[r5-GigabitEthernet0/0/2]nat outbound 2000
三、实验结果
dhcp:
全网可达: