BGP local-preference MED属性实验
实验拓扑
实验配置
建立两个AS 65001、65000
AS65000内跑OSPF,并在R1上发布三个网段100.1.1.1 100.1.2.1 100.1.3.1 在R3 R5上聚合后发布给R4。
每台路由器都有一个对应的loopback地址。
实验过程
<R1>dis bgp ro
Total Number of Routes: 10
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* i 1.1.1.1/32 1.1.4.1 1562 100 0 ?
* i 1.1.5.1 1562 100 0 ?
* i 1.1.4.0/30 1.1.5.1 3124 100 0 ?
* i 1.1.5.0/30 1.1.4.1 3124 100 0 ?
* i 3.3.3.3/32 1.1.5.1 1562 100 0 ?
*>i 4.4.4.4/32 1.1.4.1 0 100 0 65001i
* i 1.1.5.1 0 100 0 65001i
* i 5.5.5.5/32 1.1.4.1 1562 100 0 ?
*>i 100.1.0.0/16 1.1.4.1 0 100 0 ?
* i 1.1.5.1 0 100 0 ?
<R1>t d
% Current terminal debugging is on
<R1>t m
% Current terminal monitor is on
<R1>deb
<R1>debugging bgp ?
X.X.X.X Specify ipv4 peer address
X:X::X:X Specify ipv6 peer address
all All information
bfd BFD Information
detail Detail Information
event FSM Event
graceful-restart Graceful Restart
keepalive Keepalive packet
open Open packet
packet All packet information
raw-packet Dump raw packets BGP read from or send to sockets
route-refresh Route Refresh packet
timer Dump debugging information of bgp timers
update Update packet
<R1>debugging bgp pa
<R1>debugging bgp packet
<R1>
*Apr 7 10:54:17:875 2013 R1 RM/6/RMDEBUG:
BGP.: 1.1.5.1 Recv KEEPALIVE
Length: 19
<R1>
<R1>
<R1>
<R1>
*Apr 7 10:54:31:907 2013 R1 RM/6/RMDEBUG:
BGP.: 1.1.4.1 Recv KEEPALIVE
Length: 19
*Apr 7 10:54:34:485 2013 R1 RM/6/RMDEBUG:
BGP.: 1.1.5.1 Send KEEPALIVE
Length 19
更改默认的 local-preference
[R3-bgp]default local-preference 80
*Apr 7 10:54:45:813 2013 R1 RM/6/RMDEBUG:
BGP.: Recv UPDATE from peer 1.1.4.1 with following destinations :
Update message length : 56
Local Pref : 80
MED : 1562
Origin : Incomplete
AS Path :
Next Hop : 1.1.4.1
1.1.1.1/32,
*Apr 7 10:54:45:954 2013 R1 RM/6/RMDEBUG:
BGP.: Recv UPDATE from peer 1.1.4.1 with following destinations :
Update message length : 56
Local Pref : 80
MED : 3124
Origin : Incomplete
AS Path :
Next Hop : 1.1.4.1
1.1.5.0/30,
*Apr 7 10:54:45:954 2013 R1 RM/6/RMDEBUG:
BGP.: Recv UPDATE from peer 1.1.4.1 with following destinations :
Update message length : 56
Local Pref : 80
MED : 1562
Origin : Incomplete
AS Path :
Next Hop : 1.1.4.1
5.5.5.5/32,
*Apr 7 10:54:45:954 2013 R1 RM/6/RMDEBUG:
BGP.: Recv UPDATE(Withdraw) from peer 1.1.4.1 for destinations :
100.1.0.0/16,
*Apr 7 10:54:45:954 2013 R1 RM/6/RMDEBUG:
BGP.: Recv UPDATE from peer 1.1.4.1 with following destinations :
Update message length : 60
Local Pref : 80
MED : 0
Origin : IGP
AS Path : 65001
Next Hop : 1.1.4.1
4.4.4.4/32,
*Apr 7 10:54:45:954 2013 R1 RM/6/RMDEBUG:
BGP.: Recv UPDATE from peer 1.1.4.1 with following destinations :
Update message length : 66
Local Pref : 80
MED : 0
Origin : Incomplete
AS Path :
Next Hop : 1.1.4.1
100.1.0.0/16,
*Apr 7 10:54:51:282 2013 R1 RM/6/RMDEBUG:
BGP.: 1.1.4.1 Send KEEPALIVE
Length 19
<R1>
<R1>
<R1>dis ip ro
Routing Tables: Public
Destinations : 17 Routes : 18
Destination/Mask Proto Pre Cost NextHop Interface
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
1.1.3.0/30 OSPF 10 3124 1.1.5.1 S0/6/3
OSPF 10 3124 1.1.4.1 S0/6/1
1.1.4.0/30 Direct 0 0 1.1.4.2 S0/6/1
1.1.4.1/32 Direct 0 0 1.1.4.1 S0/6/1
1.1.4.2/32 Direct 0 0 127.0.0.1 InLoop0
1.1.5.0/30 Direct 0 0 1.1.5.2 S0/6/3
1.1.5.1/32 Direct 0 0 1.1.5.1 S0/6/3
1.1.5.2/32 Direct 0 0 127.0.0.1 InLoop0
3.3.3.3/32 OSPF 10 1562 1.1.4.1 S0/6/1
4.4.4.4/32 BGP 255 0 1.1.5.1 S0/6/3
5.5.5.5/32 OSPF 10 1562 1.1.5.1 S0/6/3
100.1.0.0/16 BGP 255 0 1.1.5.1 S0/6/3
100.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
100.1.2.1/32 Direct 0 0 127.0.0.1 InLoop0
100.1.3.1/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
<R1>
*Apr 7 10:55:02:922 2013 R1 RM/6/RMDEBUG:
BGP.: 1.1.5.1 Recv KEEPALIVE
Length: 19 dis
*Apr 7 10:55:05:235 2013 R1 RM/6/RMDEBUG:
BGP.: 1.1.4.1 Recv KEEPALIVE
Length: 19 bgp ro
Total Number of Routes: 10
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* i 1.1.1.1/32 1.1.4.1 1562 80 0 ?
* i 1.1.5.1 1562 100 0 ?
* i 1.1.4.0/30 1.1.5.1 3124 100 0 ?
* i 1.1.5.0/30 1.1.4.1 3124 80 0 ?
* i 3.3.3.3/32 1.1.5.1 1562 100 0 ?
*>i 4.4.4.4/32 1.1.5.1 0 100 0 65001i
* i 1.1.4.1 0 80 0 65001i
* i 5.5.5.5/32 1.1.4.1 1562 80 0 ?
*>i 100.1.0.0/16 1.1.5.1 0 100 0 ?
* i 1.1.4.1 0 80 0 ?
<R1>
*Apr 7 10:55:11:94 2013 R1 RM/6/RMDEBUG:
BGP.: 1.1.5.1 Send KEEPALIVE
Length 19
-------------------------------------------------------------------------------------------
改MED后
[R4]dis bgp ro
Total Number of Routes: 9
BGP Local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.1/32 1.1.6.2 10 0 65000?
* 1.1.2.2 12 0 65000?
*> 1.1.4.0/30 1.1.2.2 12 0 65000?
*> 1.1.5.0/30 1.1.6.2 10 0 65000?
*> 3.3.3.3/32 1.1.2.2 12 0 65000?
*> 4.4.4.4/32 0.0.0.0 0 0 i
*> 5.5.5.5/32 1.1.6.2 10 0 65000?
*> 100.1.0.0/16 1.1.6.2 10 0 65000?
* 1.1.2.2 12 0 65000?
[R4]
发现 1.1.1.1 的下一跳是1.1.6.2
[R5-bgp]default med 5
[R4]dis bgp ro
Total Number of Routes: 9
BGP Local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 1.1.1.1/32 1.1.2.2 5 0 65000?
* 1.1.6.2 10 0 65000?
*> 1.1.4.0/30 1.1.2.2 5 0 65000?
*> 1.1.5.0/30 1.1.6.2 10 0 65000?
*> 3.3.3.3/32 1.1.2.2 5 0 65000?
*> 4.4.4.4/32 0.0.0.0 0 0 i
*> 5.5.5.5/32 1.1.6.2 10 0 65000?
*> 100.1.0.0/16 1.1.2.2 5 0 65000?
* 1.1.6.2 10 0 65000?
如上,改了后下一跳变动了
转载于:https://blog.51cto.com/hciewd/1172727
BGP local-preference MED属性实验相关推荐
- BGP 最佳路径选择之 -- Local Preference
[实验说明] 在AS2中配置BGP Local Preference 参数,确保R3上由155.1.37.0/24 网络到155.1.5.0 网络的流量走R1 [实验拓扑] [实验步骤] 按照上图配置 ...
- BGP通过团体和MED属性灵活控制回程路由
BGP本地优先和MED属性配置的一点心得 BGP, MED, 心得, 属性 网络环境: AS300--------AS500 具体环境描述: AS300内包括4台路由器,运行ospf协议进行本AS内部 ...
- bgp med属性配置与详解
实验目的: 1.理解MED属性能够影响,其它的自治系统的数据流如何流入本地自治系统. 2.掌握基于route-map的MED配置方法. 实验拓扑: 接口ip配置.路由协议基础配置详见 CSDNhttp ...
- BGP选路 ——起源属性 + MED属性 + EBGP优于IBGP属性
目录 一.起源属性: (1)特性: (2)配置命令: (3)图解: 二.MED属性 (1)特性: (2)配置命令: 三.EBGP路由优于IBGP路由 BGP路由13条选路顺序: 权重--本地优先级-- ...
- 十三条BGP选路原则(附带实验环境)
BGP选路属性集合,从1开始比较进行选路,若相同则进行下一项 1.不发布不可达的路由信息 2.Preferred-Value值 3.本地Local Preference值高的路由 4.优选本地生成的路 ...
- BGP选路原则和属性
BGP 属性 公认必遵: origin( 起源属性标识: i > e > ? ) .AS-path . next-hop 公认任意: Local_Pref (本地优先级).Atomic A ...
- 这次来个BGP反射器的简单小实验
这次来个BGP反射器的简单小实验 前言 一.先把端口简单配置写完(OSPF.RIP.IP) R1 R2 R3 R4 R5 R6 R7 R8 二.配置BGP及反射器 R1 R2 R3 R4 R5 R6 ...
- BGP多出口多宿主实验
前几天在NET130看到有位华为工程师为配置思科多出口多宿主BGP而烦恼.根据他的思路,做了一下实验,发现有些地方以前没有留意到的,就把它记录下来,以作参考. 其中要求为: 1.CN2的AS向Metr ...
- BGP 的选路和属性
目录 一.BGP的选路 二.属性 1.Preference_Value 2.本地优先级 3.as-path 4.起源属性---条目的产生方式 5.MED---多出口的鉴别属性 三.BGP的社团属性 – ...
最新文章
- Mask R-CNN用于目标检测和分割代码实现
- mask rcnn训练自己的数据集
- Linux目录配置及应放置的内容
- 尚学堂__百战程序员__1573题------第一章 初始java
- Kali Linux 2022下载
- 数学图形之双曲抛物面
- Gmail上不去怎么办?
- RT Preempt Linux简介
- signingConfigs
- java: 未报告的异常错误java.lang.IllegalAccessException; 必须对其进行捕获或声明以便抛出
- 解决java.sql.SQLException: Value ‘0000-00-00‘ can not be represented as java.sql.Date
- 硬盘被写保护不可写Diskpart解决办法
- 判断ip是内网还是外网, 判断请求来之pc还是mobile
- 问卷调查:vue element动态生成表单、表单校验以及表单提交
- 360wifi在linux系统如何使用,在树莓派上使用360WIFI(也适用于小米、百度、腾讯WIFI)...
- 关系数据库设计---练习题
- vhdl7我学习得第一个fpga项目——倒计时显示
- 怎么关闭linux电脑的热启动键,热启动计算机的按键是什么
- win7使用命令提示符怎么运行C语言,怎么有效的解决win7系统的命令提示符打开
- ATmega8 定时器 中断 外部中断 程序