• 全部
  • 經驗案例
  • 典型配置
  • 技術公告
  • FAQ
  • 漏洞說明
  • 全部
  • 全部
  • 大數據引擎
  • 知了引擎
產品線
搜索
取消
案例類型
發布者
是否解決
是否官方
時間
搜索引擎
匹配模式
高級搜索

S3X00V3係列交換機OSPF多域配置方法(命令行版)

2018-11-28 發表
  • 0關注
  • 0收藏 1536瀏覽
粉絲:11人 關注:0人

組網及說明

1.1適用產品係列

本案例適用於如S3100V3-28TP-SIS3100V3-28TP-EIS3100V3-20TP-PWR-SIS3100V3-28TP-PWR-EIS3100V3係列的交換機。   

1.2配置需求

SWASWBSWCSWD都運行OSPF,並將整個自治係統劃分為3個區域。其中Switch ASwitch B作為ABR來轉發區域之間的路由。配置完成後,每台交換機都應學到AS內的到所有網段的路由。


組網圖



配置步驟

3.1 SWA配置

#創建vlan100vlan200,並把G1/0/1口加入vlan1001/0/2口加入vlan200 ,並且配置vlan100vlan200 的虛接口地址

<SWA>system-view

System View: return to User View with Ctrl+Z.

[SWA]vlan 100

[SWA-vlan100]port GigabitEthernet 1/0/1

[SWA-vlan100]quit

[SWA]vlan 200

[SWA-vlan200]port GigabitEthernet 1/0/2

[SWA-vlan200]quit

[SWA]interface vlan 100

[SWA-Vlan-interface100]ip address 192.168.0.1 255.255.255.0

[SWA-Vlan-interface100]quit

[SWA]interface vlan 200

[SWA-Vlan-interface200]ip address 192.168.1.1 255.255.255.0

[SWA-Vlan-interface200]quit

#啟動ospf協議,並設置路由器的router id

[SWA]ospf 1 router-id 192.168.1.1

#配置區域0並且發布網段

[SWA-ospf-1]area 0

[SWA-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.0.255

[SWA-ospf-1-area-0.0.0.0]quit

#配置區域1並且發布網段

[SWA-ospf-1]area 1

[SWA-ospf-1-area-0.0.0.1]network 192.168.1.0 0.0.0.255

[SWA-ospf-1-area-0.0.0.1]quit

[SWA-ospf-1]quit

#保存配置

[SWA]save force


3.2 SWB配置

#創建vlan100vlan200,並把G1/0/1口加入vlan1001/0/2口加入vlan200 ,並且配置vlan100vlan200 的虛接口地址

<SWB>system-view

System View: return to User View with Ctrl+Z.

[SWB]vlan 100

[SWB-vlan100]port GigabitEthernet 1/0/1

[SWB-vlan100]quit

[SWB]vlan 200

[SWB-vlan200]port GigabitEthernet 1/0/2

[SWB-vlan200]quit

[SWB]interface vlan 100

[SWB-Vlan-interface100]ip address 192.168.0.2 255.255.255.0

[SWB-Vlan-interface100]quit

[SWB]interface vlan 200

[SWB-Vlan-interface200]ip address 192.168.2.1 255.255.255.0

[SWB-Vlan-interface200]quit

#啟動ospf協議,並設置路由器的router id

[SWB]ospf 1 router-id 192.168.2.1

#配置區域0並且發布網段

[SWB-ospf-1]area 0

[SWB-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.0.255

[SWB-ospf-1-area-0.0.0.0]quit

#配置區域2並且發布網段

[SWB-ospf-1]area 2

[SWB-ospf-1-area-0.0.0.2]network 192.168.2.0 0.0.0.255

[SWB-ospf-1-area-0.0.0.2]quit

[SWB-ospf-1]quit

#保存配置

[SWB]save force


3.3 SWC配置

#創建vlan200vlan300,並把G1/0/1口加入vlan3001/0/2口加入vlan200 ,並且配置vlan300vlan200 的虛接口地址

<SWC>system-view

System View: return to User View with Ctrl+Z.

[SWC]vlan 300

[SWC-vlan300]port GigabitEthernet 1/0/1

[SWC-vlan300]quit

[SWC]vlan 200

[SWC-vlan200]port GigabitEthernet 1/0/2

[SWC-vlan200]quit

[SWC]interface vlan 300

[SWC-Vlan-interface300]ip address 172.16.1.1 255.255.255.0

[SWC-Vlan-interface300]quit

[SWC]interface vlan 200

[SWC-Vlan-interface200]ip address 192.168.1.2 255.255.255.0

[SWC-Vlan-interface200]quit

#啟動ospf協議,並設置路由器的router id

[SWC]ospf 1 router-id 192.168.1.2

#配置區域1並且發布網段

[SWC-ospf-1]area 1

[SWC-ospf-1-area-0.0.0.1]network 192.168.1.0 0.0.0.255

[SWC-ospf-1-area-0.0.0.1]network 172.16.1.0 0.0.0.255

[SWC-ospf-1-area-0.0.0.1]quit

[SWC-ospf-1]quit

#保存配置

[SWC]save force


3.4 SWD配置

#創建vlan200vlan300,並把G1/0/1口加入vlan3001/0/2口加入vlan200 ,並且配置vlan300vlan200 的虛接口地址

<SWD>system-view

System View: return to User View with Ctrl+Z.

[SWD]vlan 300

[SWD-vlan300]port GigabitEthernet 1/0/1

[SWD-vlan300]quit

[SWD]vlan 200

[SWD-vlan200]port GigabitEthernet 1/0/2

[SWD-vlan200]quit

[SWD]interface vlan 300

[SWD-Vlan-interface300]ip address 172.17.1.1 255.255.255.0

[SWD-Vlan-interface300]quit

[SWD]interface vlan 200

[SWD-Vlan-interface200]ip address 192.168.2.2 255.255.255.0

[SWD-Vlan-interface200]quit

#啟動ospf協議,並設置路由器的router id

[SWD]ospf 1 router-id 192.168.2.2

#配置區域1並且發布網段

[SWD-ospf-1]area 2

[SWD-ospf-1-area-0.0.0.2]network 192.168.2.0 0.0.0.255

[SWD-ospf-1-area-0.0.0.2]network 172.17.1.0 0.0.0.255

[SWD-ospf-1-area-0.0.0.2]quit

[SWD-ospf-1]quit

#保存配置

[SWD]save force

 

3.5 驗證配置

查看Switch AOSPF鄰居Full是正常狀態

[SWA]display ospf peer

         OSPF Process 1 with Router ID 192.168.1.1

               Neighbor Brief Information

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 192.168.2.1     192.168.0.2     1   32         Full/BDR          Vlan100

 Area: 0.0.0.1

 Router ID       Address         Pri Dead-Time  State             Interface

 192.168.1.2     192.168.1.2     1   36         Full/BDR          Vlan200

#查看Switch AOSPF路由信息

[SWA]display ospf routing

         OSPF Process 1 with Router ID 192.168.1.1

                  Routing Table

                Topology base (MTID 0)

 Routing for network

 Destination        Cost     Type    NextHop         AdvRouter       Area

 172.16.1.0/24      2        Stub    192.168.1.2     192.168.1.2     0.0.0.1

 172.17.1.0/24      3        Inter   192.168.0.2     192.168.2.1     0.0.0.0

 192.168.0.0/24     1        Transit 0.0.0.0         192.168.1.1     0.0.0.0

 192.168.1.0/24     1        Transit 0.0.0.0         192.168.1.1     0.0.0.1

 192.168.2.0/24     2        Inter   192.168.0.2     192.168.2.1     0.0.0.0

 Total nets: 5

 Intra area: 3  Inter area: 2  ASE: 0  NSSA: 0

#查看Switch A路由表信息,有到172.16.1.0172.17.1.0192.168.2.0的路由

[SWA]display ip routing-table

Destinations : 19       Routes : 19

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.0/32       Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

172.16.1.0/24      O_INTRA 10  2           192.168.1.2     Vlan200

172.17.1.0/24      O_INTER 10  3           192.168.0.2     Vlan100

192.168.0.0/24     Direct  0   0           192.168.0.1     Vlan100

192.168.0.0/32     Direct  0   0           192.168.0.1     Vlan100

192.168.0.1/32     Direct  0   0           127.0.0.1       InLoop0

192.168.0.255/32   Direct  0   0           192.168.0.1     Vlan100

192.168.1.0/24     Direct  0   0           192.168.1.1     Vlan200

192.168.1.0/32     Direct  0   0           192.168.1.1     Vlan200

192.168.1.1/32     Direct  0   0           127.0.0.1       InLoop0

192.168.1.255/32   Direct  0   0           192.168.1.1     Vlan200

192.168.2.0/24     O_INTER 10  2           192.168.0.2     Vlan100

224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0

224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0

255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

PC1 ping PC2 正常通信

C:\Users\mfw2656>ping 172.17.1.2

Ping 172.17.1.2 (172.17.1.2): 56 data bytes, press CTRL_C to break

56 bytes from 172.17.1.2: icmp_seq=0 ttl=254 time=8.000 ms

56 bytes from 172.17.1.2: icmp_seq=1 ttl=254 time=2.000 ms

56 bytes from 172.17.1.2: icmp_seq=2 ttl=254 time=3.000 ms

56 bytes from 172.17.1.2: icmp_seq=3 ttl=254 time=3.000 ms

172.17.1.2的 Ping 統計信息:

      數據包已發送 = 4,已接收 = 4,丟失 = 0 (0% 丟失)

返行程的估計時間(以毫秒為單位):

      最短 = 2ms,最長 = 3ms,平均 = 2ms

 


該案例對您是否有幫助:

您的評價:1

若您有關於案例的建議,請反饋:

作者在2019-06-11對此案例進行了修訂
0 個評論

該案例暫時沒有網友評論

編輯評論

舉報

×

侵犯我的權益 >
對根叔知了社區有害的內容 >
辱罵、歧視、挑釁等(不友善)

侵犯我的權益

×

泄露了我的隱私 >
侵犯了我企業的權益 >
抄襲了我的內容 >
誹謗我 >
辱罵、歧視、挑釁等(不友善)
騷擾我

泄露了我的隱私

×

您好,當您發現根叔知了上有泄漏您隱私的內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到pub.zhiliao@h3c.com 郵箱,我們會盡快處理。
  • 1. 您認為哪些內容泄露了您的隱私?(請在郵件中列出您舉報的內容、鏈接地址,並給出簡短的說明)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)

侵犯了我企業的權益

×

您好,當您發現根叔知了上有關於您企業的造謠與誹謗、商業侵權等內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到 pub.zhiliao@h3c.com 郵箱,我們會在審核後盡快給您答複。
  • 1. 您舉報的內容是什麼?(請在郵件中列出您舉報的內容和鏈接地址)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)
  • 3. 是哪家企業?(營業執照,單位登記證明等證件)
  • 4. 您與該企業的關係是?(您是企業法人或被授權人,需提供企業委托授權書)
我們認為知名企業應該坦然接受公眾討論,對於答案中不準確的部分,我們歡迎您以正式或非正式身份在根叔知了上進行澄清。

抄襲了我的內容

×

原文鏈接或出處

誹謗我

×

您好,當您發現根叔知了上有誹謗您的內容時,您可以向根叔知了進行舉報。 請您把以下內容通過郵件發送到pub.zhiliao@h3c.com 郵箱,我們會盡快處理。
  • 1. 您舉報的內容以及侵犯了您什麼權益?(請在郵件中列出您舉報的內容、鏈接地址,並給出簡短的說明)
  • 2. 您是誰?(身份證明材料,可以是身份證或護照等證件)
我們認為知名企業應該坦然接受公眾討論,對於答案中不準確的部分,我們歡迎您以正式或非正式身份在根叔知了上進行澄清。

對根叔知了社區有害的內容

×

垃圾廣告信息
色情、暴力、血腥等違反法律法規的內容
政治敏感
不規範轉載 >
辱罵、歧視、挑釁等(不友善)
騷擾我
誘導投票

不規範轉載

×

舉報說明

提出建議

    +

親~登錄後才可以操作哦!

確定

親~檢測到您登陸的賬號未在http://hclhub.h3c.com進行注冊

注冊後可訪問此模塊

跳轉hclhub

你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作