一.分配IP
R1-R5的私有IP地址:192.168.1.0/27 子网划分为:
192.168.1.0/30
192.168.1.4/30
192.168.1.8/30
192.168.1.12/30
192.168.1.16/30
192.168.1.20/30
R1环回:192.168.1.32/27 192.168.1.64/27
R2环回:192.168.1.96/27 192.168.1.128/27
R4环回:192.168.1.160/27 192.168.1.192/27
二.配置IP和环回地址
第一步,配置R1
<RI>sys
Enter system view,return user view with Ctrl+2 .
[Rl]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip ad
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
Jan 10 2022 20:57:38-08:00 R1 O1IFNET/4/LINK STATE(1) [0]:The lineprotocol IPon the interface GigabitEthernet0/0/0 has entered the Up state.
[R1-GigabitEthernet0/0/0]ip ad
R1-GigabitEthernet0/0/0]ip address 192.168.1.5 30
[R1-GigabitEthernet0/0/0]1nt LoopBack 0
R1-LoopBack0]ip add
[R1-LoopBackolip address 192.168 .133 27
[R1-LoopBack0]int LoopBack 1
[R1-LoopBackllip address 192.168.1.65 27
[R1-LoopBackllint g 0/0/0
[R1-GigabitEthernet0/0/0]ip add
[R1-GigabitEthernet0/0/0ip address 192.168.1.1 30
[R1-GigabitEtherneto/0/0]int g 0/0/1
[R1-GigabitEthernet0/0/l]ip address 192.168.1.5 30
Jan 10 2022 21:02:14-08:00 R1 OLIFNET/4/LINK STATE(1)(1]:The line protocol Ipon the interface GigabitEthernet0/0/1 has entered the UP state
.第二步,配置R2
R2>sys
Enter system view,return user view with Ctrl+2 .
[R2]int g 0/0/0
R2-GigabitEthernet0/0/0lip address 192.168.1.9 30
Jan 10 2022 21:01:08-08:00 R2 O1IFNET/4/LINK STATE(1)[0]:The line protocol IEon the interface GigabitEthernet0/0/0 has entered the Up state.
R2-GigabitEthernet0/0/0]int add
[R2-GigabitEthernet0/0/0]int g 0/0/1
[R2-GigabitEthernet0/0/1lip add
[R2-GigabitEthernet0/0/llip address 192.168.1.2 30
Jan 10 2022 21:03:04-08:00 R2 %%OIENET/4/LINK STATE(1)[l:The line protocol IP on the interface GigabitEthernet0/0/l has entered the Up state
[R2-GigabitEthernet0/0/1]int LoopBack 0
[R2-LoopBack0]ip add
[R2-LoopBack0lip address 192.168.1.97 27
[R2-LoopBack0]int LoopBack 1
[R2-LoopBackllip address 192.168.1.129 27R2-LoopBack1]
please check whether system data has been changed, and save data in time
Confiquration console timeplease press any key to log on
.第三步,配置R3
R3>sys
return user view with Ctrl+z .Enter system view.
[R3]int g 0/0/1
[R3-GigabitEthernet0/0/1Jint add
[R3-GigabitEthernet0/0/1]ip add
[R3-GigabitEthernet0/0/1lip address 192.168.1.6 30
Jan 10 2022 22:58:49-08:00 R3 01IFNET/4/LINK STATE(1)[0]:The line protocol IPon the interface GigabitEthernet0/0/l has entered the Up state.
[R3-GigabitEthernet0/0/1]int g 0/0/0
[R3-Gigab1tEthernet0/0/0]ip add
[R3-GigabitEthernet0/0/0]ip address 192.168.1.13 30
Jan 10 2022 22:59:13-08:00 R3 OLIFNET/4/LINK STATE(1)[l]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the Up state.
[R3-GigabitEthernet0/0/0]int g 0/0/2
[R3-GigabitEthernet0/0/2]ip add
[R3-GigabitEthernet0/0/2]ip address 192.168.1.225 27
[R3-GigabitEthernet0/0/2]Jan 10 2022 22:59:57-08:00 R3 *01IFNET/4/LINK STATE(1)[2]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the up state.
[R3-GiqabitEthernet0/0/2]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
.第四步,配置R4
[R4]int g.0/0/0
[R4-GigabitEthernt0/0/0]ip add
[R4-GigabitEthernet0/0/0]ip address 192.168.1.14 30
Jan 10 2022 22:55:04-08:00 R4 OLIFNET/4/LINK STATE(1)[0]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the Up state.
[R4-GigabitEthernet0/0/0]1nt g 0/0/1
[R4-GigabitEthernet0/0/1]1p add
[R4-GigabitEthernet0/0/ljip address 192.168.1.10 30
Jan 10 2022 22:55:31-08:00 R4 O1IFNET/4/LINK STATE(1)[l]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the Up state.
[R4-GigabitEthernet0/0/1]int g 0/0/2
[R4-GigabitEthernet0/0/2]ip add
[R4-GigabitEthernet0/0/2]ip address 192.168.1.21 30
[R4-GigabitEtherneto/0/2]Jan 10 2022 22:55:59-08:00 R4 O1IFNET/4/LINK STATE()[2]:The line protocol IPon the interface GigabitEthernet0/0/2 has entered the Up state.
[R4-GigabitEthernet0/0/2]int g 4/0/0
[R4-GigabitEthernet4/0/0]ip add
[R4-GigabitEthernet4/0/0]ip address 192.168.1.17 30
[R4-GigabitEthernet4/0/0]Jan 10 2022 22:57:06-08:00 R4 O1IFNET/4/LINK STATE(1)(3]:The line protocol IPon the interface GigabitEthernet4/0/0 has entered the Up state
[R4-GigabitEthernet4/0/0]int LoopBack 0
[R4-LoopBackOlip add
[R4-LoopBackolip address 192.168.1.161 27
[R4-LoopBack0]int LoopBack 1
[R4-LoopBackllip address 192.168.1.193 27
.第五步,配置R5
R5>sys
return user view with Ctrl+Z.Inter system view,
[R5]int g 0/0/2
[R5-GigabitEthernet0/0/2]ip add
[R5-GigabitEthernet0/0/2]ip address 192.168.1.22 30
Jan 10 2022 23:00:35-08:00 R5 *O1IFNET/4/LINK STATE(1)[0]:The line protocol Ipn the interface GigabitEthernet0/0/2 has entered the Up state.
[R5-GigabitEthernet0/0/2]int g 4/0/0
[R5-GigabitEthernet4/0/0]ip add
[R5-GigabitEthernet4/0/0]ip address 192.168.1.18 30
Jan 10 2022 23:00:58-08:00 R5 O1IFNET/4/LINK STATE(1)[1]:The line protocol IPon the interface GigabitEthernet4/0/0 has entered the Up state.
[R5-GigabitEthernet4/0/0]int g 0/0/0
[R5-GigabitEthernet0/0/0]ip add
[R5-GigabitEthernet0/0/0]ipaddress 12.1.1.1 24
[R5-GigabitEthernet0/0/0]Jan 10 2022 23:01:35-08:00 R5 01IFNET/4/LINK STATE(1)[2]:The line protocol IPn the interface GigabitEthernet0/0/0 has entered the Up state.
[R5-Gigab1tEthernet0/0/0]int LoopBack 0
[R5-LoopBack0]ip addaddress 5.5.5.5 24
[R5-LoopBack0]1pR5-LoopBack0]
Please check whether system data has been changed,and save data in time
Configurationconsole time out, please press any key to log on
.第六步,配置R6
R6>sys
Enter system view, return user view with Ctrl+Z.
[R6]int g 0/0/0
[R6-GigabitEthernet0/0/0]ip add
[R6-GigabitEthernet0/0/0]ip address 12.1.1.2 24
Jan 10 2022 23:03:55-08:00 R6 O1IFNET/4/LINK STATE(1)[0]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the Up state.
[R6-GigabitEthernet0/0/0]int LoopBack 0
[R6-LoopBack0]ip add
[R6-LoopBack0]ip address 6.6.6.6 24
[R6-LoopBack0]
Please check whether system data has been changed, and save data in time
Configuration console time out,please pressany key to log on
.第七步,R3配置DHCP自动获取地址和静态路由
<R3>sys
[R3]dhcp enable
Info The operation may take a few seconds. Please wait for a moment.done.
[R3]dhcp enable
[R3]1p poo1 1
Info: It's successful to create an IP address pool.
[R3-ip-poo1-1]network 192.168.1.224 mask 27
[R3-ip-pool-l]gateway-list 192.168.1.225
[R3-ip-poo1-1]dns-list 8.8.8.8 8.8.4.4
[R3-ip-poo1-1lint g 0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
[R3-GigabitEthernet0/0/2]
Please check whether system data has been changed, and save data in time
Configuration console time out, please press any key to log on
R3>sys
Enter system view, return user view with Ctrl+Z.
[R3]ip route-st
[R3]ip route-static 0.0.0.0 0.0.0.0 192.168.1.14
[R3]ip route-static 192.168.1.8 30 192.168.1.14
[R3]ip route-static 192.168.1.0 30 192.168.1.5
[R3]ip route-static 192.168.1.32 27 192.168.1.5
[R3]ip route-static 192.168.1.64 27 192.168.1.5
[R3]ip route-static 192.168.1.96 27 192.168.1.5
[R3]ip route-static 192.168.1.128 27 192.168.1.5
.第八步,配置静态路由
R1:
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.1.6
[R1]ip route-static 192.168.1.92 27 192.168.1.2
[R1]ip route-static 192.168.1.128 27 192.168.1.2
[R1]ip route-static 192.168.1.160 27 192.168.1.2
[R1]ip route-static 192.168.1.192 27 192.168.1.2
[R1]ip route-static 192.168.1.8 30 192.168.1.2
[R1]ip route-static 192.168.1.12 30 192.168.1.6
[R1]ip route-static 192.168.1.224 27 192.168.1.6
[R1]ip route-static 192.168.1.32 27 NULL 0
[R1]ip route-static 192.168.1.64 27 NULL 0
R2:
[R2]ip route-static 192.168.1.96 27 NULL 0
[R2]ip route-static 192.168.1.128 27 NULL 0
[R2]ip route-static 0.0.0.0 0.0.0.0 192.168.1.10
[R2]ip route-static 192.168.1.12 30 192.168.1.10
[R2]ip route-static 192.168.1.4 30 192.168.1.1
[R2]ip route-static 192.168.1.224 30 192.168.1.1
[R2]ip route-static 192.168.1.20 30 192.168.1.10
[R2]ip route-static 192.168.1.16 30 192.168.1.10
[R2]ip route-static 192.168.1.32 27 192.168.1.1
[R2]ip route-static 192.168.1.64 27 192.168.1.1
R4:
[R4]ip route-static 192.168.1.192 27 NULL 0
[R4]ip route-static 192.168.1.24 30 NULL 0
[R4]ip route-static 192.168.1.28 30 NULL 0
[R4]ip route-static 192.168.1.96 27 192.168.1.9
[R4]ip route-static 192.168.1.128 27 192.168.1.9
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[R4]ip route-static 192.168.1.32 27 192.168.1.9
[R4]ip route-static 192.168.1.64 27 192.168.1.13
[R4]ip route-static 192.168.1.4 30 192.168.1.13
[R4]ip route-static 192.168.1.224 27 192.168.1.13
R5:
[R5]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
[R5]ip route-static 192.168.1.0 24 192.168.1.21
[R5]ip route-static 192.168.1.96 24 192.168.1.17 preference 61
.第九步,配置telnet和nat
R5:
[R5]acl 2000
[RS-ac1-bas1c-2000]
[RS-ac1-bas1c-2000]rule permit source 192.168.1.0 0.0.0.255
[RS-ac1-bas1c-2000]int g 0/0/0
[R5-GigabitEtherneto0/0/0]nat outbound 2000
[R5-GigabitEtherneto0/0/0]int g0/0/1
[R5-GigabitEtherneto0/0/0]nat ser protocol tcp global current-interface 23 inside 192.168.1.33 23
R1:
[R1]aaa
[R1-aaa]local-user root privilege level 3 password cipher root
[R1-aaa]local-user root service-type telnet
[R1-aaa]q
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa