您的位置:首页 > 其它

H3C设备之多区域OSPF

2012-08-13 18:59 267 查看
多区域OSPF基本配置:





配置多区域OSPF,使client A可以和clientB互访:
[RTA]int e0/1
[RTA-Ethernet0/1]ip add 10.0.0.2 24
[RTA-Ethernet0/1]undo shutdown
[RTA]int e0/0
[RTA-Ethernet0/0]ip add 20.0.0.1 24
[RTA-Ethernet0/0]undo shutdown
[RTA]int loop0
[RTA-LoopBack0]ip add 1.1.1.1 32

[RTB]int e0/0
[RTB-Ethernet0/0]ip add 20.0.0.2 24
[RTB-Ethernet0/0]undo shutdown
[RTB-Ethernet0/0]int e0/0/1
[RTB-Ethernet0/1]ip add 30.0.0.1 24
[RTB-Ethernet0/1]undo shutdown
[RTB]int loop0
[RTB-LoopBack0]ip add 2.2.2.2 32

[RTC]int e0/0
[RTC-Ethernet0/0]ip add 30.0.0.2 24
[RTC-Ethernet0/0]int e0/1
[RTC-Ethernet0/1]ip add 10.1.0.2 24
[RTC-Ethernet0/0/1]undo shutdown
[RTC]int loop0
[RTC-LoopBack0]ip add 3.3.3.3 32
Client A:10.0.0.1 255.255.255.0 GT:10.0.0.2
Client B:10.1.0.1 255.255.255.0 GT:10.1.0.2

[RTA]router id 1.1.1.1
[RTA]ospf 1
[RTA-ospf-1]area 0
[RTA-ospf-1-area-0.0.0.0]network 10.0.0.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255
[RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0

[RTB]router id 2.2.2.2
[RTB]ospf 1
[RTB-ospf-1]area 0
[RTB-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[RTB-ospf-1-area-0.0.0.0]quit
[RTB-ospf-1]area 1
[RTB-ospf-1-area-0.0.0.1]network 30.0.0.0 0.0.0.255

[RTC]router id 3.3.3.3
[RTC]ospf 1
[RTC-ospf-1]area 1
[RTC-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[RTC-ospf-1-area-0.0.0.1]network 30.0.0.0 0.0.0.255
[RTC-ospf-1-area-0.0.0.1]network 10.1.0.0 0.0.0.255

此时RTA上已经有全网的路由信息
[RTA]disp ip routing-table
Routing Tables: Public
Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost NextHop Interface

1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.2/32 OSPF 10 10 20.0.0.2 Eth0/0/0
3.3.3.3/32 OSPF 10 20 20.0.0.2 Eth0/0/0
10.0.0.0/24 Direct 0 0 10.0.0.2 Eth0/1/0
10.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.0.0/24 OSPF 10 30 20.0.0.2 Eth0/0/0
20.0.0.0/24 Direct 0 0 20.0.0.1 Eth0/0/0
20.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
30.0.0.0/24 OSPF 10 20 20.0.0.2 Eth0/0/0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
此时两边的client可以相互访问:
C:\Documents and Settings\xiaofei>ping 10.1.0.1

Pinging 10.1.0.1 with 32 bytes of data:

Reply from 10.1.0.1: bytes=32 time=2ms TTL=252
Reply from 10.1.0.1: bytes=32 time=2ms TTL=252
Reply from 10.1.0.1: bytes=32 time=1ms TTL=252
Reply from 10.1.0.1: bytes=32 time=3ms TTL=252

Ping statistics for 10.1.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 3ms, Average = 2ms

C:\Documents and Settings\xiaofei>ping 10.0.0.1

Pinging 10.1.0.1 with 32 bytes of data:

Reply from 10.0.0.1: bytes=32 time=2ms TTL=252
Reply from 10.0.0.1: bytes=32 time=2ms TTL=252
Reply from 10.0.0.1: bytes=32 time=1ms TTL=252
Reply from 10.0.0.1: bytes=32 time=3ms TTL=252

Ping statistics for 10.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 3ms, Average = 2ms

本文出自 “小糊涂虫” 博客,请务必保留此出处http://xiaoliufei.blog.51cto.com/4021529/962508
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: