H3C OSPF基本配置.docx
H3C OSPF基本配置RTA 配置如下: <H3C>sys System View: return to User View with Ctrl+Z. H3Csysname RTA RTAinterface LoopBack 0 RTA-LoopBack0ip address 1.1.1.1 32 RTA-LoopBack0quit RTAinterface Ethernet 0/0 RTA- Ethernet 0/0ip address 10.0.0.1 24 RTA- Ethernet 0/0quit RTAinterface Ethernet 0/1 RTA- Ethernet 0/1ip address 20.0.0.1 24 RTA- Ethernet 0/1quit RTArouter id 1.1.1.1 RTAospf 1 RTA-ospf-1area 0 RTA-ospf-1-area-0.0.0.0network 1.1.1.1 0.0.0.0 RTA-ospf-1-area-0.0.0.0network 10.0.0.0 0.0.0.255 RTA-ospf-1-area-0.0.0.0network 20.0.0.0 0.0.0.255 RTB 配置如下: H3Csysname RTB RTBinterface Ethernet 0/0 RTB- Ethernet 0/0 RTB- Ethernet 0/0ip address 10.0.0.2 24 RTB- Ethernet 0/0quit RTBinterface Ethernet0/1 RTB- Ethernet0/1ip address 30.0.0.1 24 RTB- Ethernet0/11quit RTBinterface LoopBack 0 RTB-LoopBack0ip address 2.2.2.2 32 RTB-LoopBack0quit RTBrouter id 2.2.2.2 RTBospf 1 RTB-ospf-1area 0 RTB-ospf-1-area-0.0.0.0network 2.2.2.2 0.0.0.0 RTB-ospf-1-area-0.0.0.0network 10.0.0.0 0.0.0.255 RTB-ospf-1-area-0.0.0.0network 30.0.0.0 0.0.0.255 RTB-ospf-1-area-0.0.0.0quit RTC 配置如下: H3Csysname RTC RTCinterface Ethernet0/0 RTC- Ethernet0/0ip address 30.0.0.2 24 RTC- Ethernet0/0quit RTCinterface Ethernet0/1 RTC- Ethernet0/1ip address 20.0.0.2 24 RTC- Ethernet0/1quit RTCinterface LoopBack 0 RTC-LoopBack0ip add RTC-LoopBack0ip address 3.3.3.3 32 RTC-LoopBack0quit RTCrouter id 3.3.3.3 RTCospf 1 RTC-ospf-1area 0 RTC-ospf-1-area-0.0.0.0network 3.3.3.3 0.0.0.0 RTC-ospf-1-area-0.0.0.0network 30.0.0.0 0.0.0.255 RTC-ospf-1-area-0.0.0.0network 20.0.0.0 0.0.0.255 查看命令如下: RTAdisplay 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 RTAdisplay 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