目标
分析
1.划分子网,使其能满足图中所需
2.配置环回接口
3.为路由器的每个接口配置一个IP
4.在路由器AR7上配置一个DHCP服务器
5.配置路由表,使全网可达(路由汇总)
配置
子网划分
由图可知全网需17个网段
192.168.1.00000000 24
192.168.1.00000 000 192.168.1.0 29
192.168.1.00001 000 192.168.1.8 29
192.168.1.16
192.168.1.24
192.168.1.32
192.168.1.40
192.168.1.48
192.168.1.56
192.168.1.64
192.168.1.72
192.168.1.80
192.168.1.88
192.168.1.96
192.168.1.104
192.168.1.112
192.168.1.120
192.168.1.128
192.168.1.136
192.168.1.144
192.168.1.152
192.168.1.160
192.168.1.168
192.168.1.176
192.168.1.184
配置路由器基本参数
[AR3]int g0/0/0
[AR3-GigabitEthernet0/0/0]ip address 192.168.1.97 29
[AR3-GigabitEthernet0/0/0]int g0/0/1
[AR3-GigabitEthernet0/0/1]ip address 192.168.1.17 29
[AR3-GigabitEthernet0/0/1]int l 1
[AR3-LoopBack1]ip address 192.168.1.9 29
[AR3-LoopBack1]int l 2
[AR3-LoopBack2]ip address 192.168.1.1 29
[AR4]int g0/0/0
[AR4-GigabitEthernet0/0/0]ip address 192.168.1.98 29
[AR4-GigabitEthernet0/0/0]int g0/0/1
[AR4-GigabitEthernet0/0/1]ip address 192.168.1.73 29
[AR4-GigabitEthernet0/0/1]int l 1
[AR4-LoopBack1]ip add 192.168.1.89 29
[AR4-LoopBack1]int l 2
[AR4-LoopBack2]ip address 192.168.1.81 29
<AR5>dis ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.18/29 up up
GigabitEthernet0/0/1 192.168.1.49/29 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack1 192.168.1.25/29 up up(s)
LoopBack2 192.168.1.33/29 up up(s)
NULL0 unassigned up up(s)
[AR6]int g0/0/1
[AR6-GigabitEthernet0/0/1]ip address 192.168.1.74 29
[AR6-GigabitEthernet0/0/1]int g0/0/2
[AR6-GigabitEthernet0/0/2]ip address 192.168.1.50 29
[AR6-GigabitEthernet0/0/2]int g0/0/0
[AR6-GigabitEthernet0/0/0]ip address 192.168.1.137 29
[AR6-GigabitEthernet0/0/0]int g4/0/0
[AR6-GigabitEthernet4/0/0]ip address 192.168.1.129 29
[AR6-GigabitEthernet4/0/0]int l 1
[AR6-LoopBack1]ip address 192.168.1.65 29
[AR6-LoopBack1]int l 2
[AR6-LoopBack2]ip address 192.168.1.57 29
[AR7]int g0/0/2
[AR7-GigabitEthernet0/0/2]ip address 192.168.1.130 29
[AR7-GigabitEthernet0/0/2]int g0/0/1
[AR7-GigabitEthernet0/0/1]ip address 192.168.1.138 29
[AR7-GigabitEthernet0/0/1]int g0/0/0
[AR7-GigabitEthernet0/0/0]ip address 192.168.1.161 29
[AR7-GigabitEthernet0/0/0]int l 1
[AR7-LoopBack1]ip address 192.168.1.145 29
[AR7-LoopBack1]int l 2
[AR7-LoopBack2]ip address 192.168.1.153 29
配置DHCP服务
[AR7]dhcp enable
[AR7]ip pool 1
[AR7-ip-pool-1]network 192.168.1.160 mask 255.255.255.248
[AR7-ip-pool-1]dns-list 8.8.8.8
[AR7-ip-pool-1]gateway-list 192.168.1.161
[AR7-ip-pool-1]q
[AR7]int g0/0/0
[AR7-GigabitEthernet0/0/0]dhcp select global
配置路由表
<AR3>dis ip routing-table p s
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 2 Routes : 4 Configured Routes : 4
Static routing table status : <Active>
Destinations : 2 Routes : 4
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/25 Static 60 0 RD 192.168.1.18 GigabitEthernet
0/0/1
Static 60 0 RD 192.168.1.98 GigabitEthernet
0/0/0
192.168.1.128/25 Static 60 0 RD 192.168.1.98 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.18 GigabitEthernet
0/0/1
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
<AR4>dis ip r p s
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 10 Routes : 12 Configured Routes : 12
Static routing table status : <Active>
Destinations : 10 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/25 Static 60 0 D 0.0.0.0 NULL0
192.168.1.0/28 Static 60 0 RD 192.168.1.97 GigabitEthernet
0/0/0
192.168.1.16/29 Static 60 0 RD 192.168.1.97 GigabitEthernet
0/0/0
192.168.1.24/29 Static 60 0 RD 192.168.1.97 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.74 GigabitEthernet
0/0/1
192.168.1.32/29 Static 60 0 RD 192.168.1.97 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.74 GigabitEthernet
0/0/1
192.168.1.48/29 Static 60 0 RD 192.168.1.74 GigabitEthernet
0/0/1
192.168.1.56/29 Static 60 0 RD 192.168.1.74 GigabitEthernet
0/0/1
192.168.1.64/26 Static 60 0 D 0.0.0.0 NULL0
192.168.1.64/29 Static 60 0 RD 192.168.1.74 GigabitEthernet
0/0/1
192.168.1.128/25 Static 60 0 RD 192.168.1.74 GigabitEthernet
0/0/1
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
<AR5>display ip r p s
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 10 Routes : 12 Configured Routes : 12
Static routing table status : <Active>
Destinations : 10 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/25 Static 60 0 D 0.0.0.0 NULL0
192.168.1.0/26 Static 60 0 D 0.0.0.0 NULL0
192.168.1.0/28 Static 60 0 RD 192.168.1.17 GigabitEthernet
0/0/0
192.168.1.56/29 Static 60 0 RD 192.168.1.50 GigabitEthernet
0/0/1
192.168.1.64/29 Static 60 0 RD 192.168.1.50 GigabitEthernet
0/0/1
192.168.1.72/29 Static 60 0 RD 192.168.1.50 GigabitEthernet
0/0/1
192.168.1.80/29 Static 60 0 RD 192.168.1.17 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.50 GigabitEthernet
0/0/1
192.168.1.88/29 Static 60 0 RD 192.168.1.17 GigabitEthernet
0/0/0
Static 60 0 RD 192.168.1.50 GigabitEthernet
0/0/1
192.168.1.96/29 Static 60 0 RD 192.168.1.17 GigabitEthernet
0/0/0
192.168.1.128/25 Static 60 0 RD 192.168.1.50 GigabitEthernet
0/0/1
Static routing table status : <Inactive>
Destinations : 0 Routes : 0
<AR6>dis ip r p s
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 5 Routes : 7 Configured Routes : 7
Static routing table status : <Active>
Destinations : 5 Routes : 6
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/24 Static 60 0 D 0.0.0.0 NULL0
192.168.1.0/26 Static 60 0 RD 192.168.1.49 GigabitEthernet
0/0/2
192.168.1.0/28 Static 60 0 RD 192.168.1.73 GigabitEthernet
0/0/1
Static 60 0 RD 192.168.1.49 GigabitEthernet
0/0/2
192.168.1.64/26 Static 60 0 RD 192.168.1.73 GigabitEthernet
0/0/1
192.168.1.128/25 Static 60 0 RD 192.168.1.130 GigabitEthernet
4/0/0
Static routing table status : <Inactive>
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.128/25 Static 100 0 R 192.168.1.138 GigabitEthernet
0/0/0
<AR7>dis ip r p s
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 2 Routes : 3 Configured Routes : 3
Static routing table status : <Active>
Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/25 Static 60 0 RD 192.168.1.129 GigabitEthernet
0/0/2
192.168.1.128/25 Static 60 0 D 0.0.0.0 NULL0
Static routing table status : <Inactive>
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
192.168.1.0/25 Static 100 0 R 192.168.1.137 GigabitEthernet
0/0/1
全网可达
<AR7>ping 192.168.1.1
PING 192.168.1.1: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=253 time=60 ms
Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=253 time=30 ms
Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=253 time=20 ms
Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=253 time=50 ms
--- 192.168.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/38/60 ms
<AR6>ping 192.168.1.161
PING 192.168.1.161: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.161: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 192.168.1.161: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 192.168.1.161: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 192.168.1.161: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.1.161: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 192.168.1.161 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/26/50 ms
<AR6>ping 192.168.1.74
PING 192.168.1.74: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.74: bytes=56 Sequence=1 ttl=255 time=10 ms
Reply from 192.168.1.74: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 192.168.1.74: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 192.168.1.74: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 192.168.1.74: bytes=56 Sequence=5 ttl=255 time=1 ms
--- 192.168.1.74 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/2/10 ms