H3C OSPF基本配置 联系客服

发布时间 : 星期二 文章H3C OSPF基本配置更新完毕开始阅读30d7cca2284ac850ad024211

RTA 配置如下: sys

System View: return to User View with Ctrl+Z. [H3C]sysname RTA

[RTA]interface LoopBack 0

[RTA-LoopBack0]ip address 1.1.1.1 32 [RTA-LoopBack0]quit [RTA]interface Ethernet 0/0

[RTA- Ethernet 0/0]ip address 10.0.0.1 24 [RTA- Ethernet 0/0]quit [RTA]interface Ethernet 0/1

[RTA- Ethernet 0/1]ip address 20.0.0.1 24 [RTA- Ethernet 0/1]quit [RTA]router id 1.1.1.1 [RTA]ospf 1

[RTA-ospf-1]area 0

[RTA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.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 RTB 配置如下: [H3C]sysname RTB

[RTB]interface Ethernet 0/0 [RTB- Ethernet 0/0]

[RTB- Ethernet 0/0]ip address 10.0.0.2 24 [RTB- Ethernet 0/0]quit [RTB]interface Ethernet0/1

[RTB- Ethernet0/1]ip address 30.0.0.1 24 [RTB- Ethernet0/11]quit [RTB]interface LoopBack 0

[RTB-LoopBack0]ip address 2.2.2.2 32

[RTB-LoopBack0]quit [RTB]router id 2.2.2.2 [RTB]ospf 1

[RTB-ospf-1]area 0

[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]network 10.0.0.0 0.0.0.255 [RTB-ospf-1-area-0.0.0.0]network 30.0.0.0 0.0.0.255 [RTB-ospf-1-area-0.0.0.0]quit

RTC 配置如下: [H3C]sysname RTC

[RTC]interface Ethernet0/0

[RTC- Ethernet0/0]ip address 30.0.0.2 24 [RTC- Ethernet0/0]quit [RTC]interface Ethernet0/1

[RTC- Ethernet0/1]ip address 20.0.0.2 24 [RTC- Ethernet0/1]quit [RTC]interface LoopBack 0 [RTC-LoopBack0]ip add

[RTC-LoopBack0]ip address 3.3.3.3 32 [RTC-LoopBack0]quit [RTC]router id 3.3.3.3 [RTC]ospf 1

[RTC-ospf-1]area 0

[RTC-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0 [RTC-ospf-1-area-0.0.0.0]network 30.0.0.0 0.0.0.255 [RTC-ospf-1-area-0.0.0.0]network 20.0.0.0 0.0.0.255

查看命令如下:

[RTA]display ip routing-table Routing Tables: Public

Destinations : 11 Routes : 11

Destination/Mask Proto Pre Cost NextHop

1.1.1.1/32 Direct 0 0 127.0.0.1 2.2.2.2/32 OSPF 10 1562 10.0.0.2 3.3.3.3/32 OSPF 10 1562 20.0.0.2 10.0.0.0/24 Direct 0 0 10.0.0.1 10.0.0.1/32 Direct 0 0 127.0.0.1 10.0.0.2/32 Direct 0 0 10.0.0.2 20.0.0.0/24 Direct 0 0 20.0.0.1 20.0.0.1/32 Direct 0 0 127.0.0.1 20.0.0.2/32 Direct 0 0 20.0.0.2 Interface InLoop0 eth0/0 eth0/1 eth0/0 InLoop0 eth0/0 eth0/1 InLoop0 eth0/1

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

[RTA]display ospf brief

OSPF Process 1 with Router ID 1.1.1.1 OSPF Protocol Information

RouterID: 1.1.1.1 Border Router: Route Tag: 0

Multi-VPN-Instance is not enabled

Applications Supported: MPLS Traffic-Engineering SPF-schedule-interval: 5 0 5000 LSA generation interval: 5 0 5000 LSA arrival interval: 1000

Default ASE parameters: Metric: 1 Tag: 1 Type: 2 Route Preference: 10

ASE Route Preference: 150 SPF Computation Count: 8 RFC 1583 Compatible

Graceful restart interval: 120

Area Count: 1 Nssa Area Count: 0 ExChange/Loading Neighbors: 0

Area: 0.0.0.0 (MPLS TE not enabled) Authtype: None Area flag: Normal SPF Scheduled Count: 8 ExChange/Loading Neighbors: 0

Interface: 1.1.1.1 (LoopBack0)

Cost: 1 State: Loopback Type: PTP MTU: 1536 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

Interface: 10.0.0.1 (ethernet0/0) --> 10.0.0.2

Cost: 1562 State: P-2-P Type: PTP MTU: 1500 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1

Interface: 20.0.0.1 (ethernet0/1) --> 20.0.0.2

Cost: 1562 State: P-2-P Type: PTP MTU: 1500 Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1