聯邦和反射器實驗

拓撲圖

一.實驗要求

1.AS1存在兩個環回,一個地址為192.168.1.0/24,該地址不能在任何協議中宣告???????

AS3存在兩個環回,一個地址為192.168.2.0/24,該地址不能在任何協議中宣告???????

AS1還有一個環回地址為10.1.1.0/24,AS3另一個環回地址是11.1.1.8/24?

最終要求這兩個環回可以互相通訊

2.整個AS2的IP地址為172.16.0.0/16

3.AS間的骨干鏈路IP地址隨意分配

4.使用BGP協議讓整個網絡所有設備的環回可以互相訪問

5.減少路由條目數量,避免環路出現

三、實驗步驟

1.配置IP

R1

[r1]int g0/0/0

[r1-GigabitEthernet0/0/0]ip add 12.0.0.1 30

May 29 2024 00:47:28-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r1-GigabitEthernet0/0/0]int l 0

[r1-LoopBack0]ip add 192.168.1.1 24

[r1-LoopBack0]int l 1

[r1-LoopBack1]ip add 10.1.1.1 24

R2

[r2]int g0/0/0

[r2-GigabitEthernet0/0/0]ip add 12.0.0.2 30

May 29 2024 00:48:24-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r2-GigabitEthernet0/0/0]int g0/0/1

[r2-GigabitEthernet0/0/1]ip add 172.16.1.1 30

May 29 2024 00:48:36-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[r2-GigabitEthernet0/0/1]int g0/0/2

[r2-GigabitEthernet0/0/2]ip add 172.16.1.22 30

May 29 2024 00:48:54-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP

on the interface GigabitEthernet0/0/2 has entered the UP state.

[r2-GigabitEthernet0/0/2]int l 0

[r2-LoopBack0]ip add 2.2.2.2 32

[r2-LoopBack0]int l 1

[r2-LoopBack1]ip add 172.16.2.1 24

R3

[r3]int g0/0/0

[r3-GigabitEthernet0/0/0]ip add 172.16.1.2 30

May 29 2024 00:49:54-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r3-GigabitEthernet0/0/0]int g0/0/1

[r3-GigabitEthernet0/0/1]ip add 172.16.1.5 30

May 29 2024 00:50:11-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[r3-GigabitEthernet0/0/1]int l 0

[r3-LoopBack0]ip add 3.3.3.3 32

[r3-LoopBack0]int l 1

[r3-LoopBack1]ip add 172.16.3.1 24

R4

[r4]int g0/0/0

[r4-GigabitEthernet0/0/0]ip add 172.16.1.6 30

May 29 2024 00:51:17-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r4-GigabitEthernet0/0/0]int g0/0/1

[r4-GigabitEthernet0/0/1]ip add 172.16.1.9 30

May 29 2024 00:51:28-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[r4-GigabitEthernet0/0/1]int l 0

[r4-LoopBack0]ip add 4.4.4.4 32

[r4-LoopBack0]int l 1

[r4-LoopBack1]ip add 172.16.4.1 24

R5

[r5]int g0/0/0

[r5-GigabitEthernet0/0/0]ip add 172.16.1.21 30

May 29 2024 00:52:18-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r5-GigabitEthernet0/0/0]int g0/0/1

[r5-GigabitEthernet0/0/1]ip add 172.16.1.18 30

May 29 2024 00:52:29-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[r5-GigabitEthernet0/0/1]int l 0

[r5-LoopBack0]ip add 5.5.5.5 32

[r5-LoopBack0]int l 1

[r5-LoopBack1]ip add 172.16.5.1 24

[r6]int g0/0/0

[r6-GigabitEthernet0/0/0]ip add 172.16.1.17 30

May 29 2024 00:53:33-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r6-GigabitEthernet0/0/0]int g0/0/1

[r6-GigabitEthernet0/0/1]ip add 172.16.1.14 30

May 29 2024 00:53:45-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[r6-GigabitEthernet0/0/1]int l 0

[r6-LoopBack0]ip add 6.6.6.6 32

[r6-LoopBack0]int l 1

[r6-LoopBack1]ip add 172.16.6.1 24

R7

[r7]int g0/0/0

[r7-GigabitEthernet0/0/0]ip add 172.16.1.10 30

May 29 2024 00:54:41-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r7-GigabitEthernet0/0/0]int g0/0/1

[r7-GigabitEthernet0/0/1]ip add 172.16.1.13 30

May 29 2024 00:54:53-08:00 r7 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP

on the interface GigabitEthernet0/0/1 has entered the UP state.

[r7-GigabitEthernet0/0/1]int g0/0/2

[r7-GigabitEthernet0/0/2]ip add 78.0.0.1 30

[r7-GigabitEthernet0/0/2]

May 29 2024 00:55:04-08:00 r7 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP

on the interface GigabitEthernet0/0/2 has entered the UP state.

[r7-GigabitEthernet0/0/2]int l 0

[r7-LoopBack0]ip add 7.7.7.7 32

[r7-LoopBack0]int l 1

[r7-LoopBack1]ip add 172.16.7.1 24

R8

[r8]int g0/0/0

[r8-GigabitEthernet0/0/0]ip add 78.0.0.2 30

May 29 2024 00:56:02-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface GigabitEthernet0/0/0 has entered the UP state.

[r8-GigabitEthernet0/0/0]int l 0

[r8-LoopBack0]ip add 192.168.2.1 24

[r8-LoopBack0]int l 1

[r8-LoopBack1]ip add 11.1.1.1 24

2.AS2內部配置ospf

R2

[r2]ospf 1 router-id 2.2.2.2

[r2-ospf-1]ar????????

[r2-ospf-1]area 0

[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0

[r2-ospf-1-area-0.0.0.0]network 172.16.2.0 0.0.0.255

[r2-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.0

[r2-ospf-1-area-0.0.0.0]network 172.16.1.22 0.0.0.0

R3

[r3]ospf 1 router-id 3.3.3.3

[r3-ospf-1]area 0

[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

[r3-ospf-1-area-0.0.0.0]network 172.16.3.0 0.0.0.255

[r3-ospf-1-area-0.0.0.0]network 172.16.1.2 0.0.0.0

[r3-ospf-1-area-0.0.0.0]network 172.16.1.5 0.0.0.0

R4

[r4]ospf 1 router-id 4.4.4.4

[r4-ospf-1]area 0

[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0

[r4-ospf-1-area-0.0.0.0]network 172.16.4.0 0.0.0.0

[r4-ospf-1-area-0.0.0.0]network 172.16.1.6 0.0.0.0

[r4-ospf-1-area-0.0.0.0]network 172.16.1.9 0.0.0.0

R5

[r5]ospf 1 router-id 5.5.5.5

[r5-ospf-1]area 0

[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]network 172.16.5.0 0.0.0.255

[r5-ospf-1-area-0.0.0.0]network 172.16.1.21 0.0.0.0

[r5-ospf-1-area-0.0.0.0]network 172.16.1.18 0.0.0.0

R6

[r6]ospf 1 router-id 6.6.6.6

[r6-ospf-1]area 0

[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]network 172.16.6.0 0.0.0.255

[r6-ospf-1-area-0.0.0.0]network 172.16.1.17 0.0.0.0

[r6-ospf-1-area-0.0.0.0]network 172.16.1.14 0.0.0.0

R7

[r7]ospf 1 router-id 7.7.7.7

[r7-ospf-1]area 0

[r7-ospf-1-area-0.0.0.0]network 7.7.7.7 0.0.0.0

[r7-ospf-1-area-0.0.0.0]network 172.16.7.0 0.0.0.255

[r7-ospf-1-area-0.0.0.0]network 172.16.1.10 0.0.0.255

[r7-ospf-1-area-0.0.0.0]network 172.16.1.13 0.0.0.0

3.

R1與R2建立EBGP

R1

[r1]bgp 1

[r1-bgp]router-id 1.1.1.1

[r1-bgp]peer 12.0.0.2 as-number 2

R2

[r2]bgp 64512

[r2-bgp]router-id 2.2.2.2

[r2-bgp]confederation id 2

[r2-bgp]peer 12.0.0.1 as-number 1

R7與R8建立EBGP

[r7]bgp 64513

[r7-bgp]router-id 2.2.2.2

[r7-bgp]confederation id 2

[r7-bgp]peer 78.0.0.2 as-number 3

[r8]bgp 3

[r8-bgp]router-id 8.8.8.8

[r8-bgp]peer 78.0.0.1 as-number 2

4.

AS2區域中64512內R2/3/4之間建立聯邦

R2

[r2]bgp 64512

[r2-bgp]peer 3.3.3.3 as-number 64512

[r2-bgp]peer 3.3.3.3 connect-interface LoopBack 0

[r2-bgp]peer 3.3.3.3 next-hop-local

R3

[r3]bgp 64512

[r3-bgp]confederation id 2

[r3-bgp]peer 2.2.2.2 as-number 64512

[r3-bgp]peer 2.2.2.2 connect-interface LoopBack 0

[r3-bgp]peer 4.4.4.4 as-number 64512

[r3-bgp]peer 4.4.4.4 connect-interface LoopBack 0

R4

[r4]bgp 64512

[r4-bgp]confederation id 2

[r4-bgp]peer 3.3.3.3 as-number 64512

[r4-bgp]peer 3.3.3.3 connect-interface LoopBack 0

AS2區域中64513內R5/6/7之間建立聯邦

R5

[r5]bgp 64513

[r5-bgp]confederation id 2

[r5-bgp]peer 6.6.6.6 as-number 64513

[r5-bgp]peer 6.6.6.6 connect-interface LoopBack 0

R6

[r6]bgp 64513

[r6-bgp]confederation id 2

[r6-bgp]peer 7.7.7.7 as-number 64513

[r6-bgp]peer 7.7.7.7 connect-interface LoopBack 0

[r6-bgp]peer 5.5.5.5 as-number 64513

[r6-bgp]peer 5.5.5.5 connect-interface LoopBack 0

R7

[r7]bgp 6451

[r7]bgp 64513

[r7-bgp]peer 6.6.6.6 as-number 64513

[r7-bgp]peer 6.6.6.6 connect-interface LoopBack 0

[r7-bgp]peer 6.6.6.6 next-hop-local

5.

R2與R5建立EBGP

R2

[r2]bgp 64512

[r2-bgp]confederation peer-as 64513

[r2-bgp]peer 5.5.5.5 as-number 64513

[r2-bgp]peer 5.5.5.5 connect-interface LoopBack 0

[r2-bgp]peer 5.5.5.5 ebgp-max-hop

[r2-bgp]peer 5.5.5.5 next-hop-local

R5

[r5]bgp 64513

[r5-bgp]confederation peer-as 64512

[r5-bgp]peer 2.2.2.2 as-number 64512

[r5-bgp]peer 2.2.2.2 connect-interface LoopBack 0

[r5-bgp]peer 2.2.2.2 ebgp-max-hop

R4與R7建立EBGP

R4

[r4]bgp 64512

[r4-bgp]confederation peer-as 64513

[r4-bgp]peer 7.7.7.7 as-number 64513

[r4-bgp]peer 7.7.7.7 connect-interface LoopBack 0

[r4-bgp]peer 7.7.7.7 ebgp-max-hop

R7

[r7]bgp 64513

[r7-bgp]confederation peer-as 64512

[r7-bgp]peer 4.4.4.4 as-number 64512

[r7-bgp]peer 4.4.4.4 connect-interface LoopBack 0

[r7-bgp]peer 4.4.4.4 ebgp-max-hop

[r7-bgp]peer 4.4.4.4 next-hop-local

6.在R3與R6上配置路由反射器用來打破IBGP的水平分割

R3

[r3]bgp 64512

[r3-bgp]peer 2.2.2.2 reflect-client

R6

[r6]bgp 64513

[r6-bgp]peer 7.7.7.7 reflect-client

6.

將用戶網段宣告進BGP

[r1]bgp 1

[r1-bgp]network 10.1.1.0 24

[r2]bgp 64512

[r2-bgp]network 172.16.2.0 24

[r3]bgp 64512

[r3-bgp]network 172.16.3.0 24

[r4]bgp 64512

[r4-bgp]network 172.16.4.0 24

[r5]bgp 64513

[r5-bgp]network 172.16.5.0 24

[r6]bgp 64513

[r6-bgp]network 172.16.6.0 24

[r7]bgp 64513

[r7-bgp]network 172.16.7.0 24

[r8]bgp 3

[r8-bgp]network 11.1.1.0 24

7.

創建R1-R8虛擬隧道,使用GRE

R1

[r1]bgp 1

[r1-bgp]network 10.1.1.0 24

[r1-bgp]int t 0/0/1

[r1-Tunnel0/0/1]ip add 192.168.3.1 24

[r1-Tunnel0/0/1]tunnel-protocol gre

[r1-Tunnel0/0/1]source 10.1.1.1

[r1-Tunnel0/0/1]destination 11.1.1.1

May 29 2024 01:45:22-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface Tunnel0/0/1 has entered the UP state.

[r1-Tunnel0/0/1]

[r1-Tunnel0/0/1]Q

[r1]ip route-static 192.168.2.0 24 192.168.3.2

R8

[r8]bgp 3

[r8-bgp]network 11.1.1.0 24

[r8-bgp]int t0/0/1

[r8-Tunnel0/0/1]ip add 192.168.3.2 24

[r8-Tunnel0/0/1]tunnel-protocol gre

[r8-Tunnel0/0/1]source 11.1.1.1

[r8-Tunnel0/0/1]destination 10.1.1.1

May 29 2024 01:46:40-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP

on the interface Tunnel0/0/1 has entered the UP state.

[r8-Tunnel0/0/1]Q

[r8]ip route-static 192.168.1.0 24 192.168.3.1

8.

路由聚合

R2

[r2]ip route-static 172.16.0.0 21 NULL 0

[r2]bgp 64512

[r2-bgp]aggregate 172.16.0.0 21 detail-suppressed

R7

[r7]ip route-static 172.16.0.0 21 NULL 0

[r7]bgp 64513

[r7-bgp]aggregate 172.16.0.0 21 detail-suppressed

四、驗證

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/18483.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/18483.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/18483.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

PyTorch訓練關鍵點

1.背景 在網上找了一些資料用來訓練關鍵點,一般都是人臉或者車牌關鍵點訓練,或者是聯合檢測一起訓練。很少有是單獨基于輕量級網絡訓練單獨關鍵點模型的工程,本文簡單介紹一種簡單方法和代碼。 2.代碼模塊 (1)網絡結…

[C][動態內存分配][柔性數組]詳細講解

目錄 1.動態內存函數的介紹1.malloc2.free2.calloc4.realloc 2.常見的動態內存錯誤3.C/C程序的內存開辟4.柔性數組1.是什么?2.柔性數組的特點3.柔性數組的使用4.柔性數組的優勢 1.動態內存函數的介紹 1.malloc 函數原型:void* malloc(size_t size)功能…

iOS馬甲包, AB面,H5跳轉包,開發上架

什么是馬甲包 馬甲包一般是主APP的分身或者克隆,也或者說是穿著馬甲的一個APP,脫掉馬甲,APP將呈現另一種樣式,也就是常說的AB面APP。 1. 馬甲包、AB面、白包、h5跳轉包 2.蘋果開發者 3.TG:APPYKJ 4.喂心&#xff1…

【AI算法崗面試八股面經【超全整理】——概率論】

AI算法崗面試八股面經【超全整理】 概率論信息論機器學習CVNLP 目錄 1、古典概型、幾何概型2、條件概率、全概率公式、貝葉斯公式3、先驗概率、后驗概率4、離散型隨機變量的常見分布5、連續型隨機變量的常見分別6、數學期望、方差7、協方差、相關系數8、獨立、互斥、不相關9.大…

【PB案例學習筆記】-11動畫顯示窗口

寫在前面 這是PB案例學習筆記系列文章的第11篇,該系列文章適合具有一定PB基礎的讀者。 通過一個個由淺入深的編程實戰案例學習,提高編程技巧,以保證小伙伴們能應付公司的各種開發需求。 文章中設計到的源碼,小凡都上傳到了gite…

ESP32 - Micropython ESP-IDF 雙線教程 WIFI (2)

ESP32 - Micropython ESP-IDF 雙線教程 WIFI ESP32 - IDF WIFI轉換為ESP32-IDF的示例代碼main/main.c 代碼解釋 ESP32 - IDF WIFI 轉換為ESP32-IDF的示例代碼 以下是使用ESP-IDF(Espressif IoT Development Framework)編寫的連接到Wi-Fi網絡的示例代碼…

頸源性頭痛癥狀及表

頸源性頭痛一般表現為,就是說從枕后一直顳側,到太陽穴附近,這個是枕小的一個疼痛,還有一部分人從枕后,沿著一個弧線(如下圖)的軌跡到了前額,到我們前額,這樣一個疼痛&…

Bitbucket的原理及應用詳解(一)

本系列文章簡介: 在數字化和全球化的今天,軟件開發和項目管理已經成為企業成功的關鍵因素之一。隨著團隊規模的擴大和項目的復雜化,如何高效地協同開發、管理代碼和確保代碼質量成為了開發者和管理者面臨的重要挑戰。Bitbucket作為一款功能強…

深入解析線程上下文切換:掌握線程上下文切換的核心原理

1. 進程與線程的基本概念 1.1 進程與線程的區別 在操作系統中,進程和線程是兩個基本的概念,它們共同構成了程序的執行環境。了解它們的區別是理解線程上下文切換的基礎。 進程:進程是程序的一次執行實例。它是操作系統資源分配的基本單位。…

pytest的斷言與Selenium 模擬操作的一個例子

在Python中,pytest是一個流行的單元測試框架,而Selenium是一個用于自動化瀏覽器操作的工具。結合這兩者,我們可以編寫自動化測試腳本來驗證網頁的行為是否符合預期。下面是一個簡單的例子,展示了如何使用pytest的斷言功能以及Sele…

解決在Mac下使用npm報錯:Error: EACCES: permission denied

原因說明:沒有足夠的權限在 /usr/local/lib/node_modules 目錄下創建文件夾 這個錯誤表明你在安裝或更新 Vue.js(vue)包時,沒有足夠的權限在 /usr/local/lib/node_modules 目錄下創建文件夾。這通常是因為默認情況下,普…

【頭歌-Python】文件自學引導

禁止轉載,原文:https://blog.csdn.net/qq_45801887/article/details/139258793 參考教程:B站視頻講解——https://space.bilibili.com/3546616042621301 如果代碼存在問題,麻煩大家指正 ~ ~有幫助麻煩點個贊 ~ ~ 文件自學引導 第…

算數運算符

算術運算符是用于數值類型變量計算的運算符。 它的返回結果是數值。 賦值符號 關鍵知識點:先看右側,再看左側,把右側的值賦值給左側的變量。 附上代碼: string myName "唐唐"; int myAge 18; float myHeight 177.5…

202312青少年軟件編程(Python)等級考試試卷(四級)

第 1 題 【單選題】 下列有關分治算法思想的描述不正確的是?(?) A :將問題分解成的子問題具有相同的模式 B :將問題分解出的各個子問題相互之間有公共子問題 C :當問題足夠小時,可以直接求解 D :可以將子問題的求解結果合并成原問題的解 正確答案:B 試題解析: 第 2…

ADIL簡單測試實例

參考資料:https://blog.csdn.net/geyichongchujianghu/article/details/130045373這個連接是Java的代碼,我根據它的鏈接寫了一個kotlin版本的。 AIDL(Android Interface Definition Language)是Android平臺上用于進程間通信&…

AI辦公自動化:kimi批量新建文件夾

工作任務:批量新建多個文件夾,每個文件夾中的年份不一樣 在kimi中輸入提示詞: 你是一個Python編程專家,要完成一個編寫關于錄制電腦上的鍵盤和鼠標操作的Python腳本的任務,具體步驟如下: 打開文件夾&…

FFmpeg編解碼的那些事(1)

看了網上很多ffmpeg的編解碼的文章和代碼,發現有很多文章和代碼都過時了,主要還是ffmpeg有很多接口都已經發生變化了。 這里簡單說一下,什么是編碼和解碼。 1.視頻編碼 對于視頻來說,可以理解為多張(rgb或者yuv&…

Python散點圖矩陣代碼模版

本文分享Python seaborn實現散點圖矩陣代碼模版,節選自👉嫌Matplotlib繁瑣?試試Seaborn! 散點圖矩陣(scatterplot matrix)展示原始數據中所有變量兩兩之間關系,可以規避單一統計指標的偏差&…

二分查找算法詳講(三種版本寫法)原創

介紹: 二分查找算法(Binary Search)是一種在有序數組中查找目標元素的算法。 它的基本思想是通過將目標元素與數組的中間元素進行比較,從而將搜索范圍縮小一半。 如果目標元素等于中間元素,則搜索結束;如果目標元素小…

Neural Filters:照片恢復

Ps菜單:濾鏡/Neural Filters/恢復/照片恢復 Neural Filters/RESTORATION/Photo Restoration 照片恢復 Photo Restoration借助 AI 強大功能快速恢復舊照片,提高對比度、增強細節、消除劃痕。將此濾鏡與著色相結合以進一步增強效果。 “照片恢復”濾鏡利用…