如何观察 MX 为对等 BGP 采取的日志/步骤

网络工程 bgp 杜松
2021-07-21 09:04:11

想看看我的 MX 路由器在哪里无法与邻居对等。我可以做一个show bgp neighbor,但这只能显示我当前的状态。有没有办法查看在对等互连过程中采取的所有步骤,以及失败的地方?

2个回答

我认为您正在寻找 BGP 的跟踪选项。Juniper 网站上的文档

配置跟踪选项

[edit protocols bgp traceoptions]
user@router# set file bgp.log size 10m files 10 world-readable

[edit protocols bgp traceoptions]
user@router# set flag ?
Possible completions:
4byte-as             Trace 4 byte AS events
add-path             Trace add-path events
all                  Trace everything
bfd                  Trace BFD events
damping              Trace BGP damping information
general              Trace general events
graceful-restart     Trace Graceful Restart events
keepalive            Trace BGP keepalive packets
normal               Trace normal events
nsr-synchronization  Trace NSR synchronization events
open                 Trace BGP open packets
packets              Trace all BGP protocol packets
policy               Trace policy processing
refresh              Trace BGP refresh packets
route                Trace routing information
state                Trace state transitions
task                 Trace routing protocol task processing
timer                Trace routing protocol timer processing
update               Trace BGP update packets

[edit protocols bgp traceoptions]
user@router# commit and-quit

查看您的跟踪选项

user@router> show log bgp.log

请注意,上述内容将为所有 BGP 对等方打开跟踪选项,这可能会非常健谈。您可以通过导航到该层次结构并运行相同的命令来仅为特定组甚至特定邻居打开跟踪选项。

您需要与您的提供商进行沟通,在途中查看他是否出现了一些问题,从物理链接进行检查,例如,光纤问题、某些设备或其他问题。

在调试 BGP 会话的过程中,您需要更改您想看到的内容,如下所述:

http://www.juniper.net/documentation/en_US/junos13.2/topics/topic-map/bgp-troubleshooting.html

your@host# set traceoptions file bgp-log
your@host# set traceoptions file size 10k
your@host# set traceoptions file files 2
your@host# set traceoptions flag update detail

当然,做了一个“提交”

your@host# commit

最后,你可以在这里看到你的调试:

your@host> file show /var/logical-systems/A/log/bgp-log