1. # Kubernetes CNI Calico GuideLine
  2. # 时间:20210811-[20:00-22:00]
  3. # 主题:Calico BGP Full Mesh
  4. # 文档:https://www.yuque.com/docs/share/66ba0e70-384d-4b1e-99a7-847d3b5c9f9c?# 《20210811-Calico BGP Full Mesh》
  5. # 作业:Calico BGP
  1. # FAQ:
  2. # BGP Full Mesh Mode 在https://docs.projectcalico.org/manifests/calico.yaml 中修改如下:
  3. # kubectl apply -f https://docs.projectcalico.org/manifests/calico-bgp-full-mesh.yaml
  4. containers:
  5. # Runs calico-node container on each Kubernetes node. This
  6. # container programs network policy and routes on each
  7. # host.
  8. - name: calico-node
  9. image: docker.io/calico/node:v3.18.1
  10. envFrom:
  11. - configMapRef:
  12. # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
  13. name: kubernetes-services-endpoint
  14. optional: true
  15. env:
  16. # Use Kubernetes API as the backing datastore.
  17. - name: DATASTORE_TYPE
  18. value: "kubernetes"
  19. # Wait for the datastore.
  20. - name: WAIT_FOR_DATASTORE
  21. value: "true"
  22. # Set based on the k8s node name.
  23. - name: NODENAME
  24. valueFrom:
  25. fieldRef:
  26. fieldPath: spec.nodeName
  27. # Choose the backend to use.
  28. - name: CALICO_NETWORKING_BACKEND
  29. valueFrom:
  30. configMapKeyRef:
  31. name: calico-config
  32. key: calico_backend
  33. # Cluster type to identify the deployment type
  34. - name: CLUSTER_TYPE
  35. value: "k8s,bgp"
  36. # Auto-detect the BGP IP address.
  37. - name: IP
  38. value: "autodetect"
  39. # Enable IPIP
  40. - name: CALICO_IPV4POOL_IPIP # IPIP模式设置 - 设置为Never
  41. value: "Alway" # IPIP模式设置的类型:Always,Never,CrossSubnet
  42. # Enable or Disable VXLAN on the default IP pool.
  43. - name: CALICO_IPV4POOL_VXLAN # VxLAN模式设置 - 设置为Never
  44. value: "Never" # VxLAN模式设置的类型:Always,Never,CrossSubnet
  45. # Set MTU for tunnel device used if ipip is enabled
  46. - name: FELIX_IPINIPMTU
  47. valueFrom:
  48. configMapKeyRef:
  49. name: calico-config
  50. key: veth_mtu
  51. # Set MTU for the VXLAN tunnel device.
  52. - name: FELIX_VXLANMTU
  53. valueFrom:
  54. configMapKeyRef:
  55. name: calico-config
  56. key: veth_mtu
  57. # Set MTU for the Wireguard tunnel device.
  58. - name: FELIX_WIREGUARDMTU
  59. valueFrom:
  60. configMapKeyRef:
  61. name: calico-config
  62. key: veth_mtu
  63. # The default IPv4 pool to create on startup if none exists. Pod IPs will be
  64. # chosen from this range. Changing this value after installation will have
  65. # no effect. This should fall within `--cluster-cidr`.
  66. # - name: CALICO_IPV4POOL_CIDR
  67. # value: "192.168.0.0/16"
  68. # Disable file logging so `kubectl logs` works.
  69. - name: CALICO_DISABLE_FILE_LOGGING
  70. value: "true"
  71. # Set Felix endpoint to host default action to ACCEPT.
  72. - name: FELIX_DEFAULTENDPOINTTOHOSTACTION
  73. value: "ACCEPT"
  74. # Disable IPv6 on Kubernetes.
  75. - name: FELIX_IPV6SUPPORT
  76. value: "false"
  77. # Set Felix logging to "info"
  78. - name: FELIX_LOGSEVERITYSCREEN
  79. value: "info"
  80. - name: FELIX_HEALTHENABLED
  81. value: "true"
  82. securityContext:
  83. privileged: true

BGP基础概念

  1. 定义:
  2. 边界网关协议BGP(Border Gateway Protocol)是一种实现自治系统AS(Autonomous System)之间的路由可达,并选择最佳路由的距离矢量路由协议。早期发布的三个版本分别是BGP-1、BGP-2和BGP-3,1994年开始使用BGP-4,2006年之后单播IPv4网络使用的版本是BGP-4,其他网络(如IPv6等)使用的版本是MP-BGP。
  3. MP-BGP是对BGP-4进行了扩展,来达到在不同网络中应用的目的,BGP-4原有的消息机制和路由机制并没有改变。MP-BGP在IPv6单播网络上的应用称为BGP4+,在IPv4组播网络上的应用称为MBGP(Multicast BGP)。
  4. 目的
  5. 为方便管理规模不断扩大的网络,网络被分成了不同的自治系统。1982年,外部网关协议EGP(Exterior Gateway Protocol)被用于实现在AS之间动态交换路由信息。但是EGP设计得比较简单,只发布网络可达的路由信息,而不对路由信息进行优选,同时也没有考虑环路避免等问题,很快就无法满足网络管理的要求。
  6. BGP是为取代最初的EGP而设计的另一种外部网关协议。不同于最初的EGP,BGP能够进行路由优选、避免路由环路、更高效率的传递路由和维护大量的路由信息。
  7. 虽然BGP用在AS之间传递路由信息,但并非所有AS之间传递路由信息都要运行BGP。如数据中心上行到Internet的出口上,为了避免Internet海量路由对数据中心内部网络影响,设备采用静态路由代替BGP与外部网络通信。
  8. 受益
  9. BGP从多方面保证了网络的安全性、灵活性、稳定性、可靠性和高效性:
  10. BGP采用认证和GTSM的方式,保证了网络的安全性。
  11. BGP提供了丰富的路由策略,能够灵活的进行路由选路,并且能指导邻居按策略发布路由。
  12. BGP提供了路由聚合和路由衰减功能用于防止路由振荡,有效提高了网络的稳定性。
  13. BGP使用TCP作为其传输层协议(端口号为179),并支持BGP与BFD联动、BGP Tracking和BGP GR和NSR,提高了网络的可靠性。
  14. 在邻居数目多、路由量大且大多邻居有相同出口策略场景下,BGP用按组打包技术极大提高了BGP打包发包性能。
名词 说明
BGP 边界网关协议(Border Gateway Protocol)是互联网上一个核心的去中心化自治路由协议,它通过维护IP路由表或前缀表来实现自治系统(AS)之间的可达性
大多数ISP使用BGP来与其他ISP创建路由连接,特大型的私有IP网络也可以使用BGP
BGP的通信对端(对等实体,Peer)通过TCP(端口179)会话交换数据,BGP路由器会周期地发送19字节的保活消息来维护连接。在路由协议中,只有BGP使用TCP作为传输层协议
IBGP 内部边界网关协议。同一个AS内部的两个或多个对等实体之间运行的BGP被称为IBGP
IGP 内部网关协议。同一AS内部的对等实体(路由器)之间使用的协议,它存在可扩容性问题:
1. 一个IGP内部应该仅有数十(最多小几百)个对等实体
2. 对于端点数,也存在限制,一般在数百(最多上千)个Endpoint级别
IBGP和IGP都是处理AS内部路由的,仍然需要IGP的原因是:
1. IBGP之间是TCP连接,也就意味着IBGP邻居采用的是逻辑连接的方式,两个IBGP连接不一定存在实际的物理链路。所以需要有IGP来提供路由,以完成BGP路由的递归查找
2. BGP协议本身实际上并不发现路由,BGP将路由发现的工作全部移交给了IGP协议,它本身着重于路由的控制
EBGP 外部边界网关协议。归属不同的AS的对等实体之间运行的BGP称为EBGP
Border Router 边界路由器,在AS边界上与其他AS交换信息的路由器
AS 自治系统(Autonomous system),一个组织(例如ISP)管辖下的所有IP网络和路由器的整体
参与BGP路由的每个AS都被分配一个唯一的自治系统编号(ASN)。对BGP来说ASN是区别整个相互连接的网络中的各个网络的唯一标识。64512到65535之间的ASN编号保留给专用网络使用
Route Reflector 同一AS内如果有多个路由器参与BGP路由,则它们之间必须配置成全连通的网状结构——任意两个路由器之间都必须配置成对等实体。由于所需要TCP连接数是路由器数量的平方,这就导致了巨大的TCP连接数
为了缓解这种问题,BGP支持两种方案:Route Reflector、Confederations
路由反射器(Route Reflector)是AS内的一台路由器,其它所有路由器都和RR直接连接,作为RR的客户机。RR和客户机之间建立BGP连接,而客户机之间则不需要相互通信
RR的工作步骤如下:
1. 从非客户机IBGP对等实体学到的路由,发布给此RR的所有客户机
2. 从客户机学到的路由,发布给此RR的所有非客户机和客户机
3. 从EBGP对等实体学到的路由,发布给所有的非客户机和客户机
RR的一个优势是配置方便,因为只需要在反射器上配置
工作负载 Workload,即运行在Calico节点上的虚机或容器
全互联 全互联网络(Full node-to-node Mesh)是指任何两个Calico节点都进行配对的L3连接模式

OSPF介绍

  1. 开放式最短路径优先OSPF(Open Shortest Path First)是IETF组织开发的一个基于链路状态的内部网关协议。目前针对IPv4协议使用的是OSPF Version 2(RFC2328);针对IPv6协议使用OSPF Version 3(RFC2740)。如无特殊说明,本文中所指的OSPF均为OSPF Version 2。
  2. 目的:
  3. 在OSPF出现前,网络上广泛使用RIP(Routing Information Protocol)作为内部网关协议。
  4. 由于RIP是基于距离矢量算法的路由协议,存在着收敛慢、路由环路、可扩展性差等问题,所以逐渐被OSPF取代。
  5. OSPF作为基于链路状态的协议,能够解决RIP所面临的诸多问题。此外,OSPF还有以下优点:
  6. OSPF采用组播形式收发报文,这样可以减少对其它不运行OSPF路由器的影响。
  7. OSPF支持无类型域间选路(CIDR)。
  8. OSPF支持对等价路由进行负载分担。
  9. OSPF支持报文加密。
  10. 由于OSPF具有以上优势,使得OSPF作为优秀的内部网关协议被快速接收并广泛使用。
  11. OSPF协议具有以下特点:
  12. OSPF把自治系统AS(Autonomous System)划分成逻辑意义上的一个或多个区域;
  13. OSPF通过LSA(Link State Advertisement)的形式发布路由;
  14. OSPF依靠在OSPF区域内各设备间交互OSPF报文来达到路由信息的统一;
  15. OSPF报文封装在IP报文内,可以采用单播或组播的形式发送。
  16. 邻居状态机:
  17. 在OSPF网络中,为了交换路由信息,邻居设备之间首先要建立邻接关系,邻居(Neighbors)关系和邻接(Adjacencies)关系是两个不同的概念。
  18. 邻居关系:OSPF设备启动后,会通过OSPF接口向外发送Hello报文,收到Hello报文的OSPF设备会检查报文中所定义的参数,如果双方一致就会形成邻居关系,两端设备互为邻居。
  19. 邻接关系:形成邻居关系后,如果两端设备成功交换DD报文和LSA,才建立邻接关系。
  20. OSPF共有8种状态机,分别是:Down、Attempt、Init、2-way、Exstart、Exchange、Loading、Full。
  21. Down:邻居会话的初始阶段,表明没有在邻居失效时间间隔内收到来自邻居路由器的Hello数据包。
  22. Attempt:该状态仅发生在NBMA网络中,表明对端在邻居失效时间间隔(dead interval)超时前仍然没有回复Hello报文。此时路由器依然每发送轮询Hello报文的时间间隔(poll interval)向对端发送Hello报文。
  23. Init:收到Hello报文后状态为Init。
  24. 2-way:收到的Hello报文中包含有自己的Router ID,则状态为2-way;如果不需要形成邻接关系则邻居状态机就停留在此状态,否则进入Exstart状态。
  25. Exstart:开始协商主从关系,并确定DD的序列号,此时状态为Exstart。
  26. Exchange:主从关系协商完毕后开始交换DD报文,此时状态为Exchange。
  27. Loading:DD报文交换完成即Exchange done,此时状态为Loading。
  28. Full:LSR重传列表为空,此时状态为Full。

OSPF配置Demo

image.png

  1. [R1] ospf 1 router-id 2.2.2.2
  2. [R1-ospf-1] area 0
  3. [R1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
  4. [R1-ospf-1-area-0.0.0.0] network 2.2.2.2 255.255.255.255
  5. [R2] ospf 1 router-id 1.1.1.1
  6. [R2-ospf-1] area 0
  7. [R2-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
  8. [R2-ospf-1-area-0.0.0.0] network 1.1.1.1 255.255.255.255
  9. [R2-ospf-1] area 1
  10. [R2-ospf-1] network 10.1.2.0 0.0.0.255
  11. [R3] ospf 1 router-id 3.3.3.3
  12. [R3-ospf-1] area 1
  13. [R3-ospf-1-area-0.0.0.1] network 10.1.2.0 0.0.0.255
  14. [R3-ospf-1-area-0.0.0.1] network 3.3.3.3 255.255.255.255
  15. # OSPF:
  16. # R1配置:
  17. <R1>dis current-configuration
  18. #
  19. sysname R1
  20. #
  21. aaa
  22. authentication-scheme default
  23. authorization-scheme default
  24. accounting-scheme default
  25. domain default
  26. domain default_admin
  27. local-user admin password cipher &3G<#`Q\@5bL^B&WSBiQPo[#
  28. local-user admin service-type http
  29. #
  30. firewall zone Local
  31. priority 16
  32. #
  33. interface Ethernet0/0/0
  34. ip address 10.1.1.1 255.255.255.0
  35. #
  36. interface Ethernet0/0/1
  37. #
  38. interface Serial0/0/0
  39. link-protocol ppp
  40. #
  41. interface Serial0/0/1
  42. link-protocol ppp
  43. #
  44. interface Serial0/0/2
  45. link-protocol ppp
  46. #
  47. interface Serial0/0/3
  48. link-protocol ppp
  49. #
  50. interface GigabitEthernet0/0/0
  51. #
  52. interface GigabitEthernet0/0/1
  53. #
  54. interface GigabitEthernet0/0/2
  55. #
  56. interface GigabitEthernet0/0/3
  57. #
  58. wlan
  59. #
  60. interface NULL0
  61. #
  62. interface LoopBack0
  63. ip address 2.2.2.2 255.255.255.255
  64. #
  65. ospf 1 router-id 2.2.2.2
  66. area 0.0.0.0
  67. network 10.1.1.0 0.0.0.255
  68. network 2.2.2.2 0.0.0.0
  69. #
  70. user-interface con 0
  71. user-interface vty 0 4
  72. user-interface vty 16 20
  73. #
  74. return
  75. <R1>
  76. # R2配置:
  77. <R2>dis current-configuration
  78. #
  79. sysname R2
  80. #
  81. aaa
  82. authentication-scheme default
  83. authorization-scheme default
  84. accounting-scheme default
  85. domain default
  86. domain default_admin
  87. local-user admin password cipher 8{<hFro3c7:z9:%F`[a=0oY#
  88. local-user admin service-type http
  89. #
  90. firewall zone Local
  91. priority 16
  92. #
  93. interface Ethernet0/0/0
  94. ip address 10.1.1.2 255.255.255.0
  95. #
  96. interface Ethernet0/0/1
  97. ip address 10.1.2.1 255.255.255.0
  98. #
  99. interface Serial0/0/0
  100. link-protocol ppp
  101. #
  102. interface Serial0/0/1
  103. link-protocol ppp
  104. #
  105. interface Serial0/0/2
  106. link-protocol ppp
  107. #
  108. interface Serial0/0/3
  109. link-protocol ppp
  110. #
  111. interface GigabitEthernet0/0/0
  112. #
  113. interface GigabitEthernet0/0/1
  114. #
  115. interface GigabitEthernet0/0/2
  116. #
  117. interface GigabitEthernet0/0/3
  118. #
  119. wlan
  120. #
  121. interface NULL0
  122. #
  123. interface LoopBack0
  124. ip address 1.1.1.1 255.255.255.255
  125. #
  126. ospf 1 router-id 1.1.1.1
  127. area 0.0.0.0
  128. network 10.1.1.0 0.0.0.255
  129. network 1.1.1.1 0.0.0.0
  130. area 0.0.0.1
  131. network 10.1.2.0 0.0.0.255
  132. #
  133. user-interface con 0
  134. user-interface vty 0 4
  135. user-interface vty 16 20
  136. #
  137. return
  138. <R2>
  139. # R3配置:
  140. <R3>dis cu
  141. <R3>dis current-configuration
  142. #
  143. sysname R3
  144. #
  145. aaa
  146. authentication-scheme default
  147. authorization-scheme default
  148. accounting-scheme default
  149. domain default
  150. domain default_admin
  151. local-user admin password cipher 8{<hFro3c7bL^B&WSBiQ`o[#
  152. local-user admin service-type http
  153. #
  154. firewall zone Local
  155. priority 16
  156. #
  157. interface Ethernet0/0/0
  158. ip address 10.1.2.2 255.255.255.0
  159. #
  160. interface Ethernet0/0/1
  161. #
  162. interface Serial0/0/0
  163. link-protocol ppp
  164. #
  165. interface Serial0/0/1
  166. link-protocol ppp
  167. #
  168. interface Serial0/0/2
  169. link-protocol ppp
  170. #
  171. interface Serial0/0/3
  172. link-protocol ppp
  173. #
  174. interface GigabitEthernet0/0/0
  175. #
  176. interface GigabitEthernet0/0/1
  177. #
  178. interface GigabitEthernet0/0/2
  179. #
  180. interface GigabitEthernet0/0/3
  181. #
  182. wlan
  183. #
  184. interface NULL0
  185. #
  186. interface LoopBack0
  187. ip address 3.3.3.3 255.255.255.255
  188. #
  189. ospf 1 router-id 3.3.3.3
  190. area 0.0.0.1
  191. network 10.1.2.0 0.0.0.255
  192. network 3.3.3.3 0.0.0.0
  193. #
  194. user-interface con 0
  195. user-interface vty 0 4
  196. user-interface vty 16 20
  197. #
  198. return
  199. <R3>

IBGP And EBGP

image.png

  1. IBGP(Internal BGP):位于相同自治系统的BGP路由器之间的BGP邻接关系。
  2. 两台路由器之间要建立IBGP对等体关系,必须满足两个条件:
  3. 两个路由器所属AS需相同(也即AS号相同)。
  4. 在配置BGP时,Peer命令所指定的对等体IP地址要求路由可达,并且TCP连接能够正确建立
  5. EBGP(External BGP):位于不同自治系统的BGP路由器之间的BGP邻接关系。
  6. 两台路由器之间要建立EBGP对等体关系,必须满足两个条件:
  7. 两个路由器所属AS不同(也即AS号不同)。
  8. 在配置BGP时,Peer命令所指定的对等体IP地址要求路由可达,并且TCP连接能够正确建立.

BGP Configuration[IBGP & EBGP]

image.png

  1. 1. R1、R2及R3属于AS123,R4属于AS 400;
  2. 2. AS123内的R1、R2及R3运行OSPF,通告各自直连接口(包括三台设备的Loopback0接口),注意OSPF域的工作范围;所有设备的Loopback0接口地址为x.x.x.x/32,其中x为设备编号(如R1的接口地址为1.1.1.1/32)。
  3. 3. R3与R4之间建立EBGP对等体关系,R2暂时不运行BGP,R1与R3之间建立IBGP对等体关系,所有的BGP对等体关系基于直连接口建立;R4将直连路由4.4.4.4/32通告到BGP,要求R1能学习到BGP路由4.4.4.4/32;
  4. 4. 修改BGP配置,使得R1与R3基于Loopback0接口建立IBGP对等体关系
  5. # 配置过程:
  6. [V200R003C00]
  7. #
  8. sysname AR1
  9. #
  10. snmp-agent local-engineid 800007DB03000000000000
  11. snmp-agent
  12. #
  13. clock timezone China-Standard-Time minus 08:00:00
  14. #
  15. portal local-server load portalpage.zip
  16. #
  17. drop illegal-mac alarm
  18. #
  19. set cpu-usage threshold 80 restore 75
  20. #
  21. aaa
  22. authentication-scheme default
  23. authorization-scheme default
  24. accounting-scheme default
  25. domain default
  26. domain default_admin
  27. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
  28. local-user admin service-type http
  29. #
  30. firewall zone Local
  31. priority 15
  32. #
  33. interface GigabitEthernet0/0/0
  34. ip address 10.1.12.1 255.255.255.0
  35. #
  36. interface GigabitEthernet0/0/1
  37. #
  38. interface GigabitEthernet0/0/2
  39. #
  40. interface NULL0
  41. #
  42. interface LoopBack0
  43. ip address 1.1.1.1 255.255.255.255
  44. #
  45. bgp 123
  46. router-id 1.1.1.1
  47. peer 2.2.2.2 as-number 123
  48. #
  49. ipv4-family unicast
  50. undo synchronization
  51. peer 2.2.2.2 enable
  52. #
  53. ospf 1 router-id 1.1.1.1
  54. area 0.0.0.0
  55. network 0.0.0.0 255.255.255.255
  56. #
  57. user-interface con 0
  58. authentication-mode password
  59. user-interface vty 0 4
  60. user-interface vty 16 20
  61. #
  62. wlan ac
  63. #
  64. return
  65. [V200R003C00]
  66. #
  67. sysname AR2
  68. #
  69. snmp-agent local-engineid 800007DB03000000000000
  70. snmp-agent
  71. #
  72. clock timezone China-Standard-Time minus 08:00:00
  73. #
  74. portal local-server load portalpage.zip
  75. #
  76. drop illegal-mac alarm
  77. #
  78. set cpu-usage threshold 80 restore 75
  79. #
  80. aaa
  81. authentication-scheme default
  82. authorization-scheme default
  83. accounting-scheme default
  84. domain default
  85. domain default_admin
  86. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
  87. local-user admin service-type http
  88. #
  89. firewall zone Local
  90. priority 15
  91. #
  92. interface GigabitEthernet0/0/0
  93. ip address 10.1.12.2 255.255.255.0
  94. #
  95. interface GigabitEthernet0/0/1
  96. ip address 10.1.23.1 255.255.255.0
  97. #
  98. interface GigabitEthernet0/0/2
  99. #
  100. interface NULL0
  101. #
  102. interface LoopBack0
  103. ip address 2.2.2.2 255.255.255.255
  104. #
  105. bgp 123
  106. router-id 2.2.2.2
  107. peer 1.1.1.1 as-number 123
  108. peer 1.1.1.1 connect-interface LoopBack0
  109. peer 3.3.3.3 as-number 123
  110. peer 3.3.3.3 connect-interface LoopBack0
  111. #
  112. ipv4-family unicast
  113. undo synchronization
  114. peer 1.1.1.1 enable
  115. peer 3.3.3.3 enable
  116. #
  117. ospf 1 router-id 2.2.2.2
  118. area 0.0.0.0
  119. network 0.0.0.0 255.255.255.255
  120. #
  121. user-interface con 0
  122. authentication-mode password
  123. user-interface vty 0 4
  124. user-interface vty 16 20
  125. #
  126. wlan ac
  127. #
  128. return
  129. [V200R003C00]
  130. #
  131. sysname AR3
  132. #
  133. snmp-agent local-engineid 800007DB03000000000000
  134. snmp-agent
  135. #
  136. clock timezone China-Standard-Time minus 08:00:00
  137. #
  138. portal local-server load portalpage.zip
  139. #
  140. drop illegal-mac alarm
  141. #
  142. set cpu-usage threshold 80 restore 75
  143. #
  144. aaa
  145. authentication-scheme default
  146. authorization-scheme default
  147. accounting-scheme default
  148. domain default
  149. domain default_admin
  150. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
  151. local-user admin service-type http
  152. #
  153. firewall zone Local
  154. priority 15
  155. #
  156. interface GigabitEthernet0/0/0
  157. ip address 10.1.23.2 255.255.255.0
  158. #
  159. interface GigabitEthernet0/0/1
  160. ip address 10.1.34.1 255.255.255.0
  161. #
  162. interface GigabitEthernet0/0/2
  163. #
  164. interface NULL0
  165. #
  166. interface LoopBack0
  167. ip address 3.3.3.3 255.255.255.255
  168. #
  169. bgp 123
  170. router-id 3.3.3.3
  171. peer 2.2.2.2 as-number 123
  172. peer 2.2.2.2 connect-interface LoopBack0
  173. peer 10.1.34.2 as-number 400
  174. #
  175. ipv4-family unicast
  176. undo synchronization
  177. peer 2.2.2.2 enable
  178. peer 10.1.34.2 enable
  179. #
  180. ospf 1 router-id 3.3.3.3
  181. area 0.0.0.0
  182. network 0.0.0.0 255.255.255.255
  183. #
  184. user-interface con 0
  185. authentication-mode password
  186. user-interface vty 0 4
  187. user-interface vty 16 20
  188. #
  189. wlan ac
  190. #
  191. return
  192. [V200R003C00]
  193. #
  194. sysname AR4
  195. #
  196. snmp-agent local-engineid 800007DB03000000000000
  197. snmp-agent
  198. #
  199. clock timezone China-Standard-Time minus 08:00:00
  200. #
  201. portal local-server load portalpage.zip
  202. #
  203. drop illegal-mac alarm
  204. #
  205. set cpu-usage threshold 80 restore 75
  206. #
  207. aaa
  208. authentication-scheme default
  209. authorization-scheme default
  210. accounting-scheme default
  211. domain default
  212. domain default_admin
  213. local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
  214. local-user admin service-type http
  215. #
  216. firewall zone Local
  217. priority 15
  218. #
  219. interface GigabitEthernet0/0/0
  220. ip address 10.1.34.2 255.255.255.0
  221. #
  222. interface GigabitEthernet0/0/1
  223. #
  224. interface GigabitEthernet0/0/2
  225. #
  226. interface NULL0
  227. #
  228. interface LoopBack0
  229. ip address 4.4.4.4 255.255.255.255
  230. #
  231. bgp 400
  232. peer 10.1.34.1 as-number 123
  233. #
  234. ipv4-family unicast
  235. undo synchronization
  236. peer 10.1.34.1 enable
  237. #
  238. user-interface con 0
  239. authentication-mode password
  240. user-interface vty 0 4
  241. user-interface vty 16 20
  242. #
  243. wlan ac
  244. #
  245. return