`

BGP

 
阅读更多

配置BGP
router bgp 100 (AS号)
neighbor{ip-address|peer-group-name} remote-as autonomous-system

network network-number{mask network-mask} {route-map map-tag}

no syschronization 关闭同步(默认)
syschronization 开启同步

bgp router-id x.x.x.x


router bgp 123
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 updtae lo0

router bgp 123
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 updtae lo0

router bgp 400
neighbor 4.4.4.4 remote-as 123

###############
BGP案例1:   ##
###############
R1
conf ter
int s 0/0
ip add 10.1.12.1 255.255.255.0
no sh
exit
int lo0
ip add 1.1.1.1 255.255.255.0
no sh
exit


router bgp 123
neighbor 10.1.12.2 remote-as 123

no router bgp 123

router ospf 1
network 10.1.12.1 0.0.0.0 a 0
network 1.1.1.1 0.0.0.0 a 0

router bgp 123
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source loopback 0

ip route 10.1.34.0 255.255.255.0 s 0/0
no ip route 10.1.34.0 255.255.255.0 s 0/0
clear ip bgp * soft

router bgp 123
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source loopback 0

#######################################
R2
conf ter
int s 0/0
ip add 10.1.12.2 255.255.255.0
no sh
exit
int s 0/1
ip add 10.1.23.2 255.255.255.0
no sh
exit
int lo0
ip add 2.2.2.2 255.255.255.0
no sh
exit

router bgp 123
neighbor 10.1.12.1 remote-as 123
neighbor 10.1.23.3 remote-as 123

no router bgp 123

router ospf 1
network 10.1.12.2 0.0.0.0 a 0
network 10.1.23.2 0.0.0.0 a 0
network 2.2.2.2 0.0.0.0 a 0

router bgp 123
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source loopback 0

neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source loopback 0


##########################################
R3
conf ter
int s 0/0
ip add 10.1.23.3 255.255.255.0
no sh
exit
int s 0/1
ip add 10.1.34.3 255.255.255.0
no sh
exit
int lo0
ip add 3.3.3.3 255.255.255.0
no sh
exit

router bgp 123
neighbor 10.1.23.2 remote-as 123
neighbor 10.1.34.4 remote-as 400

no router bgp 123

router ospf 1
network 10.1.23.3 0.0.0.0 a 0
network 3.3.3.3 0.0.0.0 a 0

router bgp 123
neighbor 1.1.1.1 remote-as 123
neighbor 1.1.1.1 update-source loopback 0

router bgp 123
neighbor 10.1.34.4 remote-as 400
neighbor 1.1.1.1 next-hop-self

router bgp 123
no neighbor 10.1.34.4
neighbor 4.4.4.4 remote-as 400
neighbor 4.4.4.4 update-source lo0

ip route 4.4.4.0 255.255.255.0 s 0/1
neighbor 4.4.4.4 ebgp-multihop 2


ip route 4.4.4.4 255.255.255.255 s 0/1

router bgp 123
neighbor 2.2.2.2 remote-as 123
neighbor 2.2.2.2 update-source loopback 0
neighbor 2.2.2.2 next-hop-self

###########################################
R4
conf ter
int s 0/0
ip add 10.1.34.4 255.255.255.0
no sh
exit
int lo0
ip add 4.4.4.4 255.255.255.0
no sh
exit

router bgp 400
neighbor 10.1.34.3 remote-as 123

network 4.4.4.0 mask 255.255.255.0

no neighbor 10.1.34.3
neighbor 3.3.3.3 remote-as 123
neighbor 3.3.3.3 update-source lo0

ip route 0.0.0.0 0.0.0.0 s 10.1.34.3
neighbor 3.3.3.3 ebgp-multihop 2

分享到:
评论

相关推荐

    RFC8571 BGP-LS

    BGP-LS(边界网关协议-链路状态)是一种用于在BGP(边界网关协议)中传播链路状态信息的机制。RFC8571定义了新的BGP-LS TLV(Type-Length-Value,类型长度值)格式,以携带在IS-IS和OSPF协议中定义的IGP(内部网关...

    交换中心技术BGP router-server模式

    为了解决这一问题,交换中心采用了BGP router-server模式,即BGP路由服务器模式。 BGP路由服务器是一种为互联网交换运营商设计的特性,它为在交换中心的ISP们提供了一种替代传统的eBGP全网状对等互联的方式。路由...

    H3C BGP命令

    在深入探讨H3C BGP命令之前,我们首先简要了解一下什么是BGP(Border Gateway Protocol,边界网关协议)。BGP是一种外部网关协议,用于在不同的自治系统(AS)之间传输路由信息。它是最主要的互联网路由协议之一,...

    BGP同步剖析(基于华为路由器与交换机)

    BGP 同步剖析(基于华为路由器与交换机) BGP(Border Gateway Protocol,边界网关协议)是一种自治系统之间的路由协议,用于交换路由信息。BGP 同步问题是一个常见的困惑,许多人都遇到过类似的困惑。下面我们将对...

    eNSP实验:BGP 实验

    eNSP实验:BGP实验 eNSP实验:BGP实验是基于华为路由器的实验,主要涉及到BGP(Border Gateway Protocol,边界网关协议)的配置和验证。本实验旨在帮助读者熟悉BGP协议的基本概念和配置方法,掌握BGP在实际网络中的...

    实用的 ospf+bgp配置详解

    "实用的 OSPF+BGPR 配置详解" OSPF(Open Shortest Path First,开放式最短路径优先)是...OSPF 和 BGP 是两种不同的路由协议,OSPF 负责内部路由,而 BGP 负责外部路由,两者结合可以实现更加灵活和可靠的网络路由。

    华为路由器三层路由防环专题 03 BGP OSPF协议互引路由场景分析

    如果某个设备(如DeviceE)同时接收到来自BGP和OSPF的同一路由,且OSPF路由的优先级高于BGP,那么设备会选择OSPF路由,从而导致BGP路由再次被引入BGP,形成了一个循环。 防止路由环路的建议配置示例通常包括使用...

    八、基于BGP实现两个AS系统间通信

    目前使用最多的BGP为版本4,即BGP-4。 BGP(Border Gateway Protocol)是用于AS间的动态路由协议,交换AS间的可达路由信息,防止路由环路。 BGP属于外部网关协议EGP,与IGP不同,其目的不在于发现和计算路由,而在于...

    bgpd.rar bgp协议

    **BGP(Border Gateway Protocol)协议详解** BGP,即边界网关协议,是互联网上的一种核心路由协议,用于在不同的自治系统(AS)之间交换路由信息。BGP的主要功能是确保数据包能够正确地在互联网上的不同网络之间...

    BGP笔记 BGP理论知识

    BGP 基础知识点总结 BGP(Border Gateway Protocol)是一种基于 TCP 的路由协议,用于在自治系统(AS)之间交换路由信息。BGP 属于 EGP(Exterior Gateway Protocol),是一种承载大量路由的距离矢量协议。 1. BGP...

    BGP学习,BGP属性

    **BGP(边界网关协议)**是互联网上用于自治系统(AS)之间交换路由信息的一种路径向量协议。在大型网络中,BGP扮演着关键角色,因为它负责在全球范围内建立和维护网络间的可达性信息。本文将深入探讨BGP的基础知识...

    H3C+ipv6+BGP技术白皮书

    ### H3C+ipv6+BGP技术白皮书知识点解析 #### 一、概述 《H3C+ipv6+BGP技术白皮书》由杭州华三通信技术有限公司发布,旨在详细介绍IPv6环境下BGP(Border Gateway Protocol)的应用与扩展。随着互联网的发展,IPv6...

    OSPF+BGP+ISIS+重分发综合实验

    OSPF (Open Shortest Path First)、BGP (Border Gateway Protocol) 和 ISIS (Intermediate System to Intermediate System) 是网络路由协议中的重要成员,它们在互联网和大型企业网络中扮演着核心角色。重分发...

    BGP 路由属性 BGP状态机

    **BGP(边界网关协议)是互联网上用于在自治系统(AS)之间交换路由信息的重要协议。BGP路由属性和状态机是其核心概念,它们对于理解BGP的工作原理至关重要。** ### BGP 路由属性 BGP路由属性决定了如何选择和传播...

    BGP中文笔记整理,需要的看一下

    ### BGP中文笔记知识点梳理 #### 一、BGP与AS概述 - **BGP**:边界网关协议,主要用于不同自治系统(AS)之间的路径选择。与IGP(内部网关协议)不同,后者专注于同一AS内的路由选择。BGP能够确保跨AS的路由不会...

    HCIP学习笔记BGP思维导图.pdf

    **BGP(边界网关协议)**是一种外部网关协议,用于在不同的自治系统(AS)之间交换路由信息。BGP在应用层运行,并且基于TCP进行通信,使用默认的端口号179来建立邻居关系。其主要作用是管理和控制AS之间的路由信息...

Global site tag (gtag.js) - Google Analytics