一、完成问题一,为R1-R5配置IP地址:
[r1] int Serial 4/0/0
[r1-Serial4/0/0] ip address 15.0.0.1 24
[r1-Serial4/0/0] int g 0/0/0
[r1-GigabitEthernet0/0/0] ip address 192.168.1.1 24
[r2] int s 4/0/0
[r2-Serial4/0/0] ip address 25.0.0.1 24
[r2-Serial4/0/0] int g 0/0/0
[r2-GigabitEthernet0/0/0] ip address 192.168.2.1 24
[r3] int g 0/0/0
[r3-GigabitEthernet0/0/0] ip address 192.168.3.1 24
[r3-GigabitEthernet0/0/0] int s 4/0/0
[r3-Serial4/0/0] ip address 35.0.0.1 24
[r4] int g 0/0/0
[r4-GigabitEthernet0/0/0] ip address 45.0.0.1 24
[r4-GigabitEthernet0/0/0] int g 0/0/1
[r4-GigabitEthernet0/0/1] ip address 192.168.4.1 24
[isp] int s 3/0/0
[isp-Serial3/0/0] ip address 15.0.0.2 24
[isp-Serial3/0/0] int s 3/0/1
[isp-Serial3/0/1] ip address 25.0.0.2 24
[isp-Serial3/0/1] int s 4/0/0
[isp-Serial4/0/0] ip address 35.0.0.2 24
[isp-Serial4/0/0] int g 0/0/0
[isp-GigabitEthernet0/0/0] ip address 45.0.0.2 24
[isp-GigabitEthernet0/0/0] q
[isp] int l0
[isp-LoopBack0] ip address 5.5.5.5 24
二、 使所有的私网全网可达:
[r1] ip route-static 0.0.0.0 0 15.0.0.2
[r2] ip route-static 0.0.0.0 0 25.0.0.2
[r3] ip route-static 0.0.0.0 0 35.0.0.2
[r4] ip route-static 0.0.0.0 0 45.0.0.2
三、R1和R5之间使用ppp的PAP认证,R5为主认证方:
认证方:
[isp] aaa
[isp-aaa] local-user admin password cipher 123456 ---创建用户信息
[isp-aaa] local-user admin service-type ppp ---设置服务类型
[isp-aaa] q
[isp] interface Serial 3/0/0
[isp-Serial3/0/0] ppp authentication-mode pap ---配置认证方式
[r1] int Serial 4/0/0
[r1-Serial4/0/0] ppp pap local-user admin password cipher 123456 ---发送用户名和密码
[r1-Serial4/0/0] shutdown ----检验是否认证成功
[r1-Serial4/0/0] undo shutdown
四、 R2和R5之间使用ppp的chap认证,R5为主认证方:
[isp] int s 3/0/1
[isp-Serial3/0/1] ppp authentication-mode chap ---设置服务类型
[r2] interface Serial 4/0/0
[r2-Serial4/0/0] ppp chap user admin
[r2-Serial4/0/0] ppp chap password cipher 123456
[r2-Serial4/0/0] q
[r2] int s 4/0/0
[r2-Serial4/0/0] shutdown ---检验是否认证成功
[r2-Serial4/0/0] undo shutdown
五、 R3和R5之间使用HDLC封装:
[r3] int s 4/0/0
[r3-Serial4/0/0] link-protocol hdlc ---修改二层协议类型
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[isp] interface Serial 4/0/0
[isp-Serial4/0/0] link-protocol hdlc ---修改二层协议类型
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
六、R1/R2/R3构建一个MGRE环境,R1为中心站点:
中心的配置:
[r1] interface Tunnel 0/0/0 ---创建隧道接口
[r1-Tunnel0/0/0] ip address 192.168.5.1 24 ---接口配置IP地址
[r1-Tunnel0/0/0] tunnel-protocol gre p2mp ---定义封装方式
[r1-Tunnel0/0/0] source 15.0.0.1 ---定义封装内容
Jul 12 2022 15:45:07-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0] nhrp network-id 100 ---创建NHRP域
[r1-Tunnel0/0/0] nhrp entry multicast dynamic ---开启伪广播
分支的配置:
[r2] interface Tunnel 0/0/0 ---创建隧道接口
[r2-Tunnel0/0/0] ip address 192.168.5.2 24 ---接口配置IP地址
[r2-Tunnel0/0/0] tunnel-protocol gre p2mp ---定义封装方式
[r2-Tunnel0/0/0] source Serial 4/0/0 ---定义封装内容
Jul 12 2022 15:51:33-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r2-Tunnel0/0/0] nhrp network-id 100 ---加入到中心创建的nhrp中
[r2-Tunnel0/0/0] nhrp entry 192.168.5.1 15.0.0.1 register ---上报信息到中心
分支的配置:
[r3] interface Tunnel 0/0/0
[r3-Tunnel0/0/0] ip address 192.168.5.3 24
[r3-Tunnel0/0/0] tunnel-protocol gre p2mp
[r3-Tunnel0/0/0] source Serial 4/0/0
Jul 12 2022 15:55:06-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0] nhrp network-id 100
[r3-Tunnel0/0/0] nhrp entry 192.168.5.1 15.0.0.1 register
七、R1\R4间为点到点的GRE:
[r1] interface Tunnel 0/0/1 ---创建隧道接口
[r1-Tunnel0/0/1] ip address 192.168.6.1 24 ---接口配置IP地址
[r1-Tunnel0/0/1] tunnel-protocol gre ---定义封装方式
[r1-Tunnel0/0/1] source 15.0.0.1 ---定义封装内容
[r1-Tunnel0/0/1] destination 45.0.0.1
Jul 12 2022 15:58:34-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[r4] interface Tunnel 0/0/0
[r4-Tunnel0/0/0] ip address 192.168.6.2 24
[r4-Tunnel0/0/0] tunnel-protocol gre
[r4-Tunnel0/0/0] source 45.0.0.1
[r4-Tunnel0/0/0] destination 15.0.0.1
Jul 12 2022 16:00:54-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
八、整个私有网络基于RIP全网可达:
[r1] rip
[r1-rip-1] version 2
[r1-rip-1] network 192.168.1.0
[r1-rip-1] network 192.168.5.0
[r1-rip-1] network 192.168.6.0
[r2] rip
[r2-rip-1] version 2
[r2-rip-1] network 192.168.5.0
[r2-rip-1] network 192.168.2.0
[r3] rip
[r3-rip-1] version 2
[r3-rip-1] network 192.168.5.0
[r3-rip-1] network 192.168.3.0
[r4] rip
[r4-rip-1] version 2
[r4-rip-1] network 192.168.4.0
[r4-rip-1] network 192.168.6.0
[r1] interface Tunnel 0/0/0
[r1-Tunnel0/0/0] undo rip split-horizon ---关闭rip水平分割
九、所有PC设置私有IP为源IP,可以访问R5环回:
[r1] acl 2000
[r1-acl-basic-2000] rule permit source 192.168.0.0 0.0.255.255 ---使用acl列表抓取能量
[r1-acl-basic-2000] q
[r1] interface Serial 4/0/0
[r1-Serial4/0/0] nat outbound 2000
[r2] acl 2000
[r2-acl-basic-2000] rule permit source 192.168.0.0 0.0.255.255
[r2-acl-basic-2000] q
[r2] int Serial 4/0/0
[r2-Serial4/0/0] nat outbound 2000
[r3] acl 2000
[r3-acl-basic-2000] rule permit source 192.168.0.0 0.0.255.255
[r3-acl-basic-2000] q
[r3] int Serial 4/0/0
[r3-Serial4/0/0] nat outbound 2000
[r4] acl 2000
[r4-acl-basic-2000] rule permit source 192.168.0.0 0.0.255.255
[r4-acl-basic-2000] q
[r4] int GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0] nat outbound 2000