BGP路由协议-CISCO设备
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Internal BGP
•IGBP refers to the presence of BGP neighbors within the same AS. • The neighbors do not have to be directly connected.
External BGP
• When BGP neighbors belong to different autonomous systems they are called EBGP. • EBGP neighbors, by default, need to be directly connected.
BGP Peering
RouterA# show ip bgp summary BGP table version is 23, main routing table version 23 10 network entries and 11 paths using 1242 bytes of memory 4 BGP path attribute entries using 380 bytes of memory BGP activity 23/13 prefixes, 38/27 paths 0 prefixes revised. Neighbor State/PfxRcd 10.1.1.100 192.168.1.18 192.168.1.34 192.168.1.50 V 4 4 4 4 AS MsgRcvd MsgSent 65200 65101 65101 65101 211 214 214 214 211 226 226 225 TblVer 13 23 23 23 InQ OutQ Up/Down 0 0 0 0 0 0 0 0 00:01:53 00:00:13 00:00:09 00:00:06 5 1 1 3
BGP neighbor Command
Router(config-router)#
neighbor {ip-address | peer-group-name} remote-as autonomous-system
• The neighbor command activates a BGP session with this neighbor.(只有指定邻居双方,才能建立会话.) • The term remote-as shows what AS this neighbor is in. This AS number is used to determine if the neighbor is internal or external.(邻居AS号一样,为 IBGP;不一样为EBGP.) • This command is used for both external and internal neighbors. • The IP address specified is the destination address of BGP packets going to this neighbor.(TCP连接或环回口地址.) • This router must have an IP pathway to reach this neighbor before it can set up a BGP relationship.
BGP Characteristics (特征)
BGP is a distance-vector protocol with the following enhancements: Reliable updates: BGP runs on top of TCP (port 179;可靠通信.) Incremental, triggered updates only(增量更新,触发更新) Periodic keepalive messages to verify TCP connectivity(周期性通过keepalive包发送消息.) Rich metrics (called path vectors or attributes,丰富的计量值,一一 比较,BGP中称为属性;类似于IGP中的开销值.) Designed to scale to huge internetworks (e.g., the Internet;专门为大型互联网络而设计.) 支持VLSM可变长子网掩码。
BGP Commands
Routerห้องสมุดไป่ตู้config)#
router bgp autonomous-system(64512-65535)
• This command, with no subcommands, does not activate BGP.(还需要其他子命令配合.) • Only one instance of BGP can be configured on the router at a single time.(仅一个BGP进程,边界是链路.) • The autonomous system number identifies the autonomous system to which the router belongs. • The autonomous system number in this command is compared to the autonomous system numbers listed in neighbor statements to determine if the neighbor is an internal or external neighbor.(确定邻居关系)
IP routing table
List of best paths to destination networks(列出了到目标网 络的最佳路径)
BGP表
运行BGP的路由器保存着一个独立于IP路由表 的BGP表.
SHOW IP BGP
BGP table version is 23, local router ID is 192.168.1.49 Status codes: s suppressed, d damped, h history, * valid, > best, i internal Origin codes: i - IGP, e - EGP, ? - incomplete Network *> 10.0.0.0 *> 172.16.10.0/24 Next Hop 10.1.1.100 10.1.1.100 Metric LocPrf Weight Path 0 0 65200 i 0 0 65200 i
BGP States
When establishing a BGP session, BGP goes through the following steps: Idle(闲置状态): Router is searching routing table to see if a route exists to reach the neighbor. Connect(连接状态): Router found route and has completed three-way TCP handshake. Open sent(发送消息): Open message sent with the parameters(参数) for the BGP session. Open confirm(确认消息): Router received agreement on the parameters for establishing session. Established(建立邻居,开始路由): Peering is established; routing begins.
BGP路由协议 BGP路由协议
BGP Autonomous Systems
• An AS is a collection of networks under a single technical administration.(自治系统经典定义:在单一 技术下管理下,采用同一种内部网关协议和统一度量值在AS内转发数据包,并采用一种外部协议将 数据包转发到其他AS的一组路由器.) • IGPs operate within an AS. • BGP is used between Autonomous Systems. • Exchange of loop-free routing information is guaranteed.(BGP的主要目标是提供一种能够保证自治 系统间无环路的路由选择信息交换的域间路由系统.)
Example: BGP neighbor Command
BGP network Command
Router(config-router)#
network network-number [mask network-mask]
• This command tells BGP what network to advertise, not how to advertise the network.(宣告什么网络,将此路由注入BGP;也可使用再发布.) • The command does not activate the protocol on an interface. • Without a mask option, it advertises classful networks. If a subnet of the classful network exists in a routing table, the classful address is announced if auto summary is enabled. Auto summary is enabled by default. • BGP looks for an exact match in the local routing table before announcing this route.(宣告前 必须保证路由是可用的.) • 在IOS 12.0之前的版本中,每台BGP路由器有200条NETWORK限制;现在这个限制已经取消 了;路由器的内存决定了我们可以使用的NETWORK命令的最大数量. • MASK命令可以处理超网和子网;自动汇总缺省是自动的. • NETWORK命令列表必须包括AS中我们想要通告的所有网络,而不仅仅是那些本地连接在 路由器上的网络.
Peers = Neighbors
• A BGP peer, also known as a BGP neighbor, is a specific term that is used for BGP speakers that have established a neighbor relationship. • Any two routers that have formed a TCP connection to exchange BGP routing information are called peers or neighbors.
BGP Databases(数据表)
Neighbor table
List of BGP neighbors(BGP对等体,邻居,交换路径信息,与 RIP类似.) 可以直连可以不直连. 邻居关系建立在TCP连接之上.
BGP forwarding table/database
List of all networks learned from each neighbor Can contain multiple pathways to destination networks Database contains BGP attributes for each pathway
BGP Message Types
BGP defines the following message types: – Open:(版本号4,AS号,保持时间,路由器ID) • Includes holdtime and BGP router ID – Keepalive:(类似HELLO包) – Update:(撤消路由,路径属性,网络层可达信息) • Information for one path only (could be to multiple networks) • Includes path attributes and networks – Notification:(通告消息,检测到出错条件时,发送通知消息) • When error is detected • BGP connection is closed after sent