通信人家园

标题: 单区域OSPF配置  [查看完整版帖子] [打印本页]

时间:  2020-11-9 11:36
作者: xwgzjq     标题: 单区域OSPF配置

单区域OSPF配置

路由器的配置就是先在接口下声明对应地址,然后进行OSPF协方的建立

<Huawei>SYS
[Huawei]SYS r1
[r1]interface LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 32
[r1-LoopBack0]q
[r1]inter g0/0/2
[r1-GigabitEthernet0/0/2]ip add 192.168.0.1 24
Jul 29 2020 21:25:22-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r1-GigabitEthernet0/0/2]inter g0/0/0
[r1-GigabitEthernet0/0/0]ip add 10.1.1.1 24
Jul 29 2020 21:26:52-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]q
[r1]ospf 1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]net       
[r1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.0.255

[r1]dis ospf rout
         OSPF Process 1 with Router ID 1.1.1.1
                  Routing Tables

Routing for Network
Destination        Cost  Type       NextHop         AdvRouter       Area
1.1.1.1/32         0     Stub       1.1.1.1         1.1.1.1         0.0.0.0
10.1.1.0/24        1     Transit    10.1.1.1        1.1.1.1         0.0.0.0
192.168.0.0/24     1     Stub       192.168.0.1     1.1.1.1         0.0.0.0
2.2.2.2/32         1     Stub       10.1.1.2        2.2.2.2         0.0.0.0
192.168.2.0/24     2     Stub       10.1.1.2        2.2.2.2         0.0.0.0

Total Nets: 5  
Intra Area: 5  Inter Area: 0  ASE: 0  NSSA: 0


<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]inter loop 0
[R2-LoopBack0]ip add 2.2.2.2 32
[R2-LoopBack0]inter g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.2.1 24
Jul 29 2020 21:35:05-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R2-GigabitEthernet0/0/1]inter g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.1.1.2 24
Jul 29 2020 21:35:31-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] q
[R2]router id 2.2.2.2
[R2]ospf
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[R2]dis ospf rout

         OSPF Process 1 with Router ID 2.2.2.2
                  Routing Tables

Routing for Network
Destination        Cost  Type       NextHop         AdvRouter       Area
2.2.2.2/32         0     Stub       2.2.2.2         2.2.2.2         0.0.0.0
10.1.1.0/24        1     Transit    10.1.1.2        2.2.2.2         0.0.0.0
192.168.2.0/24     1     Stub       192.168.2.1     2.2.2.2         0.0.0.0
1.1.1.1/32         1     Stub       10.1.1.1        1.1.1.1         0.0.0.0
192.168.0.0/24     2     Stub       10.1.1.1        1.1.1.1         0.0.0.0

Total Nets: 5  
Intra Area: 5  Inter Area: 0  ASE: 0  NSSA: 0





通信人家园 (https://www.txrjy.com/) Powered by C114