H3CNE-33-BGP

Border Gateway Protocol,边界网关路由协议

路由协议分类

  • 内部网关路由协议IGP:rip、ospf、is-is
  • 外部网关路由协议EGP:EGP(已淘汰)、BGP

BGP特点:

  • 针对大型网络
  • BGP是运行在IGP之上
  • BGP可以跨路由器建立邻居关系
  • BGP常见报文:Open、Keepalive、Update

BGP配置示例

R1:

bash 复制代码
ospf 1
 area 0
  net 1.1.1.0 0.0.0.255
  net 12.1.1.0 0.0.0.255

R2:

bash 复制代码
ospf 1
 area 0
  net 2.2.2.0 0.0.0.255
  net 12.1.1.0 0.0.0.255

R1:

bash 复制代码
bgp 100
 router-id 1.1.1.1
 peer 2.2.2.2 as-number 100
 peer 2.2.2.2 connext-interface loopback 0
 #
 address-family ipv4
  peer 2.2.2.2 enable

R2:

bash 复制代码
bgp 100
 router-id 2.2.2.2
 peer 1.1.1.1 as-nu 100
 peer 1.1.1.1 con loo 0
 #
 address-fam ipv4
  peer 1.1.1.1 en

查看邻居表

bash 复制代码
dis bgp peer ipv4

BGP传递路由两种方式

  • network 宣告
  • import 引入

R1:

bash 复制代码
bgp 100
 address-family ipv4 unicast
  network 8.8.8.0 24  # 宣告的路由必须和现有路由表中的一致

R2:

bash 复制代码
bgp 100
 address-fa ipv4 uni
 import 9.9.9.0 24

查看BGP路由表

bash 复制代码
dis bgp routing-table ipv4
相关推荐
Mason Lin2 小时前
2025年1月22日(网络编程 udp)
网络·python·udp
字节全栈_rJF3 小时前
概述、 BGP AS 、BGP 邻居、 BGP 更新源 、BGP TTL 、BGP路由表、 BGP 同步
网络·智能路由器·php
EchoToMe3 小时前
电信传输基本理论/5G网络层次架构——超三万字详解:适用期末考试/考研/工作
网络·5g·架构
云空3 小时前
《DeepSeek 网页/API 性能异常(DeepSeek Web/API Degraded Performance):网络安全日志》
运维·人工智能·web安全·网络安全·开源·网络攻击模型·安全威胁分析
doubt。3 小时前
8.攻防世界Web_php_wrong_nginx_config
网络·安全·web安全·网络安全
没有名字的小羊4 小时前
Cyber Security 101-Build Your Cyber Security Career-Security Principles(安全原则)
运维·网络·安全
m0_465215794 小时前
TCP & UDP Service Model
服务器·网络·tcp/ip
千夜啊4 小时前
Nginx 运维开发高频面试题详解
运维·nginx·运维开发
esmember4 小时前
电路研究9.2.6——合宙Air780EP中HTTP——HTTP GET 相关命令使用方法研究
网络·网络协议·http·at指令