题目
一.首先给各个网段划分IP
二.在ISP上给每个接口都配上IP
[ISP]display ip interface brief *down: administratively down ^down: standby (l): loopback (s): spoofing The number of interface that is UP in Physical is 6 The number of interface that is DOWN in Physical is 3 The number of interface that is UP in Protocol is 6 The number of interface that is DOWN in Protocol is 3 Interface IP Address/Mask Physical Protocol GigabitEthernet0/0/0 3.3.3.2/24 up up GigabitEthernet0/0/1 unassigned down down GigabitEthernet0/0/2 unassigned down down LoopBack0 5.5.5.1/24 up up(s) NULL0 unassigned up up(s) Serial3/0/0 2.2.2.2/24 up up Serial3/0/1 unassigned down down Serial4/0/0 1.1.1.2/24 up up Serial4/0/1 4.4.4.2/24 up up
1.R1和R5之间使用ppp的pap认证,R5为主认证方
[R1]aaa [R1-aaa]local-user admin password cipher 123456 [R1-aaa]local-user admin service-type ppp [R1-aaa]q [R1]interface Serial 4/0/0 [R1-Serial4/0/0]ppp authentication-mode pap [ISP]int s4/0/0 [ISP-Serial4/0/0]ppp pap local-user admin password cipher 123456 ###PPP会话是一次性会话,会话一旦建立,再配置认证将不生效,再下次会话建立时 才生效,所以下方重启接口了 [ISP-Serial4/0/0]shutdown [ISP-Serial4/0/0]undo shutdown [ISP-Serial4/0/0]display this [V200R003C00] # interface Serial4/0/0 link-protocol ppp ppp pap local-user admin password cipher %$%$::i-%`5&4%z^qW-Se5^4,+\*%$%$ ip address 1.1.1.2 255.255.255.0 # return
2.R4和R5之间使用ppp的chap认证,R5为主认证方
[R4-Serial4/0/0]ppp chap user admin [R4-Serial4/0/0]ppp chap password cipher 123456 [ISP]int s4/0/1 [ISP-Serial4/0/1]ppp authentication-mode chap [ISP-Serial4/0/1]shutdown [ISP-Serial4/0/1]undo shutdown [R4-Serial4/0/0]display this [V200R003C00] # interface Serial4/0/0 link-protocol ppp ppp chap user admin ppp chap password cipher %$%$Pu^NH.P<BV]0NmQLHzKS,+e~%$%$ ip address 4.4.4.1 255.255.255.0 # return
3.R2和R5使用HDLC封装
[R2]int s4/0/0 [R2-Serial4/0/0]link-protocol hdlc Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N] :y Sep 17 2022 19:10:50-08:00 R2 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed the configuration that will change the encapsulation protocol of the link and th en selected Y. [ISP-Serial3/0/0]link-protocol hdlc Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N] :y Sep 17 2022 19:12:22-08:00 ISP %%01IFNET/4/CHANGE_ENCAP(l)[8]:The user performed the configuration that will change the encapsulation protocol of the link and t hen selected Y. [ISP-Serial3/0/0]display this [V200R003C00] # interface Serial3/0/0 link-protocol hdlc ip address 2.2.2.2 255.255.255.0 # return
三.R1、R3之间为点到点的GRE
[R1]interface Tunnel 0/0/0 [R1-Tunnel0/0/0]ip add 192.168.5.1 24 [R1-Tunnel0/0/0]tunnel-protocol gre [R1-Tunnel0/0/0]source 1.1.1.1 [R1-Tunnel0/0/0]destination 3.3.3.1 Sep 17 2022 19:21:40-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state. [R3]interface Tunnel 0/0/0 [R3-Tunnel0/0/0]ip add 192.168.5.2 24 [R3-Tunnel0/0/0]tunnel-protocol gre [R3-Tunnel0/0/0]source 3.3.3.1 [R3-Tunnel0/0/0]destination 1.1.1.1
R1/R2/R4构建一个MGRE环境,R1为中心站点
[R1]int Tunnel 0/0/1 [R1-Tunnel0/0/1]ip add 192.168.6.1 24 [R1-Tunnel0/0/1]tunnel-protocol gre p2mp [R1-Tunnel0/0/1]source 1.1.1.1 Sep 17 2022 19:39:34-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state. [R1-Tunnel0/0/1]nhrp network-id 100 [R4]int Tunnel 0/0/1 [R4-Tunnel0/0/1]ip add 192.168.6.3 24 [R4-Tunnel0/0/1]tunnel-protocol gre p2mp [R4-Tunnel0/0/1]source Serial 4/0/0 [R4-Tunnel0/0/1]nhrp network-id 100 [R4-Tunnel0/0/1]nhrp entry 192.168.6.1 1.1.1.1 register [R2]int Tunnel 0/0/1 [R2-Tunnel0/0/1]ip add 192.168.6.2 24 [R2-Tunnel0/0/1]tunnel-protocol gre p2mp [R2-Tunnel0/0/1]source Serial 4/0/0 [R2-Tunnel0/0/1]nhrp network-id 100 [R2-Tunnel0/0/1]nhrp entry 192.168.6.1 1.1.1.1 register