RIP and OSPF network topology based on Huawei equipment

This chapter mainly related to RIPv2, OSPF multi-area, single-arm and re-distribute the routing configuration commands

Topology as follows:

RIP and OSPF network topology based on Huawei equipment

Recommended steps:

  • Configuring the device according to the IP address associated with the topology of FIG.
  • SW1 create vlan, to add the interface vlan, configured to exchange routing trunk link
  • R2-arm configuration route opener interfaces, communication between different vlan
  • R1 and R2 router configuration RIPv2, declaring a directly connected network, configuration summary RIP
  • OSPF multi-zone configuration, weight distribution
  • Open the remote management capabilities
  • Bridging remote PC access

    Start the configuration:

  • Configuring the device according to the IP address associated with the topology of FIG.
    1)路由器R1配置IP地址
    [R1]int LoopBack 1         #创建loop back 1接口
    [R1-LoopBack1]ip add 172.16.1.1 24    #loo1接口配置IP地址
    [R1-LoopBack1]quit              #保存退出
    [R1]int LoopBack 2           #创建loop back 2接口
    [R1-LoopBack2]ip add 172.16.2.1 24     #loo2接口配置IP地址
    [R1-LoopBack2]quit
    [R1]int LoopBack 3           #创建loop back 3接口
    [R1-LoopBack3]ip add 172.16.3.1 24         #loo3接口配置IP地址
    [R1-LoopBack3]quit 
    [R1]int LoopBack 4         #创建loop back 4接口
    [R1-LoopBack4]ip add 172.16.4.1 24       #loo3接口配置IP地址
    [R1-LoopBack4]quit
    [R1]int g 0/0/0          #进入G0/0/0接口
    [R1-GigabitEthernet0/0/0]ip add 192.168.10.1 24   #配置IP地址
    [R1-GigabitEthernet0/0/0]quit   
    [R1]display ip int b     #查看R1接口IP 

    RIP and OSPF network topology based on Huawei equipment

    2)路由器R2配置IP地址
    [R2]int LoopBack 1             #创建loop back 1接口
    [R2-LoopBack1]ip add 1.1.1.1 32    #loo 1接口配置IP地址
    [R2-LoopBack1]quit
    [R2]int g 0/0/0                   #进入G0/0/0接口
    [R2-GigabitEthernet0/0/0]ip add 192.168.10.2 24      #配置IP地址
    [R2-GigabitEthernet0/0/0]quit
    [R2]int g 0/0/1           #进入G 0/01接口
    [R2-GigabitEthernet0/0/1]ip add 192.168.20.1 24   #配置IP地址
    [R2-GigabitEthernet0/0/1]quit 
    [R2]display ip int b     #查看R2接口IP 

    RIP and OSPF network topology based on Huawei equipment

    3)路由器R3配置IP地址
    [R3]int LoopBack 1                #创建loop back 1接口
    [R3-LoopBack1]ip add 2.2.2.2 32          #配置IP地址
    [R3-LoopBack1]quit
    [R3]int g 0/0/1                            #进入G0/0/1接口 
    [R3-GigabitEthernet0/0/1]ip add 192.168.20.2 24      #配置IP地址 
    [R3-GigabitEthernet0/0/1]quit
    [R3]int g 0/0/0                                 #进入G0/0/0接口
    [R3-GigabitEthernet0/0/0]ip add 192.168.30.1 24         #配置IP地址  
    [R3-GigabitEthernet0/0/0]quit
    [R3]display ip int b            #查看R3接口IP 

    RIP and OSPF network topology based on Huawei equipment

4)路由器R4配置IP地址
[R4]int LoopBack 1             #创建loop back 1接口
[R4-LoopBack1]ip add 3.3.3.3 32            #配置IP地址
[R4-LoopBack1]quit

[R4]int g 0/0/0                            #进入G0/0/0接口
[R4-GigabitEthernet0/0/0]ip add 192.168.30.2 24         #配置IP地址  
[R4-GigabitEthernet0/0/0]quit

[R4]int g 0/0/1                       #进入G0/0/1接口 
[R4-GigabitEthernet0/0/1]ip add 192.168.40.1 24          #配置IP地址  
[R4-GigabitEthernet0/0/1]quit
[R4]display ip int b            #查看R4接口IP 

RIP and OSPF network topology based on Huawei equipment
5) bridging and vlan host PC, IP and gateway configuration
RIP and OSPF network topology based on Huawei equipment
RIP and OSPF network topology based on Huawei equipment
RIP and OSPF network topology based on Huawei equipment

  • SW1 create vlan, to add the interface vlan, configured to exchange routing trunk link
    1)SW1创建vlan10和vlan20
    [SW1]vlan batch 10 20           #批量创建vlan
    2)将接口加入vlan
    [SW1]int eth 0/0/2                #进入0/0/2接口
    [SW1-Ethernet0/0/2]port link-ty access       #设置为接入链路
    [SW1-Ethernet0/0/2]port default vlan 10       #加入vlan10 
    [SW1-Ethernet0/0/2]quit
    [SW1]int eth 0/0/3                      #进入0/0/3接口
    [SW1-Ethernet0/0/3]port link-type access      #设置为接入链路
    [SW1-Ethernet0/0/3]port default vlan 20             #加入vlan 20
    [SW1-Ethernet0/0/2]quit
    [SW1]display vlan       #查看接口是否加入vlan

    RIP and OSPF network topology based on Huawei equipment

    3)将交换机Ethernet0/0/1接口配置为trunk链路
    [SW1]int eth 0/0/1           #进入Ethernet0/0/1接口
    [SW1-Ethernet0/0/1]port link-type trunk            #设置为trunk链路
    [SW1-Ethernet0/0/1]port trunk allow-pass vlan all     #设置承载所有vlan
    [SW1]display vlan       #查看trunk链路是否配置成功

    RIP and OSPF network topology based on Huawei equipment

  • R2-arm configuration route opener interfaces, communication between different vlan
    1)配置子接口
    [R2]int GigabitEthernet 0/0/2.10         #创建子接口
    [R2-GigabitEthernet0/0/2.10]ip add 192.168.50.254 24      #子接口配置IP地址
    [R2-GigabitEthernet0/0/2.10]dot1q termination vid 10     #子接口为vlan 10服务
    [R2-GigabitEthernet0/0/2.10]arp broadcast enable          #开启ARP广播
    [R2-GigabitEthernet0/0/2.10]quit
    [R2]int GigabitEthernet 0/0/2.20                     #创建子接口
    [R2-GigabitEthernet0/0/2.20]ip add 192.168.60.254 24       #子接口配置IP地址
    [R2-GigabitEthernet0/0/2.20]dot1q termination vid 20           #子接口为vlan 10服务 
    [R2-GigabitEthernet0/0/2.20]arp broadcast enable             #开启ARP广播
    [R2-GigabitEthernet0/0/2.20]quit
    [R2]displdisplay ip int b     #查看子接口是否开启

    RIP and OSPF network topology based on Huawei equipment
    Vlan verify communication between different
    RIP and OSPF network topology based on Huawei equipment

  • R1 and R2 router configuration RIPv2, declaring a directly connected network, configuration summary RIP
    1)R1配置RIPv2,宣告直连
    [R1]rip 1           #启动rip进程号
    [R1-rip-1]version 2         #设置rip版本v2
    [R1-rip-1]network 192.168.10.0      #宣告直连网络
    [R1-rip-1]network 172.16.0.0           #宣告直连网络
    [R1-rip-1]quit
    2)R2配置RIPv2,宣告直连
    [R2]rip 1                     #启动rip进程号
    [R2-rip-1]version 2         #设置rip版本v2
    [R2-rip-1]network 192.168.10.0        #宣告直连网络
    [R2] display ip routing-table protocol rip        #查看rip详细信息

    RIP and OSPF network topology based on Huawei equipment

    3)R1配置路由汇总
    [R1]int G0/0/0                   #进入G0/0/0接口
    [R1-GigabitEthernet0/0/0]rip summary-address 172.16.0.0 255.255.0.0     #配置汇总
    [R2] display ip routing-table protocol rip        #查看汇总后rip的详细信息

    RIP and OSPF network topology based on Huawei equipment

  • OSPF multi-zone configuration, weight distribution
    1)R2配置OSPF
    [R2]ospf 1 router-id 1.1.1.1     #指定OSPF进程号,指定router-id
    [R2-ospf-1]area 0                  #指定OSPF区域
    [R2-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0        #宣告直连网络,掩码写反码
    [R2-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255   #宣告直连网络
    2)R3配置OSPF
    [R3]ospf 1 router-id 2.2.2.2            #指定OSPF进程号,指定router-id
    [R3-ospf-1]area 0                 #指定OSPF区域
    [R3-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0     #宣告直连网络
    [R3-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255         #宣告直连网络
    [R3-ospf-1-area-0.0.0.0]quit
    [R3-ospf-1]area 1           #指定OSPF区域 
    [R3-ospf-1-area-0.0.0.1]network 192.168.30.0 0.0.0.255      #宣告直连网络
    3)R4配置OSPF
    [R4]ospf 1 router-id 3.3.3.3     #指定OSPF进程号,指定router-id
    [R4-ospf-1]area 1             #指定OSPF区域 
    [R4-ospf-1-area-0.0.0.1]network 3.3.3.3 0.0.0.0            #宣告直连网络 
    [R4-ospf-1-area-0.0.0.1]network 192.168.30.0 0.0.0.255     #宣告直连网络
    [R4-ospf-1-area-0.0.0.1]quit
    [R4]display ip routing-table protocol ospf     #查看OSPF详细信息

    RIP and OSPF network topology based on Huawei equipment
    RIP and OSPF network topology based on Huawei equipment
    RIP and OSPF network topology based on Huawei equipment

    4)OSPF重分发到RIP、RIP重分发到OSPF,
    [R2]rip 1            #进入rip
    [R2-rip-1]import-route ospf 1 cost 1   #将OSPF重分发到rip中
    [R2]ospf 1              #进入ospf
    [R2-ospf-1]import-route rip 1 cost 1     #将rip重分发到ospf中

    RIP and OSPF network topology based on Huawei equipment
    RIP and OSPF network topology based on Huawei equipment

    5) OSPF重分发直连路由
    [R2]ospf 1          #R2进入ospf
    [R2-ospf-1]import-route direct type 2   #重分发直连路由
    [R4]ospf 1           #R4进入ospf
    [R4-ospf-1]import-route direct type 2        #重分发直连路由

    RIP and OSPF network topology based on Huawei equipment
    RIP and OSPF network topology based on Huawei equipment

  • Open the remote management capabilities
    [R1]user-interface vty 0 4       #允许5个终端访问
    [R1-ui-vty0-4]authentication-mode password      #验证实验密码
    [R1-ui-vty0-4]set authentication password cipher pwd@123     #配置密文密码pwd@123
    [R1-ui-vty0-4]user privilege level 15              #配置管理权限
    [R1-ui-vty0-4]quit
  • Bridging remote PC access
    RIP and OSPF network topology based on Huawei equipment

Guess you like

Origin blog.51cto.com/14156658/2425758