天天看点

华为OSPF多区域实验

华为OSPF多区域实验

  R3配置 <Huawei>sy   进视图模式

[Huawei]un in en       关闭消息

[Huawei]sysname R3     修改路由器名字

[R3]interface Ethernet 0/0/0     进接口配置ip地址

[R3-Ethernet0/0/0]ip address 35.1.1.1 255.255.255.252

[R3-Ethernet0/0/0]un shut           开启

Info: Interface Ethernet0/0/0 is not shutdown.

[R3-Ethernet0/0/0]int loop 0     配置环回口测试用的

[R3-LoopBack0]ip address 3.3.3.3 255.255.255.255

[R3-LoopBack0]q

[R3]router id 3.3.3.3     路由ID 

[R3]ospf      进入OSPF的进程,(进程号有1-65535个号, 只运行一个OSPF路由进程,则通常在命令中不指定参数process-id,即默认process-id为1)

[R3-ospf-1]area 2   确定区域 在区域里通告网段   (后面跟反掩码)

[R3-ospf-1-area-0.0.0.2]network 35.1.1.0 0.0.0.3

[R3-ospf-1-area-0.0.0.2]network 3.3.3.3 0.0.0.0

[R3]user-interface vty 0 4    开启远程控制

[R3-ui-vty0-4]authentication-mode password      密码模式

[R3-ui-vty0-4]set authentication password cipher 123 [R3-ui-vty0-4]user privilege level 3     用户等级

[R3-ui-vty0-4]q

[R3]super password cipher abc   视图密码   R4配置 <Huawei>sy

[Huawei]sysname R4

[R4]un in en

[R4]interface Eth 0/0/0 

[R4-Ethernet0/0/0]ip address 46.1.1.1 30

[R4-Ethernet0/0/0]un shut

[R4-Ethernet0/0/0]int loop 0

[R4-LoopBack0]ip address 4.4.4.4 32

[R4-LoopBack0]q

[R4]router id 4.4.4.4

[R4]ospf

[R4-ospf-1]area 1 

[R4-ospf-1-area-0.0.0.1]network 4.4.4.4 0.0.0.0 

[R4-ospf-1-area-0.0.0.1]network 46.1.1.0 0.0.0.3

[R4-ospf-1-area-0.0.0.1]q

[R4-ospf-1]q [R4]ping 3.3.3.3

  PING 3.3.3.3: 56  data bytes, press CTRL_C to break

    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=253 time=80 ms

    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=253 time=80 ms

    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=253 time=110 ms

    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=253 time=80 ms

    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=253 time=60 ms   --- 3.3.3.3 ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 60/82/110 ms

[R4]display ospf lsdb                  OSPF Process 1 with Router ID 4.4.4.4

   Link State Database            Area: 0.0.0.1

 Type      LinkState ID    AdvRouter          Age  Len   Sequence   Metric

 Router    4.4.4.4         4.4.4.4            222  48    80000006       1

 Router    6.6.6.6         6.6.6.6            226  36    80000003       1

 Network   46.1.1.1        4.4.4.4            222  32    80000002       0

 Sum-Net   6.6.6.6         6.6.6.6            232  28    80000001       0

 Sum-Net   56.1.1.0        6.6.6.6            232  28    80000001    1562

 Sum-Net   35.1.1.0        6.6.6.6             71  28    80000001    1563

 Sum-Net   5.5.5.5         6.6.6.6            232  28    80000001    1562

 Sum-Net   3.3.3.3         6.6.6.6             67  28    80000001    1563

[R4] User interface con0 is available

<R4>sy

[R4]user-interface vty 0 4

[R4-ui-vty0-4]authentication-mode password  

[R4-ui-vty0-4]set authentication password cipher 110

[R4-ui-vty0-4]user privilege level 3

[R4-ui-vty0-4]q

[R4]super password cipher abd

[R4]q

R5配置 Huawei>sy

[Huawei]un in en

[Huawei]sysname R5

[R5]interface Serial 0/0/0

[R5-Serial0/0/0]ip address 56.1.1.1 30

[R5-Serial0/0/0]un shut

Info: Interface Serial0/0/0 is not shutdown. 

[R5-Serial0/0/0]q

[R5]interface Eth 0/0/0 

[R5-Ethernet0/0/0]ip address 35.1.1.2 30

[R5-Ethernet0/0/0]un shut

Info: Interface Ethernet0/0/0 is not shutdown.

[R5-Ethernet0/0/0]int loop 0 

[R5-LoopBack0]ip address 5.5.5.5 32

[R5-LoopBack0]q

[R5]router id 5.5.5.5

[R5]ospf

[R5-ospf-1]area 0

[R5-ospf-1-area-0.0.0.0]network 56.1.1.0 0.0.0.3 

[R5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0

[R5-ospf-1-area-0.0.0.0]area 2 [R5-ospf-1-area-0.0.0.2]network 35.1.1.0 0.0.0.3

  R6配置 <Huawei>sy

[Huawei]un in en

[Huawei]sysname R6

[R6]interface Serial 0/0/0 

[R6-Serial0/0/0]ip address 56.1.1.2 30

[R6-Serial0/0/0]un shut

Info: Interface Serial0/0/0 is not shutdown.

[R6-Serial0/0/0]q

[R6]interface Eth 0/0/0 

[R6-Ethernet0/0/0]ip address 46.1.1.2 30

[R6-Ethernet0/0/0]un shut

Info: Interface Ethernet0/0/0 is not shutdown.

[R6-Ethernet0/0/0]int loop 0

[R6-LoopBack0]ip address 6.6.6.6 32

[R6-LoopBack0]q

[R6]router id 6.6.6.6

[R6]ospf

[R6-ospf-1]area 0 

[R6-ospf-1-area-0.0.0.0]network 56.1.1.0 0.0.0.3

[R6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0

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

[R6-ospf-1-area-0.0.0.1]network 46.1.1.0 0.0.0.3     测试   <R4>telnet 3.3.3.3

Trying 3.3.3.3 ...

Press CTRL+K to abort

Connected to 3.3.3.3 ...

Login authentication

Password:

Info: The max number of VTY users is 10, and the number

      of current VTY users on line is 1.

      The current login time is 2013-04-18 12:17:14.

<R3>sy

Enter system view, return user view with Ctrl+Z.

[R3]

华为OSPF多区域实验

说明一下:查看LSA时router 表示 1类LSA   network 表示2类LSA  sum-net表示三类 ASB4类   ASE由ASBR产生 表示5类    NSSA 由NSSA ABR产生 表示7类

华为OSPF多区域实验