RIP环境下的MGRE网络

拓扑图:

配置:

2.R1和R5间使用PPP的PAP认证,R5为主认证方;

R5下配置:

<ISP>sys

[ISP]aaa

[ISP-aaa]local-user huawei1 password cipher 123456

[ISP-aaa]local-user huawei1 service-type ppp

Info: Add a new user.

[ISP]interface Serial 3/0/0

[ISP-Serial3/0/0]link-protocol ppp

[ISP-Serial3/0/0]ppp authentication-mode pap

R1下配置:

<r1>sys

[r1]interface Serial 4/0/0

[r1-Serial4/0/0]ppp pap local-user huawei1 password cipher 123456

R2与R5之间使用PPP的chap认证,R5为主认证方;

R5下配置:

[ISP]aaa

[ISP-aaa]local-user huawei2 password cipher 123456

Info: Add a new user.

[ISP-aaa]local-user huawei2 service-type ppp

[ISP]interface Serial 3/0/1

[ISP-Serial3/0/1]link-protocol ppp

[ISP-Serial3/0/1]ppp authentication-mode chap

R2下配置:

<r2>sys

[r2]interface Serial 4/0/0

[r2-Serial4/0/0]ppp chap user huawei2

[r2-Serial4/0/0]ppp chap password cipher 123456

R3与R5之间使用HDLC封装。

R3下配置:

<r3>sys

[r3]display interface Serial 4/0/0

Serial4/0/0 current state : UP

Line protocol current state : UP

Last line protocol up time : 2024-07-08 22:28:12 UTC-08:00

Description:HUAWEI, AR Series, Serial4/0/0 Interface

Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)

Internet Address is 35.0.0.1/24

------------<Link layer protocol is PPP>

LCP opened, IPCP opened

Last physical up time   : 2024-07-08 22:28:09 UTC-08:00

Last physical down time : 2024-07-08 22:28:04 UTC-08:00

Current system time: 2024-07-08 22:28:38-08:00

Physical layer is synchronous, Virtualbaudrate is 64000 bps

Interface is DTE, Cable type is V11, Clock mode is TC

Last 300 seconds input rate 0 bytes/sec 0 bits/sec 0 packets/sec

Last 300 seconds output rate 0 bytes/sec 0 bits/sec 0 packets/sec

Input: 8 packets, 272 bytes

  Broadcast:              0,  Multicast:              0

  Errors:                 0,  Runts:                  0

  Giants:                 0,  CRC:                    0

  Alignments:             0,  Overruns:               0

  Dribbles:               0,  Aborts:                 0

  No Buffers:             0,  Frame Error:            0

Output: 9 packets, 130 bytes

  Total Error:            0,  Overruns:               0

  Collisions:             0,  Deferred:               0

    Input bandwidth utilization  :    0%

    Output bandwidth utilization :    0%

[r3]interface Serial 4/0/0

[r3-Serial4/0/0]link-protocol hdlc

Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]

:y

Jul  8 2024 22:30:43-08:00 r3 %%01IFNET/4/CHANGE_ENCAP(l)[2]:The user performed

the configuration that will change the encapsulation protocol of the link and th

en selected Y.

[r3-Serial4/0/0]

Jul  8 2024 22:30:43-08:00 r3 %%01PPP/4/PHYSICALDOWN(l)[3]:On the interface Seri

al4/0/0, PPP link was closed because the status of the physical layer was Down.

[r3-Serial4/0/0]

[r3-Serial4/0/0]

Jul  8 2024 22:30:43-08:00 r3 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol PPP

 on the interface Serial4/0/0 has entered the DOWN state.

[r3-Serial4/0/0]

Jul  8 2024 22:30:43-08:00 r3 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol PPP

 IPCP on the interface Serial4/0/0 has entered the DOWN state.

[r3-Serial4/0/0]

Jul  8 2024 22:30:43-08:00 r3 %%01IFPDT/4/IF_STATE(l)[6]:Interface Serial4/0/0 h

as turned into DOWN state.

[r3-Serial4/0/0]

Jul  8 2024 22:30:44-08:00 r3 %%01IFPDT/4/IF_STATE(l)[7]:Interface Serial4/0/0 h

as turned into UP state.

[r3-Serial4/0/0]

Jul  8 2024 22:30:44-08:00 r3 %%01IFNET/4/LINK_STATE(l)[8]:The line protocol IP

on the interface Serial4/0/0 has entered the UP state.

[r3-Serial4/0/0]display interface Serial 4/0/0

Serial4/0/0 current state : UP

Line protocol current state : UP

Last line protocol up time : 2024-07-08 22:30:44 UTC-08:00

Description:HUAWEI, AR Series, Serial4/0/0 Interface

Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)

Internet Address is 35.0.0.1/24

-----<Link layer protocol is nonstandard HDLC>

Last physical up time   : 2024-07-08 22:30:44 UTC-08:00

Last physical down time : 2024-07-08 22:30:43 UTC-08:00

Current system time: 2024-07-08 22:31:20-08:00

Physical layer is synchronous, Virtualbaudrate is 64000 bps

Interface is DTE, Cable type is V11, Clock mode is TC

Last 300 seconds input rate 4 bytes/sec 32 bits/sec 0 packets/sec

Last 300 seconds output rate 1 bytes/sec 8 bits/sec 0 packets/sec

Input: 37 packets, 1208 bytes

  Broadcast:              0,  Multicast:              0

  Errors:                 0,  Runts:                  0

  Giants:                 0,  CRC:                    0

  Alignments:             0,  Overruns:               0

  Dribbles:               0,  Aborts:                 0

  No Buffers:             0,  Frame Error:            0

Output: 39 packets, 516 bytes

  Total Error:            0,  Overruns:               0

  Collisions:             0,  Deferred:               0

    Input bandwidth utilization  :    0%

    Output bandwidth utilization :    0%

<ISP>display interface Serial 4/0/0

Serial4/0/0 current state : UP

Line protocol current state : DOWN

Description:HUAWEI, AR Series, Serial4/0/0 Interface

Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)

Internet Address is 35.0.0.2/24

------<Link layer protocol is PPP>

LCP stopped

Last physical up time   : 2024-07-08 22:28:09 UTC-08:00

Last physical down time : 2024-07-08 22:27:59 UTC-08:00

Current system time: 2024-07-08 22:32:39-08:00

Physical layer is synchronous, Virtualbaudrate is 64000 bps

Interface is DTE, Cable type is V11, Clock mode is TC

Last 300 seconds input rate 5 bytes/sec 40 bits/sec 0 packets/sec

Last 300 seconds output rate 2 bytes/sec 16 bits/sec 0 packets/sec

Input: 47 packets, 1632 bytes

  Broadcast:              0,  Multicast:              0

  Errors:                 0,  Runts:                  0

  Giants:                 0,  CRC:                    0

  Alignments:             0,  Overruns:               0

  Dribbles:               0,  Aborts:                 0

  No Buffers:             0,  Frame Error:            0

Output: 45 packets, 612 bytes

  Total Error:            0,  Overruns:               0

  Collisions:             0,  Deferred:               0

    Input bandwidth utilization  :    0%

    Output bandwidth utilization :    0%

[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

Jul  8 2024 22:35:14-08:00 ISP %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed

 the configuration that will change the encapsulation protocol of the link and t

hen selected Y.

[ISP-Serial4/0/0]

Jul  8 2024 22:35:14-08:00 ISP %%01IFPDT/4/IF_STATE(l)[1]:Interface Serial4/0/0

has turned into DOWN state.

[ISP-Serial4/0/0]

Jul  8 2024 22:35:14-08:00 ISP %%01IFPDT/4/IF_STATE(l)[2]:Interface Serial4/0/0

has turned into UP state.

[ISP-Serial4/0/0]

Jul  8 2024 22:35:14-08:00 ISP %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP

 on the interface Serial4/0/0 has entered the UP state.

[ISP]display interface Serial 4/0/0

Serial4/0/0 current state : UP

Line protocol current state : UP

Last line protocol up time : 2024-07-08 22:35:14 UTC-08:00

Description:HUAWEI, AR Series, Serial4/0/0 Interface

Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)

Internet Address is 35.0.0.2/24

---<Link layer protocol is nonstandard HDLC>

Last physical up time   : 2024-07-08 22:35:14 UTC-08:00

Last physical down time : 2024-07-08 22:35:14 UTC-08:00

Current system time: 2024-07-08 22:35:46-08:00

Physical layer is synchronous, Virtualbaudrate is 64000 bps

Interface is DTE, Cable type is V11, Clock mode is TC

Last 300 seconds input rate 4 bytes/sec 32 bits/sec 0 packets/sec

Last 300 seconds output rate 1 bytes/sec 8 bits/sec 0 packets/sec

Input: 66 packets, 2430 bytes

  Broadcast:              0,  Multicast:              0

  Errors:                 0,  Runts:                  0

  Giants:                 0,  CRC:                    0

  Alignments:             0,  Overruns:               0

  Dribbles:               0,  Aborts:                 0

  No Buffers:             0,  Frame Error:            0

Output: 68 packets, 1038 bytes

  Total Error:            0,  Overruns:               0

  Collisions:             0,  Deferred:               0

    Input bandwidth utilization  :    0%

    Output bandwidth utilization :    0%

R1/R2/R3构建一个MGRE环境,R1为中心站点

R1下配置

[r1]interface Tunnel 0/0/0

[r1-Tunnel0/0/0]ip address 192.168.5.1 24

[r1-Tunnel0/0/0]tunnel-protocol gre p2mp

[r1-Tunnel0/0/0]source 15.0.0.1

Jul  9 2024 17:16:47-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface Tunnel0/0/0 has entered the UP state.

[r1-Tunnel0/0/0]nhrp network-id 100

[r1-Tunnel0/0/0]display this

[V200R003C00]

#

interface Tunnel0/0/0

 ip address 192.168.5.1 255.255.255.0

 tunnel-protocol gre p2mp

 source 15.0.0.1

 nhrp network-id 100

#

return

R2下配置

[r2]interface  Tunnel 0/0/0

[r2-Tunnel0/0/0]ip address 192.168.5.2 24

[r2-Tunnel0/0/0]tunnel-protocol gre p2mp

[r2-Tunnel0/0/0]source 25.0.0.1

Jul  9 2024 17:20:25-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

[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register

[r2-Tunnel0/0/0]display this

[V200R003C00]

#

interface Tunnel0/0/0

 ip address 192.168.5.2 255.255.255.0

 tunnel-protocol gre p2mp

 source 25.0.0.1

 nhrp network-id 100

 nhrp entry 192.168.5.1 15.0.0.1 register

#

return

R3下配置

[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 35.0.0.1

Jul  9 2024 17:24:24-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

[r3-Tunnel0/0/0]display this

[V200R003C00]

#

interface Tunnel0/0/0

 ip address 192.168.5.3 255.255.255.0

 tunnel-protocol gre p2mp

 source 35.0.0.1

 nhrp network-id 100

 nhrp entry 192.168.5.1 15.0.0.1 register

#

return

R1、R4间为点到点的GRE

R1下配置

[r1]interface Tunnel 0/0/1

[r1-Tunnel0/0/1]ip address 192.168.6.1 24

[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

[r1]ip route-static 192.168.4.0 24 192.168.6.2

[r1]interface tunnel 0/0/1

[r1-Tunnel0/0/1]display this

[V200R003C00]

#

interface Tunnel0/0/1

 ip address 192.168.6.1 255.255.255.0

 tunnel-protocol gre

 source 15.0.0.1

 destination 45.0.0.1

#

return

[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  9 2024 17:32:12-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface Tunnel0/0/0 has entered the UP state.

[R4]ip route-static 192.168.1.0 24 192.168.6.1

[R4-Tunnel0/0/0]display this

[V200R003C00]

#

interface Tunnel0/0/0

 ip address 192.168.6.2 255.255.255.0

 tunnel-protocol gre

 source 45.0.0.1

 destination 15.0.0.1

#

return

整个私有网络基于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.2.0

[r2-rip-1]network 192.168.5.0

[r3]rip

[r3-rip-1]version 2

[r3-rip-1]network 192.168.3.0

[r3-rip-1]network 192.168.5.0

[R4]rip

[R4-rip-1]version 2

[R4-rip-1]network 192.168.4.0

[R4-rip-1]network 192.168.6.0

[ISP]interface l0

[ISP-LoopBack0]ip address 5.5.5.5 24

[r1]acl 2000

[r1-acl-basic-2000]rule 5 permit

[r1-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255

[r1]interface Serial 4/0/0

[r1-Serial4/0/0]nat outbound  2000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值