设为首页】 【加入收藏】 【网站地图】 【商品折扣
娱乐一生 娱乐明星
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
首页  |  网络安全  |  业内新闻  |  网络知识  |  组网方案  |  CISCO-思科技术  |  CISCO产品  |  路由技术  |  交换技术  |  网络协议-protocol  |  局域网常识
当前位置:首页 >> BGP协议 >> BGP配置示例

BGP配置示例 -

CAT 1 
CAT1> (enable) how ru ing-config 
begi 

# ***** ON-DEFAULT CONFIGURATIO ***** 


#versio 6.3(5) 

#system 
set ystem ame CAT1 
set ystem highavailability enable 
!-- Enable high availability o Catalyst witch. 

#vt 
set vt domai cisco 
set vla 1 ame default type ethernet mtu 1500 aid 100001 tate active 
[..] 
set vla 10,20 

#set oot command 
set oot config-register 0x2102 
set oot ystem flash ootflash:cat6000-sup.6-3-5.bi 

#module 3 : 48-port 10/100BaseTX Ethernet 
set vla 10 3/2 
!-- ort 3/2 i co ected to AS10 o VLAN 10. 

#module 5 : 8-port 1000BaseX Ethernet 
set module ame 5 
set trunk 5/2 o isl 1-1005,1025-4094 
!-- ort 5/2 i co ected to CAT 2 a Trunk. 

#module 15 : 1-port Multilayer witch Feature Card 
!-- MSFC #1 o ort 1, Mod 15. 

#module 16 : 1-port Multilayer witch Feature Card 
!-- MSFC #2 o ort 2, Mod 16. 
CAT 2 
CAT2 (enable) how ru ing-config 
begi 

# ***** ON-DEFAULT CONFIGURATIO ***** 


#versio 6.3(5) 

#system 
set ystem ame CAT2 
set ystem highavailability enable 
!-- Enable high availability o Catalyst witch. 

#vt 
set vt domai cisco 
set vla 1 ame default type ethernet mtu 1500 aid 100001 tate active 
set vla 10,20 

#set oot command 
set oot config-register 0x2102 
set oot ystem flash ootflash:cat6000-sup.6-3-5.bi 


#module 3 : 48-port 10/100BaseTX Ethernet 
set vla 20 3/3 
!-- ort 3/3 i co ected to AS20 o VLAN 20. 

#module 4 : 8-port 1000BaseX Ethernet 
set module ame 4 
set trunk 4/2 o isl 1-1005,1025-4094 
!-- ort 4/2 i co ected to CAT 1 a Trunk. 

#module 15 : 1-port Multilayer witch Feature Card 
!-- MSFC 1 o ort 1, Mod 15. 

#module 16 : 1-port Multilayer witch Feature Card 
!-- MSFC #2 o ort 2, Mod 16. 
MSFC Configuratio o CAT1 
CAT1> (enable) 
CAT1> (enable) e io 15 
Trying Router-15... 
Co ected to Router-15. 
Escape character i ’^]’. 
MSFC-CAT1>enable

MSFC-CAT1#show ru ing-config 
Building configuration... 
Current configuratio : 868 yte 

versio 12.1 

hostname MSFC-CAT1 

boot ystem ootflash:c6msfc2-jsv-mz.121-8b.E7 

i u et-zero 



redundancy 
!-- Thi command enable redundancy. 
high-availability 
!-- Thi command enable high availability. 
single-router-mode 
!-- Thi command enable RM. 

interface Vlan10 
i addre 192.168.1.1 255.255.255.0 
!-- Interface Vlan10 i co ected to AS10. 

interface Vlan20 
i addre 192.168.2.3 255.255.255.0 
!-- Interface Vlan20 i co ected to interface Vlan20 o CAT2 via the trunk. 

router g 4 
no ynchronizatio 
bg log-neighbor-change 
network 192.168.0.0 mask 255.255.0.0 
neighbor 192.168.1.2 remote-a 10 
!-- Thi command establishe eBGP eering with AS10. 
neighbor 192.168.2.1 remote-a 4 
!-- Thi command establishe iBGP eering with interface VLAN 20 o CAT2. 
neighbor 192.168.2.1 ext-hop-self 
!-- Thi command a ig a ext-ho value to 192.168.2.3 !-- for update ent to 192.168.2.1 (the iBGP eer). 

i cla le 
i route 192.168.0.0 255.255.0.0 ull0 
MSFC Configuratio o CAT2 
CAT2 (enable) 
CAT2 (enable) e io 15 
Trying Router-15... 
Co ected to Router-15. 
Escape character i ’^]’. 
MSFC-CAT2>enable 
MSFC-CAT2#show ru ing-config 
Building configuration... 
Current configuratio : 890 yte 

versio 12.1 

hostname MSFC-CAT2 

boot ystem flash ootflash:c6msfc-jsv-mz.121-8b.E7 

,


  
  总之,BGP不是每次都广播所有的路由信息,而是在初始化全部路由信息后只发送路由的变化量(增量)。这样保证了BGP和对端的最小通信量,但同时增加了BGP的复杂程度。因为对于IGP,本地路由协议只需发送发送时刻所知的全部路由,而不保存任何已发送信息,路由选择的工作由对端来完成;而BGP必须为每个BGP对端保存已经发送的路由信息,以便发送一条新路由前确认其是否真的应该发送。
  
  为了减小路由表的体积和发送路由的通信量,BGP还支持CIDR(Cla le InterDomai Routing)。它使用带有较短的掩码(相对于自然掩码)的路由来在一条路由中表达更多的路由信息。如从202.112.1.0/24-202.112.254.0/24可以使用202.112.0.0/16表示,从而减小了路由表的体积和发送路由信息时的网络流量。
  
  同时,作为AS自治区域间的路由协议,由于政治的、经济的等原因,BGP需要按照不同的路由的属性控制路由的发送和引入。因此,BGP有丰富的路由策略控制手断。
  
  5、BGP协议中消息的应用
  BGP使用TCP建立连接,本地监听端口为179。和TCP建立相同,BGP连接的建立也要经过一系列的对话和握手。TCP通过握手协商通告其端口等参数,BGP的握手协商的参数有:BGP版本,BGP连接保持时间,本地的路由器标识(Router ID),授权信息等。这些信息都在OPEN消息中体现。
  
  BGP连接的具体过程参见BGP有限状态机。
  
  BGP连接建立后,如果有路由需要发送则发送UPDATE消息通告对端路由信息。UPDATE消息主要用来通告路由信息,包括失效(退出)路由。UPDATE消息发布路由时,还要指定此路由的路由属性,用以帮助对端BGP协议选择最佳的路由。需要注意的是,由UPDATE消息的格式可以看出每个UPDATE消息只可以发布一种路由属性,本地BGP如果有路由属性完全相同的路由(只有信宿地址不同),则可以由一条UPDATE消息发布,否则只能使用不同的UPDATE消息发布。关于路由属性在BGP选择路由时的应用,参见BGP协议路由属性的应用部分。
  
  在本地BGP路由变化时,也使用UPDATE消息修正对端BGP的路由表。
  
  经过一段时间的路由信息交换后,本地BGP和对端BGP都无新路由通告,趋于稳定了。此时要定时发送KEEPALIVE消息以保持BGP连接的有效性。对于本地BGP,如果在超过保持时间的时间内,还未收到任何对端BGP消息,就认为此BGP连接已经无效,将此BGP连接断开。
  
  当本地BGP在运行中发现错误时,要发送NOTIFY消息通告BGP对端。如对端BGP版本本地不支持,本地BGP收到了结构非法的UPDATE消息等。本地BGP退出BGP连接时也要发送NOTIFY消息。BGP收到NOTIFY消息后,要作相应处理。
  
  6、BGP伙伴的有限状态机(FSM)
  BGP有限状态机有6种状态:
  
  1-Idle
  
  2-Co ect
  
  3-Active
  
  4-Ope ent
  
  5-OpenConfirm
  
  6-Established
  
  BGP事件:
  
  1-BGP tart
  
  2-BGP top
  
  3-BGP Tra ort co ectio open
  
  4-BGP Tra ort co ectio closed
  
  5-BGP Tra ort co ectio ope failed
  
  6-BGP Tra ort fatal error
  
  7-Co ectRetry timer expired
  
  8-Hold Timer expired
  
  9-KeepAlive timer expired
  
  10-Receive OPE me age
  
  11-Receive KEEPALIVE me age
  
  12-Receive UPDATE me age
  
  13-Receive OTIFICATIO me age
  


  一个典型的过程为:Idle(启动消息)->Co ect(TCP连接成功,发OPEN)->Ope ent(收到OPEN消息,协商成功)->OpenConfirm(收到KEEPALIVE消息)->Established(TCP连接关闭,有错误,或处理UPDATE消息失败,或收到NOTIFICATION消息)->Idle 

,



i u et-zero 


redundancy 
!-- Thi command enable redundancy. 
high-availability 
!-- Thi command enable high availability. 
single-router-mode 
!-- Thi command enable RM. 

interface Vlan10 
i addre 192.168.1.3 255.255.255.0 
!-- Interface Vlan10 co ected to interface Vlan10 o CAT1 via the trunk. 

interface Vlan20 
i addre 192.168.2.1 255.255.255.0 
!-- Interface Vlan20 co ected to AS20. 

router g 4 
no ynchronizatio 
bg log-neighbor-change 
network 192.168.0.0 mask 255.255.0.0 
neighbor 192.168.2.2 remote-a 20 
!-- Thi command establishe eBGP eering with AS20. 
neighbor 192.168.2.3 remote-a 4 
!-- Thi command establishe iBGP eering with interface Vlan20 o CAT1. 
neighbor 192.168.2.3 ext-hop-self 
!-- Thi command a ig a ext-ho value to 192.168.2.1 !-- for update ent to 192.168.2.3 (the iBGP eer). 

i cla le 
i route 192.168.0.0 255.255.0.0 ull0 
Troubleshoot 
Now that you’ve verified the high availability RM configuration, you eed to verify the BGP MSFC o CAT1 and CAT2. 
Use the how i g ummary command to verify the eighbor establishment. 
The output elow confirm ucce ful eBGP and iBGP eering with AS10 and the CAT2 MSFC re ectively. 
MSFC-CAT1#show i g ummary 
BGP router identifier 192.168.2.3, local A umber 4 
BGP table versio i 4, mai routing table versio 4 
3 etwork entrie and 4 ath using 435 yte of memory 
BGP ath attribute entrie using 240 yte of memory 
BGP AS-PATH entrie using 48 yte of memory 
BGP route-ma cache entrie using 0 yte of memory 
BGP filter-list cache entrie using 0 yte of memory 
BGP activity 3/14 refixes, 4/0 aths, ca interval 15 ec 
Neighbor V A MsgRcvd MsgSent TblVer InQ OutQ Up/Dow tate/PfxRcd 
192.168.1.2 4 10 90 92 4 0 0 01:26:02 1 
192.168.2.1 4 4 91 91 4 0 0 01:25:38 2 
Verify the BGP tate o the active MSFC i CAT2. 
The output elow confirm ucce ful eBGP and iBGP eering with AS20 and CAT1 re ectively 
MSFC-CAT2#show i g ummary 
BGP router identifier 192.168.2.1, local A umber 4 
BGP table versio i 4, mai routing table versio 4 
3 etwork entrie and 4 ath using 435 yte of memory 
BGP ath attribute entrie using 240 yte of memory 
BGP AS-PATH entrie using 48 yte of memory 
BGP route-ma cache entrie using 0 yte of memory 
BGP filter-list cache entrie using 0 yte of memory 
BGP activity 3/0 refixes, 4/0 aths, ca interval 15 ec 
Neighbor V A MsgRcvd MsgSent TblVer InQ OutQ Up/Dow tate/PfxRcd 
192.168.2.2 4 20 110 112 4 0 0 01:46:43 1 
192.168.2.3 4 4 101 101 4 0 0 01:35:09 2 
I the event the designated MSFC (Mod 15 o CAT1) experience a failure, the tandby MSFC (Mod 16 o CAT1) take 
over the role of active MSFC. It i important to understand that with the failure of the designated MSFC and fail over 
to the ondesignated MSFC, 
packet witching will continue to work with the Cisco Expre Forwarding (CEF) table rogrammed y the old designated 
MSFC.The ewly designated MSFC will eventually re-program the CEF table with it ow entrie and the old entrie will expire. 
Failure of designated MSFC i imulated y resetting Mod 15 o CAT1 a how elow. 
CAT1> (enable) reset 15 

Thi command will reset module 15. 
U aved configuratio o module 15 will e lost 

,


Do you want to continue (y/n) [n]? y 
2002 May 16 11:52:54 %SYS-5-MOD_RESET:Module 15 reset from Co ole// 
Resetting module 15... 
Ping traffic wa generated from AS10 to a destinatio i AS20 during the fail over o CAT1 from designated to on-designated MSFC. ote that there wa minimal acket lo during thi fail over and the acket forwarding continued to work
 with the old CEF table rogrammed y the Mod 15 MSFC until the Mod 16 MSFC re-program the CEF table with it ow entries. 
AS10-Router#ping 
Protocol [ip]: 
Target I addre : 172.16.1.1 
Repeat count [5]: 1000 
Datagram ize [100]: 
Timeout i econd [2]: 
Extended command [n]: 
Swee range of ize [n]: 
Type escape equence to abort. 
Sending 1000, 100-byte ICM Echo to 172.16.1.1, timeout i 2 econds: 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!! 
Succe rate i 99 ercent (999/1000), round-tri min/avg/max = 1/3/116 ms  

,



 加入收藏 打印本页 关闭窗口 返回顶部
相关文章
· BGP协议建立连接及使用ISDN备份卫星链路
· 理解BGP协议同步规则
· BGP:边界网关协议概述
· 边缘网关协议(BGP)简介
· I 如何在网内部署BGP路由协议
· 路由器BGP协议配置命令
· BGP路由的优化
· BGP常见问题
· 网络支架—BGP
· 在可扩展的网络中实施BGP
 

娱乐图摘

更多 >>

靓丽清纯美女meimei

美女私房全裸照
导演劝女演员脱衣服(视频)

大胆火辣人体艺术写真(图)

黑丝妹妹热辣诱惑-丝袜美女妹妹

PLMM 漂亮妹妹图集-妹妹图库

全球美女图库-美女集中营

52MM 我爱漂亮妹妹-制服妹妹诱惑

图王图库-世界美女明星图片资料库
美女写真集锦

激情两性-解密性生活
浴室MM湿身内衣诱惑
邻家小妹洗澡被偷拍(视频)

热点文章

更多

· IP骨干网BGP路由协议的扩展性
· BGP常见问题
· 网络支架—BGP
· BGP协议建立连接及使用ISDN备份卫星链路
· BGP邻居协商过程
· BGP协议分析-报文、状态机
· BGP:边界网关协议概述
· BGP配置示例
· 边缘网关协议(BGP)简介
· 理解BGP协议同步规则

热点文章

更多