• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

H3C園區盒式交換機 CLI快速配置指南-6W104

  • 發布時間:2025/5/12 19:56:54
  • 瀏覽量:
  • 下載量:

20-RIP基本功能快速配置指南

本章節下載  (183.82 KB)

20-RIP基本功能快速配置指南

RIP基本功能快速配置指南

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2024 bobty下载软件 版權所有,保留一切權利。

非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。

除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。

本文檔中的信息可能變動,恕不另行通知。



1  RIP基本功能配置

1.1  簡介

本案例介紹RIP基本功能的配置方法。

1.2  組網需求

圖1示,要求所有交換機均運行RIP-2協議,Host A和Host B兩台主機能互相通信。

圖1 RIP基本配置組網圖

 

1.3  配置步驟

1. 配置Host A和Host B

為Host A配置IP地址為30.1.1.2,掩碼為255.255.255.0,網關地址為30.1.1.1。

為Host B配置IP地址為40.1.1.2,掩碼為255.255.255.0,網關地址為40.1.1.1。

2. 配置Switch A

# 創建VLAN,在VLAN中加入對應的端口,並配置各VLAN接口的IP地址。

<SwitchA> system-view

[SwitchA] vlan 100

[SwitchA-vlan100] port gigabitethernet 1/0/1

[SwitchA-vlan100] quit

[SwitchA] vlan 300

[SwitchA-vlan300] port gigabitethernet 1/0/2

[SwitchA-vlan300] quit

[SwitchA] interface vlan-interface 100

[SwitchA-Vlan-interface100] ip address 10.1.1.1 24

[SwitchA-Vlan-interface100] quit

[SwitchA] interface vlan-interface 300

[SwitchA-Vlan-interface300] ip address 30.1.1.1 24

[SwitchA-Vlan-interface300] quit

# 配置RIP-2。

[SwitchA] rip

[SwitchA-rip-1] network 10.1.1.0

[SwitchA-rip-1] network 30.1.1.0

[SwitchA-rip-1] version 2

[SwitchA-rip-1] undo summary

[SwitchA-rip-1] quit

# 保存配置。

[SwitchA] save force

3. 配置Switch B

# 創建VLAN,在VLAN中加入對應的端口,並配置各VLAN接口的IP地址。

<SwitchB> system-view

[SwitchB] vlan 100

[SwitchB-vlan100] port gigabitethernet 1/0/1

[SwitchB-vlan100] quit

[SwitchB] vlan 200

[SwitchB-vlan200] port gigabitethernet 1/0/2

[SwitchB-vlan200] quit

[SwitchB] interface vlan-interface 100

[SwitchB-Vlan-interface100] ip address 10.1.1.2 24

[SwitchB-Vlan-interface100] quit

[SwitchB] interface vlan-interface 200

[SwitchB-Vlan-interface200] ip address 20.1.1.1 24

[SwitchB-Vlan-interface200] quit

# 配置RIP-2。

[SwitchB] rip

[SwitchB-rip-1] network 10.1.1.0

[SwitchB-rip-1] network 20.1.1.0

[SwitchB-rip-1] version 2

[SwitchB-rip-1] undo summary

[SwitchB-rip-1] quit

# 保存配置。

[SwitchB] save force

4. 配置Switch C

# 創建VLAN,在VLAN中加入對應的端口,並配置各VLAN接口的IP地址。

<SwitchC> system-view

[SwitchC] vlan 200

[SwitchC-vlan200] port gigabitethernet 1/0/1

[SwitchC-vlan200] quit

[SwitchC] vlan 400

[SwitchC-vlan400] port gigabitethernet 1/0/2

[SwitchC-vlan400] quit

[SwitchC] interface vlan-interface 200

[SwitchC-Vlan-interface200] ip address 20.1.1.2 24

[SwitchC-Vlan-interface200] quit

[SwitchC] interface vlan-interface 400

[SwitchC-Vlan-interface400] ip address 40.1.1.1 24

[SwitchC-Vlan-interface400] quit

# 配置RIP-2。

[SwitchC] rip

[SwitchC-rip-1] network 20.1.1.0

[SwitchC-rip-1] network 40.1.1.0

[SwitchC-rip-1] version 2

[SwitchC-rip-1] undo summary

[SwitchC-rip-1] quit

# 保存配置。

[SwitchC] save force

1.4  驗證配置

# 查看Switch A的RIP路由表信息。

[SwitchA] display rip 1 route

 Route Flags: R - RIP, T - TRIP

              P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect

              D - Direct, O - Optimal, F - Flush to RIB

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

 Peer 10.1.1.2 on Vlan-interface100

      Destination/Mask        Nexthop           Cost    Tag     Flags   Sec

      20.1.1.0/24             10.1.1.2          1       0       RAOF    27

      40.1.1.0/24             10.1.1.2          2       0       RAOF    27

 Local route

      Destination/Mask        Nexthop           Cost    Tag     Flags   Sec

      10.1.1.0/24             0.0.0.0           0       0       RDOF    -

      30.1.1.0/24             0.0.0.0           0       0       RDOF    -

# 查看Switch B的RIP路由表信息。

[SwitchB] display rip 1 route

 Route Flags: R - RIP, T - TRIP

              P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect

              D - Direct, O - Optimal, F - Flush to RIB

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

 Peer 10.1.1.1 on Vlan-interface100

      Destination/Mask        Nexthop           Cost    Tag     Flags   Sec

      30.1.1.0/24             10.1.1.1          1       0       RAOF    0

 Peer 20.1.1.2 on Vlan-interface200

      Destination/Mask        Nexthop           Cost    Tag     Flags   Sec

      40.1.1.0/24             20.1.1.2          1       0       RAOF    9

 Local route

      Destination/Mask        Nexthop           Cost    Tag     Flags   Sec

      20.1.1.0/24             0.0.0.0           0       0       RDOF    -

      10.1.1.0/24             0.0.0.0           0       0       RDOF    -

# 查看Switch C的RIP路由表信息。

[SwitchC] display rip 1 route

 Route Flags: R - RIP, T - TRIP

              P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect

              D - Direct, O - Optimal, F - Flush to RIB

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

 Peer 20.1.1.1 on Vlan-interface200

      Destination/Mask        Nexthop           Cost    Tag     Flags   Sec

      10.1.1.0/24             20.1.1.1          1       0       RAOF    32

      30.1.1.0/24             20.1.1.1          2       0       RAOF    32

 Local route

      Destination/Mask        Nexthop           Cost    Tag     Flags   Sec

      20.1.1.0/24             0.0.0.0           0       0       RDOF    -

      40.1.1.0/24             0.0.0.0           0       0       RDOF    -

# 在Host A上使用ping命令驗證Host B是否可達(假定主機安裝的操作係統為Windows XP)。

C:\Documents and Settings\Administrator>ping 40.1.1.2

 

Pinging 40.1.1.2 with 32 bytes of data:

 

Reply from 40.1.1.2: bytes=32 time=1ms TTL=126

Reply from 40.1.1.2: bytes=32 time=1ms TTL=126

Reply from 40.1.1.2: bytes=32 time=1ms TTL=126

Reply from 40.1.1.2: bytes=32 time=1ms TTL=126

 

Ping statistics for 40.1.1.2:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 1ms, Maximum = 1ms, Average = 1ms

1.5  配置文件

·     Switch A:

#

rip 1

 undo summary

 version 2

 network 10.0.0.0

 network 30.0.0.0

#

vlan 100

#

vlan 300

#

interface Vlan-interface100

 ip address 10.1.1.1 255.255.255.0

#

interface Vlan-interface300

 ip address 30.1.1.1 255.255.255.0

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 100

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 300

#

·     Switch B :

#

rip 1

 undo summary

 version 2

 network 10.0.0.0

 network 20.0.0.0

#

vlan 100

#

vlan 200

#

interface Vlan-interface100

 ip address 10.1.1.2 255.255.255.0

#

interface Vlan-interface200

 ip address 20.1.1.1 255.255.255.0

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 100

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 200

#

·     Switch C :

#

rip 1

 undo summary

 version 2

 network 20.0.0.0

 network 40.0.0.0

#

vlan 200

#

vlan 400

#

interface Vlan-interface200

 ip address 20.1.1.2 255.255.255.0

#

interface Vlan-interface400

 ip address 40.1.1.1 255.255.255.0

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 200

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 400

#

1.6  相關資料

·     產品配套“三層技術-IP路由配置指導”中的“RIP”。

·     產品配套“三層技術-IP路由命令參考”中的“RIP”。

 

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們