首页 > 其他分享 >BGP 反射器联邦实验

BGP 反射器联邦实验

时间:2024-08-14 19:54:52浏览次数:7  
标签:bgp 反射器 ospf 0.0 BGP peer 联邦 100 interface

要求:

1.如图连接网络,合理规划IP地址,AS 200内IGP协议为OSPF

2.R1属于AS 100;R2-R3-R4小AS 234   R5-R6-R7小AS 567,同时声明大AS 200,R8属于AS 300

3.R2-R5  R4-R7 之间为联邦EBGP邻居关系

4.R1-R8之间通信

 1.如图连接网络,合理规划IP地址,A200内IGP协议为OSPF

[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1]interface LoopBack 0
[r1-LoopBack0]ip add 1.1.1.1 24

[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip add 12.1.1.2 24
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip add 23.1.1.1 24
[r2]interface g0/0/2
[r2-GigabitEthernet0/0/2]ip add 25.1.1.1 24
[r2]interface LoopBack 0
[r2-LoopBack0]ip add 2.2.2.2 24

[r2]ospf 100 router-id 92.2.2.2
[r2-ospf-100]area 0
[r2-ospf-100-area-0.0.0.0]network 12.1.1.2 0.0.0.0
[r2-ospf-100-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-100-area-0.0.0.0]network 23.1.1.1 0.0.0.0
[r2-ospf-100-area-0.0.0.0]network 25.1.1.1 0.0.0.0

[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip add 23.1.1.2 24
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip add 34.1.1.1 24 
[r3]interface LoopBack 0
[r3-LoopBack0]ip add 3.3.3.3 24

[r3]ospf 100 router-id 93.3.3.3
[r3-ospf-100]area 0
[r3-ospf-100-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-100-area-0.0.0.0]network 23.1.1.2 0.0.0.0

[r3-ospf-100-area-0.0.0.0]network 34.1.1.1 0.0.0.0

[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ip add 34.1.1.2 24
[r4]interface g0/0/2
[r4-GigabitEthernet0/0/2]ip add 47.1.1.1 24
[r4]interface LoopBack 0
[r4-LoopBack0]ip add 4.4.4.4 24

[r4]ospf 100 router-id 94.4.4.4
[r4-ospf-100]area 0
[r4-ospf-100-area-0.0.0.0]network 34.1.1.2 0.0.0.0

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

[r4-ospf-100-area-0.0.0.0]network 47.1.1.1 0.0.0.0

[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]ip add 25.1.1.2 24
[r5]interface g0/0/0
[r5-GigabitEthernet0/0/0]ip add 56.1.1.1 24
[r5]interface LoopBack 0
[r5-LoopBack0]ip add 5.5.5.5 24

[5]ospf 100 router-id 95.5.5.5
[r5-ospf-100]area 0
[r5-ospf-100-area-0.0.0.0]network 25.1.1.2 0.0.0.0

[r5-ospf-100-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r5-ospf-100-area-0.0.0.0]network 56.1.1.1 0.0.0.0

[r6]interface g0/0/1
[r6-GigabitEthernet0/0/1]ip add 56.1.1.2 24
[r6]interface g0/0/0
[r6-GigabitEthernet0/0/0]ip add 67.1.1.1 24
[r6]interface LoopBack 0
[r6-LoopBack0]ip add 6.6.6.6 24

[r6]ospf 100 router-id 96.6.6.6
[r6-ospf-100]area 0
[r6-ospf-100-area-0.0.0.0]network 56.1.1.2 0.0.0.0

[r6-ospf-100-area-0.0.0.0]network 6.6.6.6 0.0.0.0
[r6-ospf-100-area-0.0.0.0]network 67.1.1.1 0.0.0.0

[r7]interface g0/0/1
[r7-GigabitEthernet0/0/1]ip add 67.1.1.2 24
[r7]interface g0/0/2
[r7-GigabitEthernet0/0/2]ip add 47.1.1.2 24
[r7]interface g0/0/0
[r7-GigabitEthernet0/0/0]ip add 78.1.1.1 24
[r7]interface LoopBack 0
[r7-LoopBack0]ip add 7.7.7.7 24

[r7]ospf 100 router-id 97.7.7.7
[r7-ospf-100]area 0
[r7-ospf-100-area-0.0.0.0]network 67.1.1.2 0.0.0.0

[r7-ospf-100-area-0.0.0.0]network 7.7.7.7 0.0.0.0
[r7-ospf-100-area-0.0.0.0]network 47.1.1.2 0.0.0.0

[r7-ospf-100-area-0.0.0.0]network 78.1.1.1 0.0.0.0

[r8]interface g0/0/1
[r8-GigabitEthernet0/0/1]ip add 78.1.1.2 24 
[r8]interface LoopBack 0
[r8-LoopBack0]ip add 8.8.8.8 24

 

 2.R1属于AS 100;R2-R3-R4小AS 234   R5-R6-R7小AS 567,同时声明大AS 200,R8属于AS 300

 3.R2-R5  R4-R7 之间为联邦EBGP邻居关系

[r1]bgp 100 
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 200

[r2]bgp 234
[r2-bgp]router-id 2.2.2.2
[r2-bgp]confederation id 200

[r2-bgp]confederation peer-as 567

[r2-bgp]peer 12.1.1.1 as-number 100
[r2-bgp]peer 3.3.3.3 as-number 234
[r2-bgp]peer 3.3.3.3 connect-interface lo 0
[r2-bgp]peer 5.5.5.5 as-number 567 
[r2-bgp]peer 5.5.5.5 connect-interface lo 0
[r2-bgp]peer 5.5.5.5 ebgp-max-hop

[r3]bgp 234

[r3-bgp]router-id 3.3.3.3
[r3-bgp]confederation id 200
[r3-bgp]peer 2.2.2.2 as-number 234
[r3-bgp]peer 2.2.2.2 connect-interface lo 0
[r3-bgp]peer 4.4.4.4 as-number 234
[r3-bgp]peer 4.4.4.4 connect-interface lo 0

[r4]bgp 234
[r4-bgp]router-id 4.4.4.4 
[r4-bgp]confederation id 200  

[r4-bgp]confederation peer-as 567
[r4-bgp]peer 3.3.3.3 as-number 234
[r4-bgp]peer 3.3.3.3 connect-interface lo 0
[r4-bgp]peer 7.7.7.7 as-number 567 
[r4-bgp]peer 7.7.7.7 connect-interface lo 0
[r4-bgp]peer 7.7.7.7 ebgp-max-hop

[r5]bgp 567
[r5-bgp]router-id 5.5.5.5
[r5-bgp]confederation id 200
[r5-bgp]confederation peer-as 234
[r5-bgp]peer 2.2.2.2 as-number 234
[r5-bgp]peer 2.2.2.2 connect-interface lo 0
[r5-bgp]peer 2.2.2.2 ebgp-max-hop
[r5-bgp]peer 6.6.6.6 as-number 567
[r5-bgp]peer 6.6.6.6 connect-interface lo 0

[r6]bgp 567
[r6-bgp]router-id 6.6.6.6  
[r6-bgp]confederation id 200   
[r6-bgp]peer 5.5.5.5 as-number 567
[r6-bgp]peer 5.5.5.5 connect-interface lo 0
[r6-bgp]peer 7.7.7.7 as-number 567
[r6-bgp]peer 7.7.7.7 connect-interface lo 0

[r7]bgp 567
[r7-bgp]router-id 7.7.7.7
[r7-bgp]confederation id 200
[r7-bgp]confederation peer-as 234
[r7-bgp]peer 78.1.1.2 as-number 300
[r7-bgp]peer 6.6.6.6 as-number 567
[r7-bgp]peer 6.6.6.6 connect-interface lo 0
[r7-bgp]peer 4.4.4.4 as-number 234
[r7-bgp]peer 4.4.4.4 connect-interface lo 0
[r7-bgp]peer 4.4.4.4 ebgp-max-hop

[r8]bgp 300
[r8-bgp]router-id 8.8.8.8
[r8-bgp]peer 78.1.1.1 as-number 200

 

[r1]bgp 100
[r1-bgp]network 1.1.1.0 24

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

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

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

[r3]bgp 234

[r3-bgp]peer 2.2.2.2 reflect-client 

[r3-bgp]peer 4.4.4.4 reflect-client 

[r6]bgp 567
[r6-bgp]peer 5.5.5.5 reflect-client 

[r6-bgp]peer 7.7.7.7 reflect-client 

[r8]bgp 300
[r8-bgp]network 8.8.8.0 24

[r2]bgp 234
[r2-bgp]import-route ospf 100

[r7]bgp 567
[r7-bgp]import-route ospf 100

4.R1-R8之间通信 

标签:bgp,反射器,ospf,0.0,BGP,peer,联邦,100,interface
From: https://blog.csdn.net/2201_75911805/article/details/141196252

相关文章

  • SCI/CCF科研项目 - 个性化联邦学习及其交叉应用研究
    【课题推荐发表期刊】【课题背景】随着移动和物联网设备的普及和发展,用户设备上积累的大量数据因隐私保护无法直接上传至中心服务器。联邦学习作为解决方案,通过在边缘设备上训练模型,将模型参数更新发送到中心服务器进行整合,从而利用这些分散的数据。但传统联邦学习依旧存在......
  • BGP路由优选(五)
    当到达同一个目的网段存在多条路由时,BGP通过如下的次序进行路由优选:     丢弃下一跳不可达的路由。优选Preferred-Value属性值最大的路由。优选Local_Preference属性值最大的路由。本地始发的BGP路由优于从其他对等体学习到的路由,本地始发的路由优先级:优选手动聚合>自......
  • HCIP笔记8-BGP(2)
    一、BGP的宣告问题1.在BGP协议中每台运行BGP的设备上,宣告本地直连路由2.*在BGP协议中运行BGP协议的设备还可以宣告通过IGP学习到的,未运行BGP协议设备产生的路由;在BGP协议中宣告本地路由表中路由条目时,将携带本地到达这些目标的IGP度量值;传递到BGP邻居处;其他AS设备便于选择离......
  • BGP反射器(四)
    解决IBGP全互联问题带来的问题:路由器需维护大量的TCP和BGP连接,尤其在路由器数量较多时AS内BGP网络的可扩展性较差角色RR:路由反射器Client:RR的客户端Non-Client:非客户机关系Client只与RR之间建立IBGP会话RR与RR之间建立IBGP全互联Non-Client与Non-Client之间建立IBGP全互联......
  • BGP路径属性(三)
    BGP路径属性作用:用于选路和防环,任何一条BGP路由都拥有多个路径属性分类:公认:所有BGP路由器必须识别公认必遵:必须包括在每个Update消息中,如:Origin、AS_Path、Next_hop公认任意:可能包含在某些Update消息中,如:Local_preference、Atomic_aggregate可选:厂商实现自己私有特性......
  • 2.5.BGP-2
    多路访问网络next-hop实验:r2:ints0ipadd12.1.1.2255.255.255.0noshintlo0ipadd2.2.2.2255.255.255.0r1:ints0ipadd12.1.1.1255.255.255.0noshinte0ipadd134.1.1.1255.255.255.0noshintlo0ipadd1.1.1.1255.255.255.0noshr3:inte0ipa......
  • 2.4.BGP-1
    bgp外部网关协议igpegp:egp,bgp工作在as内部就是igp,工作在as之间就是egp。由统一管理者的范围叫as。bgp工作在运行商之间的as号公有:0-64511私有:64512-65535网通9929电信4134http://www.cidr-report.org(查询as号)as-by-asbgp特征1当一个数据包从一个as穿越到另一个a......
  • 3.1.BGP-3
    weight属性1.传播范围,只在本台路由器上起效。2.默认值3.越大越好实验:r2:routerbgp2nosynnoaubgprouter-id2.2.2.2neighbor12.1.1.1remote-as1neighbor24.1.1.4remote-as1r1:routerbgp1bgprouter-id1.1.1.1neighbor12.1.1.2remote-as2neighbor......
  • 联邦学习综述性论文
    ClientSelectioninFederatedLearning:Principles,Challenges,andOpportunities一、摘要大量的工作旨在解决FL训练的不同方面,如优化聚合方法[7],[8],增强隐私保护[9],[10]和改进鲁棒性[11]。一个有效的FL客户端选择方案可以显著提高模型的准确性[16],增强公平性[24],增强鲁棒......
  • 基于深度学习的联邦学习
    基于深度学习的联邦学习(FederatedLearning,FL)是一种分布式机器学习方法,允许多个参与者(如设备或组织)在不共享原始数据的情况下共同训练模型。它通过在本地设备上训练模型,并仅共享模型更新(如梯度或参数),保护数据隐私和安全。以下是基于深度学习的联邦学习的详细介绍:1.背景和动......