ospf实验

1. 配置IP

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ip add 172.16.33.1 24

Jul 28 2024 12:34:27-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 

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

[R1-GigabitEthernet0/0/0]int l0

[R1-LoopBack0]ip add 172.16.34.1 24

[R2]INT G0/0/0

[R2-GigabitEthernet0/0/0]IP ADD 172.16.33.2 24

Jul 28 2024 12:38:54-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 

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

[R2-GigabitEthernet0/0/0]

[R2-GigabitEthernet0/0/0]int l0

[R2-LoopBack0]ip add 172.16.35.2 24

[R3]int g0/0/0

[R3-GigabitEthernet0/0/0]ip add 172.16.33.3 24

Jul 28 2024 12:41:11-08:00 R3 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 

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

[R3-GigabitEthernet0/0/0]int s4/0/0

[R3-Serial4/0/0]ip add 34.0.0.3 24

[R3-Serial4/0/0]int l0

[isp r4]int s4/0/0

[isp r4-Serial4/0/0]ip add 34.0.0.4 24

[isp r4-Serial4/0/0]

Jul 28 2024 12:43:09-08:00 isp r4 %%01IFNET/4/LINK_STATE(l)[14]:The line protoco

l PPP IPCP on the interface Serial4/0/0 has entered the UP state. 

[isp r4-Serial4/0/0]int s4/0/1

[isp r4-Serial4/0/1]ip add 45.0.0.4 24

[isp r4-Serial4/0/1]

[isp r4-Serial4/0/1]int s3/0/0

[isp r4-Serial3/0/0]ip add 46.0.0.4 24

[isp r4-Serial3/0/0]int g0/0/0

[isp r4-GigabitEthernet0/0/0]ip add 47.0.0.4 24

[R5-Serial4/0/0]ip add 45.0.0.5 24

[R5-Serial4/0/0]

Jul 28 2024 12:44:58-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP

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

[R5-Serial4/0/0]int l0

[R5-LoopBack0]ip add 172.16.3.5 24

[R6]INT S4/0/0

[R6-Serial4/0/0]IP ADD 46.0.0.6 24

[R6-Serial4/0/0]

Jul 28 2024 12:53:14-08:00 R6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP

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

[R6-Serial4/0/0]int l0

[R6-LoopBack0]ip add 172.16.4.6 24

[R6]int g0/0/1

[R6-GigabitEthernet0/0/1]ip add 172.16.65.1 30

[R7]int g0/0/0

[R7-GigabitEthernet0/0/0]ip add 47.0.0.7 24

Jul 28 2024 12:53:58-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 l0

[R7-LoopBack0]ip add 12.16.5.7 24

[R7-LoopBack0]q

[R7]int g0/0/1

[R7-GigabitEthernet0/0/1]172.16.97.1 30

                        ^

Error: Unrecognized command found at '^' position.

[R7-GigabitEthernet0/0/1]ip add 172.16.97.1 30

[r8]int g0/0/0

[r8-GigabitEthernet0/0/0]ip add 172.16.97.2 24

Jul 28 2024 12:56:21-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]undo ip add 172.16.97.2 24

Jul 28 2024 12:56:48-08:00 r8 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 

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

[r8-GigabitEthernet0/0/0]ip add 172.16.97.2 30

Jul 28 2024 12:56:55-08:00 r8 %%01IFNET/4/LINK_STATE(l)[2]: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 add 172.16.97.5 30

[r8-GigabitEthernet0/0/1]

Jul 28 2024 12:57:48-08:00 r8 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 

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

[r8-GigabitEthernet0/0/1]int l0

[r8-LoopBack0]ip add 172.16.98.8 24

R9]int g0/0/0

[R9-GigabitEthernet0/0/0]ip add 172.16.97.6 30

Jul 28 2024 12:59:03-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 add 172.16.129.1 30

[R9-GigabitEthernet0/0/1]

Jul 28 2024 12:59:34-08:00 R9 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 

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

[R9-GigabitEthernet0/0/1]int l0

[R9-LoopBack0]ip add 172.16.130.9 24

[R10]int g0/0/0

[R10-GigabitEthernet0/0/0]ip add 172.16.129.2 30

Jul 28 2024 13:00:42-08:00 R10 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[R10-GigabitEthernet0/0/0]int l0

[R10-LoopBack0]ip add 172.16.131.10 24

[R12]sys r11

[r11]int g0/0/0

[r11-GigabitEthernet0/0/0]ip add 172.16.65.2 30

Jul 28 2024 13:02:40-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 add 172.16.65.5 30

Jul 28 2024 13:03:18-08:00 r11 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

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

[r11-GigabitEthernet0/0/1]int l0

[r11-LoopBack0]ip add 172.16.66.11 24

[R12]int g0/0/0

[R12-GigabitEthernet0/0/0]ip add 172.16.65.6 30

Jul 28 2024 13:04:09-08:00 R12 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

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

[R12-GigabitEthernet0/0/0]int l0

[R12-LoopBack0]ip add 172.16.160.12 24

[R12-LoopBack0]int l1

[R12-LoopBack1]ip add 172.16.161.12 24

2. 公网通

[R3]ip route-static 0.0.0.0 0 34.0.0.4

[R5]ip route-static 0.0.0.0 0 45.0.0.4

[R6]ip route-static 0.0.0.0 0 46.0.0.4

[R7]ip route-static 0.0.0.0 0 47.0.0.4

3. 私网通

[R1]ospf 1 router-id 1.1.1.1

[R1-ospf-1]a 1

[R1-ospf-1-area-0.0.0.1]ne 0.0.0.0 255.255.255.255

[R2]ospf 1 router-id 2.2.2.2

[R2-ospf-1]a 1

[R2-ospf-1-area-0.0.0.1]ne 0.0.0.0 255.255.255.255

[R3-ospf-1]ospf 1 router-id 3.3.3.3

[R3-ospf-1]a 1

[R3-ospf-1-area-0.0.0.1]ne 172.16.36.0 0.0.0.255

[R3]ospf 1 router-id 3.3.3.3

[R3-ospf-1]a 1

[R3-ospf-1-area-0.0.0.1]ne 172.16.33.0 0.0.0.255

[R6]ospf 1 router-id 6.6.6.6

[R6-ospf-1]a 0

[R6-ospf-1-area-0.0.0.0]ne 172.16.4.0 0.0.0.255

[R6-ospf-1-area-0.0.0.0]a 2

[R6-ospf-1-area-0.0.0.2]ne 172.16.65.1 0.0.0.0

[R7]ospf 1 router-id 7.7.7.7

[R7-ospf-1]a 0

[R7-ospf-1-area-0.0.0.0]ne 172.16.5.0 0.0.0.255

[R7-ospf-1-area-0.0.0.0]a 3

[R7-ospf-1-area-0.0.0.3]ne 172.16.97.1 0.0.0.0

[r8]ospf 1 router-id 8.8.8.8

[r8-ospf-1]a 3

[r8-ospf-1-area-0.0.0.3]ne 0.0.0.0 255.255.255.255

[R9]ospf 1 router-id 9.9.9.9

[R9-ospf-1]a 3

[R9-ospf-1-area-0.0.0.3]ne 172.16.96.0 0.0.31.255

[R9-ospf-2]a 4

[R9-ospf-2-area-0.0.0.4]ne 172.16.128.0 0.0.31.255

[R9-ospf-2]ospf 1

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

[R9-ospf-1]ospf 2

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

[R10]ospf 2 router-id 10.10.10.10

[R10-ospf-2]a 4 

[R10-ospf-2-area-0.0.0.4]ne 172.16.128.0 0.0.31.255

4. Mgre

[R3]int tunnel 0/0/0

[R3-Tunnel0/0/0]ip add 172.16.6.3 24

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

[R3-Tunnel0/0/0]source 34.0.0.3

Jul 28 2024 14:02:40-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 100

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

[R5]int tunnel 0/0/0

[R5-Tunnel0/0/0]ip add 172.16.6.5 24

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

[R5-Tunnel0/0/0]source s4/0/0

Jul 28 2024 14:04:16-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]nhrp entry 172.16.6.3 34.0.0.3 register

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

[R6]int tunnel 0/0/0

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

[R6-Tunnel0/0/0]source s4/0/0

[R6-Tunnel0/0/0]nhrp 172.16.6.3 34.0.0.3 register

                    ^

Error: Unrecognized command found at '^' position.

[R6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

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

[R7]int tunnel 0/0/0

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

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

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

[R7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3

[R7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

5.配置路由协议,传递私网路由

[R3-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255

[R5-ospf-1]a 0

[R5-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255

[R6]ospf 1

[R6-ospf-1]a 0

[R6-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255

[R6-ospf-1-area-0.0.0.0]ne 172.16.4.0 0.0.0.255

[R7-ospf-1-area-0.0.0.0]ne 172.16.6.0 0.0.0.255

[R3]int tunnel 0/0/0

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

[R5-ospf-1]int tunnel 0/0/0

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

[R6]int tunnel 0/0/0

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

[R7]int tunnel 0/0/0

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

6选举dr bdr

[R5]int t0/0/0

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

[R6]int t0/0/0

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

[R7]int t0/0/0

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

7.路由聚合

[R3]ospf 1

[R3-ospf-1]a 1

[R3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0

[R6-ospf-1]a 2

[R6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.224.0

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

[R7]ospf 1

[R7-ospf-1]a 3

[R7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.224.0

[R9]ospf 1

[R9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0

[R9-ospf-1]q

[R12]ospf 1

[R12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0

8. 防环

[R3]ip route-static 172.16.32.0 19 null0

[R6]ip route-static 172.16.64.0 19 null0

[R7]ip route-static 172.16.96.0 19 null0

[R9]ip route-static 172.16.128.0 19 null0

[R12]ip route-static 172.16.160.0 19 null0

9.做特殊区域,精简

[R1]ospf 1

[R1-ospf-1]a 1

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

[R2]ospf 1

[R2-ospf-1]a 1

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

[R3-ospf-1]a 1

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

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

[R7-ospf-1-area-0.0.0.3]nssa no-summary

[r8-ospf-1]a 3

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

R9-ospf-1]a 3

[R9-ospf-1-area-0.0.0.3]nssa no-summary

9. 下发默认缺省

[R9]ospf 2

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

10. 加快收敛

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ospf timer hello 1

[R2]int g0/0/0

[R2-GigabitEthernet0/0/0]ospf timer hello 1

[R3]int g0/0/0

[R3-GigabitEthernet0/0/0]ospf timer hello 1

11. 保障更新安全

[R6-ospf-1]a 2

[R6-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher wdy123

[R11-ospf-1]a 2

[R11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher wdy123

[R12-ospf-1]a 2

[R12-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher wdy123

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Z1412jun

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值