H3C ospf配置

发布时间:2019-09-15 09:58:35编辑:auto阅读(1999)

    164020576.jpg

    AR1配置

    <H3C>system-view

    [H3C]sysname AR1

    [AR1]interface GigabitEthernet 0/0/1

    [AR1-GigabitEthernet0/0/1]ip adderss10.0.0.2 24

    [AR1-GigabitEthernet0/0/1]qu

    [AR1]interface GigabitEthernet0/0/1

    [AR1-GigabitEthernet0/0/0]ipaddress 20.0.0.1 24

    [AR1-GigabitEthernet0/0/1]qu

    [AR1]router id 1.1.1.1

    [AR1]ospf

    [AR1-ospf-1]area 0

    [AR1-ospf-1-area-0.0.0.0]network1.1.1.1 0.0.0.0

    [AR1-ospf-1-area-0.0.0.0]network10.0.0.0 0.0.0.255

    [AR1-ospf-1-area-0.0.0.0]network20.0.0.0 0.0.0.255

    [AR1]dis ip routing-table 查看路由表

    Route Flags: R - relay, D - download to fib

    ------------------------------------------------------------------------------

    Routing Tables: Public

    Destinations : 12 Routes :12


    Destination/Mask Proto Pre Cost Flags NextHop Interface


    10.0.0.0/24 Direct 0 0 D 10.0.0.2 GigabitEthernet0/0/1

    10.0.0.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

    10.0.0.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

    10.1.0.0/24 OSPF 10 3 D 20.0.0.2 GigabitEthernet0/0/0

    20.0.0.0/24 Direct 0 0 D 20.0.0.1 GigabitEthernet0/0/0

    20.0.0.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0

    20.0.0.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0

    30.0.0.0/24 OSPF 10 2 D 20.0.0.2 GigabitEthernet0/0/0


    AR4配置

    <H3C>system-view

    [H3C]sysname AR4

    [AR4]interface GigabitEthernet 0/0/0

    [AR4-GigabitEthernet0/0/0]ip address20.0.0.2 24

    [AR4-GigabitEthernet0/0/0]qu

    [AR4]interface GigabitEthernet 0/0/1

    [AR4-GigabitEthernet0/0/1]ip address 30.0.0.224

    [AR4-GigabitEthernet0/0/1]qu

    [AR4]router id 3.3.3.3

    [AR4]ospf

    [AR4-ospf-1]area 0

    [AR4-ospf-1-area-0.0.0.0]network20.0.0.0 0.0.0.255

    [AR4-ospf-1-area-0.0.0.0]area1

    [AR4-ospf-1-area-0.0.0.1]network 30.0.0.00.0.0.255

    AR2配置

    <H3C>system-view

    [H3C]sysname AR2

    [AR2]interface GigabitEthernet 0/0/0

    [AR2-GigabitEthernet0/0/0]ip address 30.0.0.124

    [AR2-GigabitEthernet0/0/0]qu

    [AR2]interface GigabitEthernet 0/0/1

    [AR2-GigabitEthernet0/0/1]ip address10.1.0.2 24

    [AR2-GigabitEthernet0/0/1]qu

    [AR2]router id 2.2.2.2

    [AR2]ospf

    [AR2-ospf-1]area 1

    [AR2-ospf-1-area-0.0.0.1]network30.0.0.0 0.0.0.255

    [AR2-ospf-1-area-0.0.0.1]network 30.0.0.00.0.0.255




关键字