calico ipip 變更 BGP 配置


calico網絡 包含 overlay  和 underlay網絡

overlay   IPIP和VXLAN模式,  IPIP可以使用BGP協議, VXLAN不能使用BGP協議, 可以跨網段,建立隧道

underlay BGP模式, 必須同一個C網

1、修改ippool,需要把ipipMode從Always修改成為Never(執行下面命令修改ipipMode)

[root@k8s-master1 target]# kubectl edit ippool
ipipMode: Never

2. 關閉 ipip模式, 定義asnumber 自治網絡號

cat << EOF | calicoctl create -f -
 apiVersion: projectcalico.org/v3
 kind: BGPConfiguration
 metadata:
   name: default
 spec:
   logSeverityScreen: Info
   nodeToNodeMeshEnabled: false
   asNumber: 64512
EOF

3.  指定反射器地址

cat << EOF | calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: bgppeer-global-55
spec:
  peerIP: 192.168.15.55
  asNumber: 64512
EOF

 交換機配置

參考:

https://blog.csdn.net/M2l0ZgSsVc7r69eFdTj/article/details/106561069

https://www.cnblogs.com/dengcongcong/p/7066894.html

 

 

華為交換機有關BGP的相關配置

 

作者:鄧聰聰

上圖是本人在某公司任職期間的一次割接任務,在原有的路由器上新配置的另一台高性能的路由器,兩台設備為並行

割接要求:

1:原有的網絡結構無變化,並行新設備

2:原有設備下的所有用戶無變化

3:原有的設備不接收新設備的任何路由,向新設備傳遞聯通路由表,同時向下級匯聚設備發布缺省路由

4:與網內其他運營商的前置機建立IBGP

5:默認路由仍大流量出口電信(我司的大出口為電信,IP多為BGP多線)

========================================================================================================================================

新設備模擬配置如下:

bgp 50001
peer 2.1.1.2 as-number 50001
peer 10.1.1.1 as-number 4808(EBGP對等體)
peer 10.1.1.1 ebgp-max-hop 255(EBGP傳遞跳數)
#
ipv4-family unicast
undo synchronization
network 2.1.1.0 255.255.255.0 (發布本網路由)
network 8.8.0.0 255.255.0.0
peer 2.1.1.2 enable
peer 2.1.1.2 next-hop-local (IBGP)
peer 10.1.1.1 enable
peer 10.1.1.1 route-policy LianTong import   調用路由策略(控制對等體的入方向路由策略)
#

route-policy LianTong permit node 10 (路由策略)
if-match ip-prefix LianTong
if-match as-path-filter 10
apply ip-address next-hop 10.1.1.1
#

(IP前綴列表)
ip ip-prefix LianTong index 1 permit 10.1.1.1 32
ip ip-prefix LianTong index 2 permit 106.1.1.0 24 greater-equal 24 less-equal 32

#
ip as-path-filter 10 permit ^4808$(正則表達式)

本端發布路由的控制策略同上理。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM