在您的路由器上配置 BGP
在 zenConsole 上建立 BGP 会话后,为了启用 BGP 互联,您需要在自己的路由器上配置 BGP。
操作步骤
- 进入三层网络配置模式 登录您的路由器并进入配置模式。这通常通过命令行接口(CLI)使用 SSH、Telnet 或控制台连接完成。\ 
- 进入 BGP 配置模式 进入三层网络的配置模式后,通过输入以下命令进入 BGP 配置模式: - router bgp <your-as-number>- 将 - <your-as-number>替换为您的自治系统编号(ASN)。\
- 配置 BGP 邻居关系 - 配置 BGP 邻居关系以建立与其他路由器的连接。使用以下命令: - neighbor <neighbor-ip-address> remote-as <neighbor-as-number>- 将 - <neighbor-ip-address>替换为您的 BGP 邻居的内网 IP 地址,即 BGP 会话详情中的对等 IP;将- <neighbor-as-number>替换为对等 ASN(65534)。\
- 配置 BGP 路由策略 - 创建路由策略: - route-map <route-map-name> permit 10
- 匹配路由: - match ip address 1\
 
- 激活 BGP 邻居关系 配置完 BGP 邻居关系和路由策略后,使用以下命令激活 BGP 邻居关系: - neighbor <neighbor-ip-address> activate- 将 - <neighbor-ip-address>替换为您的 BGP 邻居的内网 IP 地址,即 BGP 会话详情中的对等 IP。
示例
pythonCopy coderouter bgp 65000
neighbor 10.0.0.1 remote-as 65534
route-map to-as65534 permit 10
  match ip address 1
neighbor 10.0.0.1 activate- 保存配置 配置完 BGP 后,确保将配置更改保存到三层网络的运行配置中。使用以下命令: - arduinoCopy codewrite memory- 或 - arduinoCopy codecopy running-config startup-config- 这样可以确保配置更改在重启后仍然保留。\ 
- 验证配置 使用各种 show 命令(例如 - show ip bgp、- show ip bgp neighbor)验证 BGP 是否已正确配置并正常运行。
最后更新于
