思科设备BGP配置命令

Cisco(config)#router bgp 100 //配置BGP进程号
Cisco(config-router)#bgp router-id 1.1.1.1 //配置BGP的router-id
Cisco(config-router)#neighbor 12.1.1.2 remote-as 200 //配置BGP邻居
Cisco(config-router)#neighbor 2.2.2.2 remote 100 //配置IBGP邻居
Cisco(config-router)#neighbor 2.2.2.2 update-source loopback 0 //指定IBGP的更新源
Cisco(config-router)#neighbor 2.2.2.2 next-hop-self //在AS边界路由器上配置
Cisco(config-router)#neighbor 2.2.2.2 ebgp-multihop 2 //配置EBGP跳数为2
Cisco(config-router)#network 12.1.1.0 mask 255.255.255.0 //宣告有类网络
Cisco(config-router)#auto-summary //打开自动汇总
Cisco(config-router)#network 12.0.0.0 //宣告无类网络
Cisco#show tcp brief //查看TCP连接摘要
Cisco#show ip bgp neighbors //查看BGP邻居
Cisco#show ip bgp summary //查看BGP邻居摘要信息
Cisco#show ip bgp //查看BGP表
Cisco(config)#router bgp 100
Cisco(config-router)#neighbor a1 peer-group //定义peer-group
Cisco(config-router)#neighbor a1 remote-as 200
Cisco(config-router)#neighbor a1 update-source loopback 0
Cisco(config-router)#neighbor a1 next-hop-self
Cisco(config-router)#neighbor a1 distribute-list 20 out
Cisco(config-router)#neighbor 12.1.1.2 peer-group a1 //引用peer-group
Cisco(config-router)#bgp listen range 1.1.1.0/24 peer-group a1 //使BGP被动侦听1.1.1.0/24网段的BGP连接请求并动态建立BGP对等体
Cisco(config-router)#neighbor 12.1.1.2 password abc123 //配置BGP认证,只支持MD5认证
Cisco#clear ip bgp 12.1.1.2 //硬重置单个邻居
Cisco#clear ip bgp * //硬重置所有邻居
Cisco#clear ip bgp * soft //软重置双向的所有邻居
Cisco#clear ip bgp * soft in //软重置进方向的所有邻居
Cisco#clear ip bgp * soft out //软重置出方向的所有邻居
Cisco#show ip bgp neighbors 12.1.1.2 received-routes //从邻居接收到的BGP路由条目
Cisco#show ip bgp neighbors 12.1.1.2 routes //查看从邻居学到的BGP路由
Cisco#show ip bgp neighbors 12.1.1.2 advertised-routes //查看发送给邻居的BGP路由条目
Cisco#show ip bgp rib-failure //查看为加入到RIB的BGP路由以及没有被加载的原因
Cisco#debug ip bgp updates //查看BGP的update报文
Cisco(config-router)#bgp default local-preference 100 //修改EBP本地优先级,默认是100,越大越优
Cisco(config)#ip bgp-community new-format //修改community属性的显示方式
Cisco(config)#route-map rm1 permit 10
Cisco(config-route-map)#set community 100:1 //设置community属性值
Cisco(config-router)#neighbor 12.1.1.2 send-community //发送community属性的值
Cisco(config-route-map)#match community 1 //匹配community属性值
Cisco(config-route-map)#match community 1 exact-match //匹配community属性值
Cisco(config)#ip community-list 1 permit 100:1 // 匹配community属性为100:1
Cisco(config)#ip community-list 1 permit internet //匹配所有BGP路由
Cisco(config)#ip community-list standard d1 permit 1 //匹配要删除的community属性值
Cisco(config)#route-map rm1 permit 10
Cisco(config-route-map)#set comm-list d1 delete //删除该属性
Cisco#show ip community-list
Cisco(config-router)#aggregate-address 172.16.0.0 255.255.0.0 //配置BGP的路由聚合,通告汇总和明细路由
Cisco(config-router)#aggregate-address 172.16.0.0 255.255.0.0 summary-only //配置BGP的路由聚合,只通告汇总路由,抑制明细路由
Cisco(config-router)# aggregate-address 172.16.0.0 255.255.0.0 summary-only as-set //配置BGP的路由聚合,只通告汇总路由,抑制明细路由,且继承原有明细路由的AS属性
Cisco(config)#ip prefix-list p1 permit 172.16.1.0/24
Cisco(config)#route-map rm1 permit 10
Cisco(config-route-map)#match ip address prefix-list p1
Cisco(config)#router bgp 100
Cisco(config-router)# aggregate-address 172.16.0.0 255.255.0.0 as-set suppress-map rm1 //配置BGP的路由聚合,只通告汇总路由,抑制特定路由,且继承原有明细路由的AS属性
Cisco(config-router)#neighbor 12.1.1.2 unsuppress-map rm1 //配置BGP的路由聚合时取消对特定路由的抑制
Cisco(config-router)# aggregate-address 172.16.0.0 255.255.0.0 summary-only as-set
Cisco(config-router)# aggregate-address 172.16.0.0 255.255.0.0 summary-only as-set advertise-map rm1 //配置BGP的路由聚合时只继承特定路由的路径属性
Cisco(config)#route-map rm2 permit 10
Cisco(config-route-map)#set c ommunity 100:1
Cisco(config)#router bgp 100
Cisco(config-router)#aggregate-address 172.16.0.0 255.255.0.0 summary-only as-set attribute-map rm2 //在BGP路由汇总时直接设置路径属性
Cisco(config)#ip as-path access-list 1 permit _100$ //配置as-path访问控制列表,匹配起源于as 100的路由条目
Cisco(config-router)#neighbor 12.1.1.2 filter-list 1 in //关联as-path访问控制列表到filter-list进行路由过滤
Cisco#show ip bgp regexp xx //查看BGP表中被正则表达式匹配上的路由
Cisco#show ip as-path-access-list //查看as-path访问控制列表的配置
Cisco#show ip bgp filter-list 1 //查看BGP中被该filter-list匹配的路由
Cisco(config-router)#neighbor 12.1.1.2 route-reflector-client //配置路由反射器的客户端
Cisco(config-router)#bgp cluster-id 1.1.1.1 //修改放射器的簇ID
Cisco(config-router)#redistribute ospf 1 match internal external //将OSPF的内部和外出路由都重发布到BGP
Cisco(config-router)#distribute-list prefix 1 out connected //将直连路由重分布到BGP时在出方向过滤
Cisco(config)#ip prefix-list 11 permit 11.11.11.0/24
Cisco(config)#route-map rm1 permit 10
Cisco(config-route-map)#set community 100:11
Cisco(config)#router bgp 100
Cisco(config-router)#network 11.11.11.0 mask 255.255.255.0 route-map rm1 //给所有邻居在network时关联执行路由策略
Cisco(config-router)#neighbor 12.1.1.2 route-map rm1 out //给特定邻居执行路由策略
Cisco(config-router)#$ redistribute ospf 110 route-map rm1 match external internal //将OSPF的内部和外出路由重发布到BGP时关联路由策略
Cisco(config-router)#bgp confederation identifier 123 //标识BGP联邦号
Cisco(config-router)#bgp confederation peers 234 //配联邦EBGP号
Cisco(config-router)#neighbor 12.1.1.2 weight 1 //修改从特定邻居学到的所有路由的weight值
Cisco(config-router)#bgp default local-preference 100 //修改local-preference值,默认为100
Cisco(config-router)#maximum-paths 2 //修改等价负载均衡路由数量
Cisco(config-router)#maximum-paths ibgp 2

  • 1
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DHCP配置 4 静态路由 6 浮动静态路由 6 向网络中注入一条默认路由 7 RIP 8 RIP的基本配置 8 被动接口与单播更新 10 RIPv2的基本配置 11 RIPv 2的手动汇总 13 RIPv2认证和触发更新 13 EIGRP配置 17 Eigrp的基本配置 17 eigrp路由汇总 19 eigrp的负载均衡 21 eigrp认证 23 OSPF 26 OSPF 基本配置 26 OSPF广播多路访问 28 OSPF基本认证 29 OSPF基于MD5的认证 30 OSPF基于链路的MD5认证 31 OSPF基于链路的简单口令认证 32 ospf 注入一条默认路由 33 多区域OSPF 35 多区域OSPF基本配置 36 多区域OSPF手动汇总 38 Ospf 末节区域和完全末节区域 40 Ospf NSSA区域 42 Ospf虚链路 44 不连续区域0的虚连接 46 IS-IS 49 Is-is的基本配置 49 多区域集成的IS-IS 50 BGP 52 BGP地址聚合 57 BGP属性控制选路 60 用BGP AS-PATH属性控制选路 63 BGP LOCAL_PREF属性控制选路 66 BGP WEIGHT属性控制选路 69 路由反射器配置 71 BGP联邦配置 74 BGP团体配置 77 路由重分布 81 Rip、OSPF、eigrp之间的路由重分布 81 ISIS 和OSPF 重分布 83 Vlan间路由 86 传统的vlan间路由 86 单臂路由器vlan间路由 88 三层交换实现vlan间路由 90 ACL 91 标准ACL 91 扩展ACL1 92 扩展ACL2 95 命名ACL 97 基于时间的ACL 99 动态ACL 100 自反ACL 102 Nat地址转换 104 静态nat地址转换 104 动态Nat地址转换 105 NAT重载 107 PPP的配置实验 108 PAP验证 113 帧中继配置 115 帧中继静态映射 115 帧中继子接口单点对多点 117 帧中继点到点子接口配置 119 把一台cisco路由器配置为帧中继交换机 122 帧中继上的RIP 124 帧中继上集成IS-IS 126 帧中继上点到点子接口下集成的IS-IS 127 帧中继上的OSPF 129 IPV6 131 IPv6 静态路由 131 IPv6 RIPng 131 OSPFv3 133 IPv6 EIGRP 135 组播 136 PIM Dense 137 PIM Sparse-Dense 140 路由优化 142 分布控制列表控制路由更新 142 策略路由 144 基于报文大小的策略路由 145 基于应用的策略路由 147 网关冗余和负载均衡 148 HSRP 148 VRRP 150 GLBP 151 IOS 153 IOS更新 153 交换机的IOS恢复 154 路由器的密码恢复和ios恢复 154 计算机端口安全 155 交换机的密码恢复 156 清除交换机配置并重启 156 stp 157 STP+VTP 157 Trunk 配置 159 RSTP 160 MST 160 STP 保护 162 链路聚合 163 QOS 164 PQ 165 CQ 165 WFQ 166 CBWFQ 166 LLQ 167 WRED 168 CAR 168 NBAR 168 综合练习1 170 综合练习2 177

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值