按照要求进行配置
R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Mar 4 2023 23:21:30-08:00 R1 %%01IFNET/4/LINK_ STATE(1)[O]on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add
[R1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Mar 4 2023 23:21:42-08:00 R1 %%01IFNET/4/LINK_STATE(1)[1]on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]q
[R1]int lo
[R1]int LoopBack 0
[R1-LoopBack0]ip add
[R1-LoopBack0]ip address 192.168.1.33 28
[R1-LoopBack0]q
[R1]int lo
[R1]int LoopBack 1
[R1-LoopBack1]ip add
[R1-LoopBack1]ip address 192.168.1.49 28
R2
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[R1-GigabitEthernet0/0/0]
Mar 4 2023 23:21:30-08:00 R1 %%01IFNET/4/LINK_ STATE(1)[0]on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add
[R1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
Mar42023 23:21:42-08:00 R1 %%01IFNET/4/LINK STATE(1)[1]on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]q
[R1]int lo
[R1]int LoopBack 0
[R1-LoopBack0]ip add
[R1-LoopBack0]ip address 192.168.1.33 28[R1-LoopBack0]q
[R1]int lo
[R1]int LoopBack 1
[R1-LoopBack1]ip add
[R1-LoopBack1]ip add
[R1-LoopBack1]ip address 192.168.1.49 28
R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add
[R3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
Mar 4 2023 23:25:56-08:00 R3 %%01IFNET/4/LINK_STATE(1)[0]on the interface GigabitEthernet0/0/0 has entered the UP state
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip ad
[R3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
Mar 4 202323:26:36-08:00 R3 %%01IFNET/4/LINK_STATE(U)[1on the interface GigabitEthernet0/0/1 has entered the UP state
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add
[R3-GigabitEthernet0/0/2]ip address 192.168.1.97 27
Mar 4 2023 23:27:01-08:00 R3 %%01IFNET/4/LINK_STATE(1)[2]on the interface GigabitEthernet0/0/2 has entered the UP state
[R3-GigabitEtherneto/o/2]
R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip ad
[R4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
Mar 4 2023 23:28:04-08:00 R4 %%01IFNET/4/LINK_STATE(I)[0]on the interface GigabitEthernet0/0/0 has entered the UP stat
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add
[R4-GigabitEthernet0/0/1]ip address 192.168.1.1430
Mar 4 2023 23:28:27-08:00 R4 %%01IFNET/4/LINK_STATE(I)[1]on the interface GigabitEthernet0/0/1 has entered the UP stat
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add
[R4-GigabitEthernet0/0/2]ip address 192.168.1.21 30
[R4-GigabitEthernet0/0/2]
Mar 4 2023 23:29:30-08:00 R4 %%01IFNET/4/LINK_STATE(I)[0]on the interface GigabitEthernet0/0/2 has entered the UP stat
[R4-GigabitEthernet0/0/2]int g4/0/0
[R4-GigabitEthernet4/0/0]ip add
[R4-GigabitEthernet4/0/0]ip address 192.168.1.17 30
Mar 4 2023 23:29:46-08:00 R4 %%01IFNET/4/LINK_STATE(1)[0]on the interface GigabitEthernet4/0/0 has entered the UP stat
[R4-GigabitEthernet4/0/0]ip address 192.168.1.17 30
Mar 4 2023 23:29:46-08:00 R4 %%01IFNET/4/LINK_STATE(1)[1] on the interface GigabitEthernet4/0/0 has entered the UP stat
[R4-GigabitEthernet4/0/0]int lo
[R4-GigabitEthernet4/0/0]int lo
[R4-GigabitEthernet4/0/0]q
[R4]int lo
[R4]int LoopBack 0
[R4-LoopBack0]ip add
[R4-LoopBackO]ip address 192.168.1.12928
[R4-LoopBack0]int lo
[R4-LoopBackO]int lo 1
[R4-LoopBack1]ip add
[R4-LoopBack1]ip address 192.168.1.145 28
[R4-LoopBack1]
R5
[R5]int LoopBack 0[R5-LoopBack0]ip ad
[R5-LoopBack0]ip address 192.168.1.16127[R5-LoopBack0]q
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 192.168.1.18
[R5-GigabitEthernet0/0/1]ip add
[R5-GigabitEthernet0/0/1]ip address 192.168.1.1830
Mar 4 202323:32:51-08:00 R5 %%01IFNET/4/LINK_STAT(1)[0]on the interface GigabitEthernet0/0/1 has entered the UP stat
[R5-GigabitEthernet0/0/1]q
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add
[R5-GigabitEthernet0/0/0]ip address 192.168.1.22 30
Mar 4 2023 23:33:07-08:00 R5 %%01IFNET/4/LINK_STAT(1)[0]on the interface GigabitEthernet0/0/0 has entered the U
[R5-GigabitEthernet0/0/0]int g0/0/2
[R5-GigabitEthernet0/0/2]ip add
[R5-GigabitEthernet0/0/2]ip address 56.1.1.1 24
[R5-GigabitEthernet0/0/2]
Mar 4 202323:33:23-08:00 R5 %%01IFNET/4/LINK_STAT(1)[1]on the interface GigabitEthernet0/0/2 has entered the UP stat
[R5-GigabitEthernet0/0/2]
R6
[R6]int lo
[R6]int LoopBack 0
[R6-LoopBack0]ip add
[R6-LoopBack0]ip address 6.6.6.624
[R6-LoopBack0]q
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add
[R6-GigabitEthernet0/0/0]ip address 56.1.1.2 24
Mar 4 2023 23:34:24-08:00 R6 %%01IFNET/4/LINK_STAT(1)[0] on the interface GigabitEthernet0/0/0 has entered the UP stat
[R6-GigabitEthernet0/0/0]
在R3启用DHCP
[R3]dhcp enable
Info: The operation may take a few seconds.Please wait for
[R3]ip pool wuxuhui
Info: It's successful to create an IP address pool.
[R3-ip-pool-wuxuhui]network 192.168.1.96 mask 27
[R3-ip-pool-wuxuhui]gate
[R3-ip-pool-wuxuhui]gateway-list 192.168.1.97
[R3-ip-pool-wuxuhui]dns
[R3-ip-pool-wuxuhui]dns-list 8.8.8.8 144.144.144.144
[R3-ip-pool-wuxuhui]q
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]dhc
[R3-GigabitEthernet0/0/2]dhcp s
[R3-GigabitEthernet0/0/2]dhcp select g[R3-GigabitEthernet0/0/2]dhcp select global
[R3-GigabitEthernet0/0/2]
PC1
PC2
配置静态路由
R1
[R1]ip rou
[R1]ip route
[R1]ip route-static 192.168.1.64 27 192.168.1.2
[R1]ip rou
[R1]ip route
[R1]ip route-static 192.168.1.8 30 192.168.1.2
[R1]ip rou
[R1]ip route
[R1]ip route-static 192.168.1.9627 192.168.1.6
[R1]ip rou
[R1]ip route
[R1]ip route-static 192.168.1.12 30 192.168.1.6
[R1]ip rou
[R1]ip route
[R1]ip route-static 0.0.0.0 0 192.168.1.2
[R1]ip rou
[R1]ip route
[R1]ip route-static 0.0.0.0 0 192.168.1.6
R2
[R2]ip rou
[R2]ip route
[R2]ip route-static 192.168.1.32 27 192.168.1.1
[R2]ip rou
[R2]ip route
[R2]ip route-static 192.168.1.4 30 192.168.1.1
[R2]ip rou
[R2]ip route
[R2]ip route-static 192.168.1.96 27 192.168.1.1
[R2]ip rou
[R2]ip route
[R2]ip route-static 192.168.1.96 27 192.168.1.10
[R2]ip rou
[R2]ip route
[R2]ip route-static 0.0.0.0 0 192.168.1.10
R3
[R3]ip rou
[R3]ip route
[R3]ip route-static 192.168.1.32 27 192.168.1.5
[R3]ip rou
[R3]ip route
[R3]ip route-static 192.168.1.0 30 192.168.1.5
[R3]ip rou
[R3]ip route
[R3]ip route-static 192.168.1.64 27 192.168.1.5
[R3]ip rou
[R3]ip route
[R3]ip route-static 192.168.1.6427 192.168.1.14
[R3]ip rou
[R3]ip route
[R3]ip route-static 0.0.0.0 0 192.168.1.14
R4
[R4]ip rou
[R4]ip route
[R4]ip route-static 192.168.1.64 27 192.168.1.9
[R4]ip rou
[R4]ip route
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[R4]ip rou
[R4]ip route
[R4]ip route-static 192.168.1.4 30 192.168.1.13
[R4]ip rou
[R4]ip route
[R4]ip route-static 192.168.1.96 27 192.168.1.13
[R4]ip rou
[R4]ip route
[R4]ip route-static 192.168.1.32 27 192.168.1.13
[R4]ip rou
[R4]ip route
[R4]ip route-static 192.168.1.32 27 192.168.1.9
[R4]ip rou
[R4]ip route
[R4]ip route-static 0.0.0.0 0 192.168.1.18
[R4]ip rou
[R4]ip route
[R4]ip route-static 0.0.0.0 0 192.168.1.22 p
[R4]ip route-static 0.0.0.0 0 192.168.1.22 permanent
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
R5
[R5]ip route-static 192.168.1.96 27 192.168.1.17
[R5]ip rou
[R5]ip route
[R5]ip route-static 192.168.1.32 27 192.168.1.17
[R5]ip rou
[R5]ip route
[R5]ip route-static 192.168.1.64 27 192.168.1.17
[R5]ip rou
[R5]ip route
[R5]ip route-static 192.168.1.8 30 192.168.1.17
[R5]ip rou
[R5]ip route
[R5]ip route-static 192.168.1.12 30 192.168.1.17
[R5]ip rou
[R5]ip route
[R5]ip route-static 192.168.1.0 30 192.168.1.17
[R5]ip rou
[R5]ip route
[R5]ip route-static 192.168.1.4 30 192.168.1.17
[R5]ip rou
[R5]ip route
[R5]ip route-static 0.0.0.0 0 56.1.1.2
测试连通性
<R4>ping 192.168.1.33
PING 192.168.1.33: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.33: bytes=56 Sequence=1 ttl=254 time=47ms
Reply from 192.168.1.33: bytes=56 Sequence=2 ttl=254 time=31ms
Reply from 192.168.1.33: bytes=56 Sequence=3 ttl=254 time=31ms
Reply from 192.168.1.33: bytes=56 Sequence=4 ttl=254 time=31ms
Reply from 192.168.1.33: bytes=56 Sequence=5 ttl=254 time=31ms
--- 192.168.1.33 ping statistics ---
5 packet(s) transmitted
5 packet(s) received0.00% packet loss
und-trio min/ava/max = 30/48/90 ms
<R4>ping 192.168.1.49
PING 192.168.1.49: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.49: bytes=56 Sequence=1 ttl=254 time=47ms
Reply from 192.168.1.49: bytes=56 Sequence=2 ttl=254 time=47ms
Reply from 192.168.1.49: bytes=56 Sequence=3 ttl=254 time=31ms
Reply from 192.168.1.49: bytes=56 Sequence=4 ttl=254 time=31ms
Reply from 192.168.1.49: bytes=56 Sequence=5 ttl=254 time=31ms
--- 192.168.1.49 ping statistics ---
5 packet(s) transmitted
<R4>ping 192.168.1.65
PING 192.168.1.65:56 data bytes, press CTRL_C to break
Reply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=46ms
Reply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=46ms
Reply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=46ms
Reply from 192.168.1.65: bytes=56 Sequence=4 ttl=255 time=42ms
Reply from 192.168.1.65: bytes=56 Sequence=5 ttl=255 time=42ms
--- 192.168.1.65 ping statistics ---
5 packet(s) transmitted
远程登陆