实验报告
- 题目
- 实验思路
- 配置IP地址,配置静态
- R1R5和R2R5之间分别PPP认证,R3R5之间HDLC封装
- R1R2R3构建MGRE隧道,R1R4点到点GRE
- 全网可达
- 所有PC设置私有IP为源IP
- 实验步骤
- 配置IP地址,配置静态
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[R1]int Serial 4
[R1-Serial4/0/0]ip add 15.1.1.1 24
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.254 24
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ip add 25.1.1.2 24
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.3.254 24
[R3]int s4/0/0
[R3-Serial4/0/0]ip add 35.1.1.3 24
[R4]INT G0/0/0
[R4-GigabitEthernet0/0/0]IP ADD 45.1.1.4 24
[R4]INT G0/0/1
[R4-GigabitEthernet0/0/1]IP ADD 192.168.4.254 24
[R5]INT S4/0/1
[R5-Serial4/0/1]IP ADD 15.1.1.5 24
[R5-Serial4/0/1]INT S3/0/1
[R5-Serial3/0/1]IP ADD 25.1.1.5 24
[R5-Serial4/0/0]IP ADD 35.1.1.5 24
[R5]INT G0/0/0
[R5-GigabitEthernet0/0/0]IP ADD 45.1.1.5 24
[R5]int l0
[R5-LoopBack0]ip add 5.5.5.5 24
[R1]ip route-static 0.0.0.0 0 15.1.1.5
[R2]ip route-static 0.0.0.0 0 25.1.1.5
[R3]ip route-static 0.0.0.0 0 35.1.1.5
[R4]ip route-static 0.0.0.0 0 45.1.1.5
- PPP
R1-R5
[R5]aaa
[R5-aaa]lo
[R5-aaa]local-user wangdaye pass
[R5-aaa]local-user wangdaye password ci
[R5-aaa]local-user wangdaye password cipher wdy12345
[R5]int s4/0/1
[R5-Serial4/0/1]
[R5-Serial4/0/1]ppp au
[R5-Serial4/0/1]ppp authentication-mode ?
chap Enable CHAP authentication
pap Enable PAP authentication
[R5-Serial4/0/1]ppp authentication-mode pap
[R1]int s4/0/0
[R1-Serial4/0/0]ppp pap local-user wangdaye password cipher wdy12345
[R1-Serial4/0/0]shutdown
Mar 29 2024 18:43:07-08:00 R1 %%01PPP/4/PHYSICALDOWN(l)[0]:On the interface Seri
al4/0/0, PPP link was closed because the status of the physical layer was Down.
[R1-Serial4/0/0]
[R1-Serial4/0/0]
Mar 29 2024 18:43:07-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PPP
on the interface Serial4/0/0 has entered the DOWN state.
[R1-Serial4/0/0]
Mar 29 2024 18:43:07-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the DOWN state.
[R1-Serial4/0/0]
Mar 29 2024 18:43:07-08:00 R1 %%01IFPDT/4/IF_STATE(l)[3]:Interface Serial4/0/0 h
as turned into DOWN state.
[R1-Serial4/0/0]
Mar 29 2024 18:43:07-08:00 R1 %%01RM/4/IPV4_DEFT_RT_CHG(l)[4]:IPV4 default Route
is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=Unknown,
Nexthop=15.1.1.5, Neighbour=0.0.0.0, Preference=1006632960, Label=NULL, Metric=0
)
[R1-Serial4/0/0]undo s
[R1-Serial4/0/0]undo shu
[R1-Serial4/0/0]undo shutdown
[R1-Serial4/0/0]
Mar 29 2024 18:43:22-08:00 R1 %%01IFPDT/4/IF_STATE(l)[5]:Interface Serial4/0/0 h
as turned into UP state.
[R1-Serial4/0/0]
Mar 29 2024 18:43:25-08:00 R1 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol PPP
on the interface Serial4/0/0 has entered the UP state.
[R1-Serial4/0/0]
Mar 29 2024 18:43:25-08:00 R1 %%01IFNET/4/LINK_STATE(l)[7]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the UP state.
R2-R5
[R5]aaa
[R5-aaa]l
[R5-aaa]local-user zhangdaye password ci
[R5-aaa]local-user zhangdaye password cipher zdy12345
Info: Add a new user.
[R5-aaa]l
[R5-aaa]local-user zhangdaye se
[R5-aaa]local-user zhangdaye service-type ppp
[R5-aaa]
[R5-aaa]
[R5-aaa]q
[R5]int s3/0/1
[R5-Serial3/0/1]ppp au
[R5-Serial3/0/1]ppp authentication-mode chap
[R5-Serial3/0/1]
Mar 29 2024 18:52:46-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
on the interface Serial3/0/1 has entered the DOWN state.
[R5-Serial3/0/1]
Mar 29 2024 18:52:46-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PPP
IPCP on the interface Serial3/0/1 has entered the DOWN state.
[R5-Serial3/0/1]
Mar 29 2024 18:52:52-08:00 R5 %%01IFPDT/4/IF_STATE(l)[2]:Interface Serial3/0/1 h
as turned into DOWN state.
[R5-Serial3/0/1]
Mar 29 2024 18:52:55-08:00 R5 %%01IFPDT/4/IF_STATE(l)[3]:Interface Serial3/0/1 h
as turned into UP state.
[R5-Serial3/0/1]
Mar 29 2024 18:52:56-08:00 R5 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol PPP
on the interface Serial3/0/1 has entered the UP state.
[R5-Serial3/0/1]
Mar 29 2024 18:52:57-08:00 R5 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol PPP
IPCP on the interface Serial3/0/1 has entered the UP state.
[R2]int s4/0/0
[R2-Serial4/0/0]ppp pass
[R2-Serial4/0/0]ppp chap user zhangdaye
[R2-Serial4/0/0]ppp chap password cipher zdy12345
[R2-Serial4/0/0]shu
[R2-Serial4/0/0]shutdown
Mar 29 2024 18:52:45-08:00 R2 %%01PPP/4/PHYSICALDOWN(l)[0]:On the interface Seri
al4/0/0, PPP link was closed because the status of the physical layer was Down.
[R2-Serial4/0/0]
[R2-Serial4/0/0]
Mar 29 2024 18:52:45-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PPP
on the interface Serial4/0/0 has entered the DOWN state.
[R2-Serial4/0/0]
Mar 29 2024 18:52:45-08:00 R2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the DOWN state.
[R2-Serial4/0/0]
Mar 29 2024 18:52:45-08:00 R2 %%01IFPDT/4/IF_STATE(l)[3]:Interface Serial4/0/0 h
as turned into DOWN state.
[R2-Serial4/0/0]
Mar 29 2024 18:52:45-08:00 R2 %%01RM/4/IPV4_DEFT_RT_CHG(l)[4]:IPV4 default Route
is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=Unknown,
Nexthop=25.1.1.5, Neighbour=0.0.0.0, Preference=1006632960, Label=NULL, Metric=0
)
[R2-Serial4/0/0]undo shu
[R2-Serial4/0/0]undo shutdown
[R2-Serial4/0/0]
Mar 29 2024 18:52:53-08:00 R2 %%01IFPDT/4/IF_STATE(l)[5]:Interface Serial4/0/0 h
as turned into UP state.
[R2-Serial4/0/0]
[R2-Serial4/0/0]
Mar 29 2024 18:52:56-08:00 R2 %%01IFNET/4/LINK_STATE(l)[6]:The line protocol PPP
on the interface Serial4/0/0 has entered the UP state.
[R2-Serial4/0/0]
Mar 29 2024 18:52:56-08:00 R2 %%01IFNET/4/LINK_STATE(l)[7]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the UP state.
R3-R5
[R3]int s4/0/0
[R3-Serial4/0/0]lin
[R3-Serial4/0/0]link-protocol ?
fr Select FR as line protocol
hdlc Enable HDLC protocol
lapb LAPB(X.25 level 2 protocol)
ppp Point-to-Point protocol
sdlc SDLC(Synchronous Data Line Control) protocol
x25 X.25 protocol
[R3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Mar 29 2024 18:57:49-08:00 R3 %%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.
[R3-Serial4/0/0]
Mar 29 2024 18:57:49-08:00 R3 %%01PPP/4/PHYSICALDOWN(l)[1]:On the interface Seri
al4/0/0, PPP link was closed because the status of the physical layer was Down.
[R3-Serial4/0/0]
Mar 29 2024 18:57:49-08:00 R3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol PPP
on the interface Serial4/0/0 has entered the DOWN state.
[R3-Serial4/0/0]
Mar 29 2024 18:57:49-08:00 R3 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol PPP
IPCP on the interface Serial4/0/0 has entered the DOWN state.
[R3-Serial4/0/0]
Mar 29 2024 18:57:49-08:00 R3 %%01IFPDT/4/IF_STATE(l)[4]:Interface Serial4/0/0 h
as turned into DOWN state.
[R3-Serial4/0/0]
Mar 29 2024 18:57:49-08:00 R3 %%01RM/4/IPV4_DEFT_RT_CHG(l)[5]:IPV4 default Route
is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=Unknown,
Nexthop=35.1.1.5, Neighbour=0.0.0.0, Preference=1006632960, Label=NULL, Metric=0
)
[R3-Serial4/0/0]
Mar 29 2024 18:57:50-08:00 R3 %%01IFPDT/4/IF_STATE(l)[6]:Interface Serial4/0/0 h
as turned into UP state.
[R3-Serial4/0/0]
Mar 29 2024 18:57:50-08:00 R3 %%01IFNET/4/LINK_STATE(l)[7]:The line protocol IP
on the interface Serial4/0/0 has entered the UP state.
[R3-Serial4/0/0]
Mar 29 2024 18:58:50-08:00 R3 %%01IFNET/4/LINK_STATE(l)[8]:The line protocol IP
on the interface Serial4/0/0 has entered the DOWN state.
[R3-Serial4/0/0]
Mar 29 2024 18:58:50-08:00 R3 %%01RM/4/IPV4_DEFT_RT_CHG(l)[9]:IPV4 default Route
is changed. (ChangeType=Delete, InstanceId=0, Protocol=Static, ExitIf=Unknown,
Nexthop=35.1.1.5, Neighbour=0.0.0.0, Preference=1006632960, Label=NULL, Metric=0
)
[R3-Serial4/0/0]
Mar 29 2024 18:59:17-08:00 R3 %%01IFNET/4/LINK_STATE(l)[10]:The line protocol IP
on the interface Serial4/0/0 has entered the UP state.
[R5]int s4/0/0
[R5-Serial4/0/0]l
[R5-Serial4/0/0]lin
[R5-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Mar 29 2024 18:59:06-08:00 R5 %%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.
[R5-Serial4/0/0]
[R5-Serial4/0/0]
Mar 29 2024 18:59:06-08:00 R5 %%01IFPDT/4/IF_STATE(l)[1]:Interface Serial4/0/0 h
as turned into DOWN state.
[R5-Serial4/0/0]
Mar 29 2024 18:59:07-08:00 R5 %%01IFPDT/4/IF_STATE(l)[2]:Interface Serial4/0/0 h
as turned into UP state.
[R5-Serial4/0/0]
Mar 29 2024 18:59:07-08:00 R5 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface Serial4/0/0 has entered the UP state.
- R1R2R3构建MGRE隧道
[R1]int tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 10.1.2.1 24
[R1-Tunnel0/0/0]tunnel-
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.1.1.1
Apr 1 2024 21:30:24-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]
[R1-Tunnel0/0/0]nhrp network-id 100
[R2]int tunnel 0/0/0
[R2-Tunnel0/0/0]ip add 10.1.2.2 24
[R2-Tunnel0/0/0]tunnel-p
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source s
[R2-Tunnel0/0/0]source Serial 4/0/0
Apr 1 2024 21:32:26-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]
[R2-Tunnel0/0/0]nhrp net
[R2-Tunnel0/0/0]nhrp network-id 100
[R3]int tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 10.1.2.3 24
[R3-Tunnel0/0/0]tunnel-pro
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source s
[R3-Tunnel0/0/0]source Serial 4/0/0
Apr 1 2024 21:35:21-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]
[R3-Tunnel0/0/0]nhrp net
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register
- R1R4点到点GRE
[R3]int tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 10.1.2.3 24
[R3-Tunnel0/0/0]tunnel-pro
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source s
[R3-Tunnel0/0/0]source Serial 4/0/0
Apr 1 2024 21:35:21-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]
[R3-Tunnel0/0/0]nhrp net
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register
[R4]int tunn
[R4]int Tunnel 0/0/1
[R4-Tunnel0/0/1]ip add 10.1.1.4 24
[R4-Tunnel0/0/1]tunnel-
[R4-Tunnel0/0/1]tunnel-protocol gre
[R4-Tunnel0/0/1]sou
[R4-Tunnel0/0/1]source 45.1.1.4
[R4-Tunnel0/0/1]dest
[R4-Tunnel0/0/1]destination 15.1.1.1
Apr 1 2024 21:39:17-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
- RIP全网可达
[R1]rip 1
[R1-rip-1]v 2
[R1-rip-1]undo summary
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 10.0.0.0
[R2]rip 1
[R2-rip-1]v 2
[R2-rip-1]undo summary
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 10.0.0.0
[R3]rip 1
[R3-rip-1]v 2
[R3-rip-1]undo summary
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 10.0.0.0
[R4]rip 1
[R4-rip-1]v 2
[R4-rip-1]undo summary
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 10.0.0.0
6.开启R1伪广播,关闭RIP水平分割
[R1]int tunnel 0/0/0
[R1-Tunnel0/0/0]nhrp entry mult
[R1-Tunnel0/0/0]nhrp entry multicast dy
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]undo rip sp
[R1-Tunnel0/0/0]undo rip split-horizon
[R2]int tunnel 0/0/0
[R2-Tunnel0/0/0]undo rip s
[R2-Tunnel0/0/0]undo rip split-horizon
[R3]int tunnel 0/0/0
[R3-Tunnel0/0/0]undo rip s
[R3-Tunnel0/0/0]undo rip split-horizon
[R3-Tunnel0/0/0]
7.测试RIP
8.使用NAT技术创建ACL放通内网流量
R1:
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]q
[R1]int s 4/0/0
[R1-Serial4/0/0]nat outbound 2000
[R1-Serial4/0/0]
R2:
[R2]acl 2000
[R2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[R2-acl-basic-2000]q
[R2]int s 4/0/0
[R2-Serial4/0/0]nat outbound 2000
R3:
[R3]acl 2000
[R3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[R3-acl-basic-2000]q
[R3]int s 4/0/0
[R3-Serial4/0/0]nat outbound 2000
R4:
[R4]acl 2000
[R4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[R4-acl-basic-2000]q
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]nat outbound 2000
11.ping测试