ospf综合实验

拓扑图

实验要求:

1、R4为ISP,其上只能配置IP地址;R4与其他所有直连设备间使用公有 IP;

2、R3—R5/6/7为MGRE环境,R3为中心站点

3、整个OSPF环境IP地址为172.16.0.0/16

4、所有设备均可访问R4的环回:

5、减少LSA的更新量,加快收敛,保障更新安全

6、全网可达

实验步骤

先配置IP

R1

[r1-LoopBack0]ip add        

[r1-LoopBack0]ip address 10.1.1.1 32

[r1-LoopBack0]int g 0/0/0

[r1-GigabitEthernet0/0/0]ip add        

[r1-GigabitEthernet0/0/0]ip address 10.1.123.1 24

May 13 2024 22:54:39-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

R2

[r2]int l 0

[r2-LoopBack0]ip add         

[r2-LoopBack0]ip address 10.1.2.1 32

[r2-LoopBack0]int g 0/0/0

[r2-GigabitEthernet0/0/0]ip add        

[r2-GigabitEthernet0/0/0]ip address 10.1.123.2 24

May 13 2024 22:57:25-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

R3

[r3]int g 0/0/0

[r3-GigabitEthernet0/0/0]ip add        

[r3-GigabitEthernet0/0/0]ip address 10.1.123.3 24

May 13 2024 22:58:30-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r3-GigabitEthernet0/0/0]int l 0

[r3-LoopBack0]ip ad        

[r3-LoopBack0]ip address 10.0.3.1 32

[r3-LoopBack0]int g 0/0/1

[r3-GigabitEthernet0/0/1]ip ad        

[r3-GigabitEthernet0/0/1]ip address 200.1.34.1.24

                                    ^

Error: Wrong parameter found at '^' position.

[r3-GigabitEthernet0/0/1]ip address 200.1.34.1 24

May 13 2024 22:59:47-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

R4

[r4]sys r4-isp

[r4-isp]int g0/0/0

[r4-isp-GigabitEthernet0/0/0]ip ad 200.1.34.2 24

May 13 2024 23:08:19-08:00 r4-isp %%01IFNET/4/LINK_STATE(l)[22]:The line protoco

l IP on the interface GigabitEthernet0/0/0 has entered the UP state.

[r4-isp-GigabitEthernet0/0/0]int g0/0/1

[r4-isp-GigabitEthernet0/0/1]ip ad 200.1.45.2 24

[r4-isp-GigabitEthernet0/0/1]

May 13 2024 23:08:33-08:00 r4-isp %%01IFNET/4/LINK_STATE(l)[23]:The line protoco

l IP on the interface GigabitEthernet0/0/1 has entered the UP state.

[r4-isp-GigabitEthernet0/0/1]int g0/0/2

[r4-isp-GigabitEthernet0/0/2]ip ad 200.1.46.2 24

[r4-isp-GigabitEthernet0/0/2]

May 13 2024 23:08:46-08:00 r4-isp %%01IFNET/4/LINK_STATE(l)[24]:The line protoco

l IP on the interface GigabitEthernet0/0/2 has entered the UP state.

[r4-isp-GigabitEthernet0/0/2]int e 4/0/0

[r4-isp-Ethernet4/0/0]ip ad 200.1.47.2 24

[r4-isp-Ethernet4/0/0]

May 13 2024 23:09:04-08:00 r4-isp %%01IFNET/4/LINK_STATE(l)[25]:The line protoco

l IP on the interface Ethernet4/0/0 has entered the UP state.

[r4-isp]int lo0

[r4-isp-LoopBack0]ip ad 8.8.8.8 24

R5

[r5]int l 0

[r5-LoopBack0]ip ad 10.0.5.1 32

[r5-LoopBack0]int g0/0/0

[r5-GigabitEthernet0/0/0]ip ad 200.1.45.1 24

May 13 2024 23:11:56-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

R6

[r6]int lo0

[r6-LoopBack0]ip ad 10.0.6.1 32

[r6-LoopBack0]int g0/0/0

[r6-GigabitEthernet0/0/0]ip ad 200.1.46.1 24

May 13 2024 23:13:49-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r6-GigabitEthernet0/0/0]int g0/0/1

[r6-GigabitEthernet0/0/1]ip ad 10.2.116.6 24

[r6-GigabitEthernet0/0/1]

May 13 2024 23:13:59-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

R7

[r7]int l 0

[r7-LoopBack0]ip ad 10.0.7.1 32

[r7-LoopBack0]int g0/0/0

[r7-GigabitEthernet0/0/0]ip ad 10.3.78.7 24

May 13 2024 23:15:10-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r7-GigabitEthernet0/0/0]int g0/0/1

[r7-GigabitEthernet0/0/1]ip ad 200.1.47.1 24

[r7-GigabitEthernet0/0/1]

May 13 2024 23:15:22-08:00 r7 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

R8

[r8]int lo0

[r8-LoopBack0]ip ad 10.3.8.1 32

[r8-LoopBack0]int g0/0/0

[r8-GigabitEthernet0/0/0]ip ad 10.3.78.8 24

May 13 2024 23:16:06-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r8-GigabitEthernet0/0/0]int g0/0/1

[r8-GigabitEthernet0/0/1]ip ad 10.3.89.8 24

May 13 2024 23:16:23-08:00 r8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

R9

[r9]int lo0

[r9-LoopBack0]ip ad 10.4.9.1 32

[r9-LoopBack0]int g0/0/0

[r9-GigabitEthernet0/0/0]ip ad 10.3.89.9 24

May 13 2024 23:17:25-08:00 r9 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r9-GigabitEthernet0/0/0]int g0/0/1

[r9-GigabitEthernet0/0/1]ip ad 10.4.109.9 24

[r9-GigabitEthernet0/0/1]

May 13 2024 23:17:40-08:00 r9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

R10

[r10]int lo0

[r10-LoopBack0]ip ad 10.4.10.1 32

[r10-LoopBack0]int g0/0/0

[r10-GigabitEthernet0/0/0]ip ad 10.4.109.10 24

May 13 2024 23:18:51-08:00 r10 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

R11

[r11]int lo0

[r11-LoopBack0]ip ad 10.2.11.1 32

[r11-LoopBack0]int g0/0/0

[r11-GigabitEthernet0/0/0]ip ad 10.2.116.11 24

May 13 2024 23:20:11-08:00 r11 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r11-GigabitEthernet0/0/0]int g0/0/1

[r11-GigabitEthernet0/0/1]ip ad 10.2.112.11 24

May 13 2024 23:20:25-08:00 r11 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

 on the interface GigabitEthernet0/0/1 has entered the UP state.

R12

[r12]int lo0

[r12-LoopBack0]ip ad 10.8.1.1 32

[r12-LoopBack0]int lo1

[r12-LoopBack1]ip ad 10.8.2.2 32

[r12-LoopBack1]int lo3

[r12-LoopBack3]ip ad 10.2.12.1 32

[r12-LoopBack3]int g0/0/0

[r12-GigabitEthernet0/0/0]ip ad 10.2.112.12 24

May 13 2024 23:22:55-08:00 r12 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

再进行其他配置,搭建MGRE环境并配置IP

R1

[r1]ospf 1 router-id 1.1.1.1

[r1-ospf-1]a 1

[r1-ospf-1-area-0.0.0.1]network 10.1.1.1 0.0.0.0

[r1-ospf-1-area-0.0.0.1]network 10.1.123.0 0.0.0.255

[r1-ospf-1-area-0.0.0.1]ospf 1

[r1-ospf-1]a 1

[r1-ospf-1-area-0.0.0.1]stub

R2

[r2]ospf 1 router-id 2.2.2.2

[r2-ospf-1]a 1

[r2-ospf-1-area-0.0.0.1]network 10.1.2.1 0.0.0.0

[r2-ospf-1-area-0.0.0.1]network 10.1.123.0 0.0.0.255

[r2-ospf-1-area-0.0.0.1]ospf 1

[r2-ospf-1]a 1

[r2-ospf-1-area-0.0.0.1]stub

R3

[r3]ip route-static 0.0.0.0 0 200.1.34.2

[r3]int tun 0/0/0

[r3-Tunnel0/0/0]ip ad 10.0.30.3 24

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

[r3-Tunnel0/0/0]source g0/0/1

May 13 2024 23:34: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]

[r3-Tunnel0/0/0]nhrp network-id 1

[r3-Tunnel0/0/0]nhrp entry multicast dynamic

[r3-Tunnel0/0/0]nhrp authentication cipher 123

[r3-Tunnel0/0/0]gre key 123

[r3-Tunnel0/0/0]ospf router-id 3.3.3.3

[r3-ospf-1]network 10.0.30.0 0.0.0.255

           ^

Error: Unrecognized command found at '^' position.

[r3-ospf-1]a 0

[r3-ospf-1-area-0.0.0.0]network 10.0.30.0 0.0.0.255

[r3-ospf-1-area-0.0.0.0]network 10.0.3.1 0.0.0.0

[r3-ospf-1-area-0.0.0.0]int tun0/0/0

[r3-Tunnel0/0/0]ospf network-type broadcast

[r3-Tunnel0/0/0]q

[r3]ospf 1

[r3-ospf-1]a1

           ^

Error: Unrecognized command found at '^' position.

[r3-ospf-1]a 1

[r3-ospf-1-area-0.0.0.1]stub no-summary

[r3-ospf-1-area-0.0.0.1]abr-summary 10.1.0.0 255.255.0.0

[r3-ospf-1-area-0.0.0.1]q

[r3-ospf-1]q

[r3]int tun0/0/0

[r3-Tunnel0/0/0]ospf network-type p2mp

[r3-Tunnel0/0/0]nhrp redirect

R5

[r5]int tun 0/0/0

[r5-Tunnel0/0/0]ip ad 10.0.30.5 24

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

[r5-Tunnel0/0/0]source g0/0/0

May 13 2024 23:39:46-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r5-Tunnel0/0/0]

[r5-Tunnel0/0/0]gre key 123

[r5-Tunnel0/0/0]nhrp network-id 1

[r5-Tunnel0/0/0]nhrp authentication cipher 123

[r5-Tunnel0/0/0]nhrp entry 10.0.30.3 200.1.34.1 register

[r5-Tunnel0/0/0]ospf 1 router-id 5.5.5.5

[r5-ospf-1]a 5

[r5-ospf-1-area-0.0.0.5]a 0

[r5-ospf-1-area-0.0.0.0]network 10.0.5.1 0.0.0.0

[r5-ospf-1-area-0.0.0.0]network 10.0.30.0 0.0.0.255

[r5-ospf-1-area-0.0.0.0]int tun0/0/0

[r5-Tunnel0/0/0]ospf network-type broadcast

[r5-Tunnel0/0/0]ospf dr-priority 0

[r5-Tunnel0/0/0]int tun0/0/0

[r5-Tunnel0/0/0]ospf network-type p2mp

R6

[r6]ip route-static 0.0.0.0 0 200.1.46.2

[r6]int tun 0/0/0

[r6-Tunnel0/0/0]ip ad 10.0.30.6 24

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

[r6-Tunnel0/0/0]source g0/0/0

May 13 2024 23:42:41-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r6-Tunnel0/0/0]

[r6-Tunnel0/0/0]gre key 123

[r6-Tunnel0/0/0]nhrp authentication cipher 123

[r6-Tunnel0/0/0]nhrp network-id 1

[r6-Tunnel0/0/0]nhrp entry 10.0.30.3 200.1.34.1 register

[r6-Tunnel0/0/0]ospf 1 router-id 6.6.6.6

[r6-ospf-1]a 0

[r6-ospf-1-area-0.0.0.0]network 10.0.6.1 0.0.0.0

[r6-ospf-1-area-0.0.0.0]network 10.0.30.0 0.0.0.255

[r6-ospf-1-area-0.0.0.0]int tun 0/0/0

[r6-Tunnel0/0/0]ospf network-type broadcast

[r6-Tunnel0/0/0]ospf dr-priority 0

[r6-Tunnel0/0/0]ospf

[r6-ospf-1]a 2

[r6-ospf-1-area-0.0.0.2]nssa no-summary

[r6-ospf-1-area-0.0.0.2]q

[r6-ospf-1]q

[r6]int tun0/0/0

[r6-Tunnel0/0/0]ospf network-type p2mp

R7

[r7]ip route-static 0.0.0.0 0 200.1.47.2

[r7]int tun 0/0/0

[r7-Tunnel0/0/0]ip ad 10.0.30.7 24

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

[r7-Tunnel0/0/0]gre key 123

[r7-Tunnel0/0/0]nhrp authentication cipher 123

[r7-Tunnel0/0/0]nhrp network-id 1

[r7-Tunnel0/0/0]nhrp entry 10.0.30.3 200.1.34.1 register

[r7-Tunnel0/0/0]source g0/0/1

May 13 2024 23:46:38-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[r7-Tunnel0/0/0]

[r7-Tunnel0/0/0]ospf 1 router-id 7.7.7.7

[r7-ospf-1]a 0

[r7-ospf-1-area-0.0.0.0]network 10.0.7.1 0.0.0.0

[r7-ospf-1-area-0.0.0.0]network 10.0.30.0 0.0.0.255

[r7-ospf-1-area-0.0.0.0]int tun 0/0/0

[r7-Tunnel0/0/0]ospf network-type broadcast

[r7-Tunnel0/0/0]ospf dr-priority 0

[r7-Tunnel0/0/0]ospf 1

[r7-ospf-1]a 3

[r7-ospf-1-area-0.0.0.3]network 10.3.78.0 0.0.0.255

[r7-ospf-1-area-0.0.0.3]abr-summary 10.3.0.0 255.255.0.0

[r7-ospf-1-area-0.0.0.3]int tun0/0/0

[r7-Tunnel0/0/0]ospf network-type p2mp

R8

[r8]ospf 1 router-id 8.8.8.8

[r8-ospf-1]a 3

[r8-ospf-1-area-0.0.0.3]network 10.3.8.1 0.0.0.0

[r8-ospf-1-area-0.0.0.3]network 10.3.78.0 0.0.0.255

[r8-ospf-1-area-0.0.0.3]network 10.3.89.0 0.0.0.255

[r8-ospf-1-area-0.0.0.3]nssa

R9

[r9]ospf 2 router-id 9.9.9.9

[r9-ospf-2]a 4

[r9-ospf-2-area-0.0.0.4]network 10.4.9.1 0.0.0.0

[r9-ospf-2-area-0.0.0.4]network 10.4.109.0 0.0.0.255

[r9-ospf-2-area-0.0.0.4]q

[r9-ospf-2]q

[r9]ospf 1

[r9-ospf-1]import-route ospf 2

[r9-ospf-1]q

[r9]ospf 2

[r9-ospf-2]import-route ospf 1

[r9-ospf-2]q

[r9]ospf

[r9-ospf-1]asbr-summary 10.4.0.0 255.255.0.0

[r9-ospf-1]q

[r9]ospf 2

[r9-ospf-2]default-route-advertise

R10

[r10]ospf 1 router-id 10.10.10.10

[r10-ospf-1]a 4

[r10-ospf-1-area-0.0.0.4]network 10.4.10.1 0.0.0.0

[r10-ospf-1-area-0.0.0.4]network 10.4.109.0 0.0.0.255

R11

[r11]ospf 1 router-id 11.11.11.11

[r11-ospf-1]a 2

[r11-ospf-1-area-0.0.0.2]network 10.2.11.1 0.0.0.0

[r11-ospf-1-area-0.0.0.2]network 10.2.116.0 0.0.0.255

[r11-ospf-1-area-0.0.0.2]network 10.2.112.0 0.0.0.255

[r11-ospf-1-area-0.0.0.2]ospf

[r11-ospf-1]q

[r11]ospf

[r11-ospf-1]a2

            ^

Error: Unrecognized command found at '^' position.

[r11-ospf-1]a 2

[r11-ospf-1-area-0.0.0.2]nssa no-summary

R12

[r12]ospf 1 router-id 12.12.12.12

[r12-ospf-1]a 2

[r12-ospf-1-area-0.0.0.2]network 10.2.112.0 0.0.0.255

[r12-ospf-1-area-0.0.0.2]network 10.2.12.1 0.0.0.0

[r12-ospf-1-area-0.0.0.2]rip

[r12-rip-1]version 2

[r12-rip-1]undo summary

[r12-rip-1]network 10.0.0.0

[r12-rip-1]q

[r12]ospf 1

[r12-ospf-1]import-route rip

[r12-ospf-1]q

[r12]ospf

[r12-ospf-1]a 2

[r12-ospf-1-area-0.0.0.2]nssa no-summary

  • 14
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值