CCIE学习笔记 ----BGP

修改weight

router bgp 1

nrighbor [Address] weight 10

修改单条

access-list 6 permit 6.6.6.6

router-map xxx permit 10

match ip address 6

set weight 20

router-map xxx permit 20

router bap 1

neihgbor [address] router-map xxx in

2.local_preference:AS内有效,AS内传递,默认值是100,比较的是其他AS

修改local_preference

route-map xxx permit 10

set local-preference 110

router bgp 1

neighbor [address] route-map xxx out

发给邻居时携带local-preference属性

neighbor [address] route-map xxx in

从邻居学到的路由携带local-preference属性

3。本地优先

路由汇聚

router bgp 1

aggregate-address 汇聚后的网段 汇聚后的掩码 summary-only as-set

summary only:抑制明细,只发汇聚路由

as-set:汇聚后携带原有AS_PATH信息

4.as_path

bgp bestpath as-path ignore  忽略AS_PATH选路,隐藏命令。

抑制列表

suppress-map

会向邻居发送汇总路由和明细路由,被抑制的路由除外

router bgp [AS]

aggregate-address 汇聚后的网段 汇聚后的掩码 suppress-map xxx

route-map xxx

match ip address abc

4.as_path

route-map xxx permit 10

set as-path prepend 5

router bgp 1

neighbor 邻居地址 route-map xxx in

5.路由来源:IGP>EGP>INCOMPLETE  i>e>?

bgp bestpath as-path ignore

忽略PA_PATH选路,隐藏命令,必须手工输入

Prefer the path with the lowest multi-exit discriminator(MED)

MED:传递到别的AS中,供别的AS选路使用。默认0.

修改MED:

route-map xxx permit 10

set metric 119

router bgp 2

neighbor 邻居地址 route-map xxx out

-----------------------------------------------------------------------------------------------------------

如果收到的BGP路由的AS_PATH含有自身的AS号,则拒收该路由

解决方案1:allowas-in

router bgp AS号

neighbor  [address] allowas-in

*allow-in 允许携带自己AS号的路由进入

解决方案2:as-override

PE-CE之间:

router bgp AS号

neighbor [address] as-override

*asoverride

发送者处理,发送的时候检查AS_PATH,如果有AS号和对端AS号一样,则改成自己的AS号。

AS_PATH

ip as-path access-list 1 permit _2$  允许源为2的路由

ip as-path access-list 2 permit ^2$

联邦(联盟):64512-65535

bgp confederation identifier AS号

bgp confederation peer0 AS号

community属性

local-AS 仅传一个AS

no-advertise 仅传一跳

no-export     仅传一个公有AS

需要neighbor BGP邻居地址 send-community 配合

aa:nn传递comunity

需要ip bgp-community new-format命令才能显示正确格式

router bgp AS号

neighbor BGP邻居地址 route-map xxx out

neighbor BGP邻居地址 send-community

route-map xxx permit 10

时间: 2024-08-29 07:18:50

CCIE学习笔记 ----BGP的相关文章

CCIE学习笔记之BGP

Aggregate-address address mask as-set 聚合路由时不然as-path信息丢失 R1(config-router)#aggregate-address 1.0.0.0255.0.0.0 as-set Aggregate-address address mask as-set advertise-maproute-map-name 用advertise-map决定聚合总保留那个AS路径信息 在R2上: aggregate-address 10.1.1.0 255.

CCIE学习笔记之MPLS与MPLS VPN

配置: 接口下启用:mpls ip mpls label protocol ldp | tdp | both 配置LDP RID(全局):mpls ldp route-id interface [force] 如mpls ldp route-idloopback0 force 注:force强制命令立即生效,注意对方的LDP RID可达才能和对方建立LDP邻居关系 修改MPLS MTU(接口):mpls mtu [override] 1516       //因为加上4字节的标签,这条命令可以用

CCIE学习笔记之OSPF

Area area-id default-cost cost 在ABR或ASBR上设置广播到stub,total stub,NSSA的默认路由的开销,默认为1. Router ospf 1 Area 1 default-cost 10 Area area-id nssa no-redistribution 在NSSA区域连接area 0的ABR上,不让此ABR把重发布进此ABR的路由发布进NSSA,而只发布进area 0. Router ospf 1 Area 1 nssa no-redistr

CCIE学习笔记之特性集

etherchannel loadbalance  dst –mac 以太网隧道负载方式基于目标MAC MST (config)# spanning -tree mode mst (config)# spanning -tree mst configuration (config-mst )#  name CCIE (config-mst )#  instance 1 vlan 20,40,60 spanning -tree mst 3 root primary spanning -tree m

CCIE学习笔记之EEM

当内存使用到一定程度生成日志并发邮件: 注册applet并进入applet配置模式: Router(config)# event manager appletmemory-fail 定义触发事件: event snmp oid oid-value get-type{exact|next} entry-op operator entry-val entry-value[exit-comb| and}] [exit-opoperator] [exit-val exit-value] [exit-ti

CCIE学习笔记之EIGRP

CCIE学习笔记 向eigrp域宣告一条默认路由: 1.      用ipdefault-network: R2关键配置: Ip route 2.0.0.0255.0.0.0 null 0  //在路由表中制造一条主类网络 Router eigrp 1 Network2.0.0.0            //宣告主类网络 Ipdefault-network 2.0.0.0    //相当于告诉EIGRP域内的路由器默认网关在2.0.0.0,所以发布这个网关的路由器的路由表要可达这个地址 Ip r

CCIE学习笔记之RSVP

Router(config-if)# ip rsvp bandwidth  [ interface-kbps] [ single-flow-kbps ] ! EnablesRSVP for IP on an interface Router(config)# ip rsvp sendersession-ip-address sender-ip-address [tcp  | udp  |  ip-protocol ] session-dport sender-sport previous-hop

CCIE学习笔记之端到端QOS

Class-map默认行为match-all Match protocol http mime "*/audio/*" Match protocol http mime "*/video/*"  //分类器寻找特殊类型的音频和视频mime流量 Match protocol http "*.jpg|*.jpeg"     //匹配图片流量 注:MIME类型就是设定某种扩展名的文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候,浏览器会自

CCIE学习笔记之组播

查看组播路由表: show ip mroute 查看igmp组成员: show ip igmp group 通用规则: 1.      无论何时,只要创建一个(S,G)项而其相应的父(*,G)不存在,就首先自动创建新的(*,G)项. 2.      RPF接口是作为对源IP地址(或稀疏模式(*,G)项,RP)的最小开销路径接口来估算的.如果多个接口开销相同,选择最高IP地址的接口作为"切入点".(比较顺序:1.管理距离2.最长匹配3.开销,这和单播不同,单播先比较最长匹配). 3.