[an error occurred while processing this directive][an error occurred while processing this directive]

Configure BGP-Specific Options

Purpose

When unexpected events or problems occur, or if you want to diagnose BGP establishment issues, you can view more detailed information by configuring options specific to BGP. You can also configure tracing for a specific BGP peer or peer group. For more information, see the JUNOS System Basics Configuration Guide.

  1. Display Detailed BGP Protocol Information
  2. Diagnose BGP Session Establishment Problems

Display Detailed BGP Protocol Information

Action

To display BGP protocol information in detail, follow these steps:

  1. In configuration mode, go to the following hierarchy level:
    [edit]user@host# edit protocol bgp traceoptions
  2. Configure the flag to display detailed BGP protocol messages:
    [edit protocols bgp traceoptions]user@host# set flag update detail
  3. Verify the configuration:
    user@host# show

    For example:

    [edit protocols bgp traceoptions]user@host# show flag update detail;
  4. Commit the configuration:
    user@host# commit
  5. View the contents of the file containing the detailed messages:
    user@host# run show log filename

    For example:

    [edit protocols bgp traceoptions]user@pro5-a# run show log bgp Sep 17 14:47:16 trace_on: Tracing to "/var/log/bgp" startedSep 17 14:47:17 bgp_read_v4_update: receiving packet(s) from 10.255.245.53 (Internal AS 10458)Sep 17 14:47:17 BGP RECV 10.255.245.53+179 -> 10.255.245.50+1141Sep 17 14:47:17 BGP RECV message type 2 (Update) length 128Sep 17 14:47:17 BGP RECV flags 0x40 code Origin(1): IGPSep 17 14:47:17 BGP RECV flags 0x40 code ASPath(2): 2Sep 17 14:47:17 BGP RECV flags 0x80 code MultiExitDisc(4): 0Sep 17 14:47:17 BGP RECV flags 0x40 code LocalPref(5): 100Sep 17 14:47:17 BGP RECV flags 0xc0 code Extended Communities(16): 2:10458:1[...Output truncated...]

Meaning

Table 1 lists tracing flags specific to BGP and presents example output for some of the flags. You can also configure tracing for a specific BGP peer or peer group. For more information, see the JUNOS System Basics Configuration Guide.

Table 1: BGP Protocol Tracing Flags

Tracing Flags

Description

Example Output

aspath

AS path regular expression operations

Not available.

damping

Damping operations

Nov 28 17:01:12 bgp_damp_change: Change event
Nov 28 17:01:12 bgp_dampen: Damping 10.10.1.0
Nov 28 17:01:12 bgp_damp_change: Change event
Nov 28 17:01:12 bgp_dampen: Damping 10.10.2.0
Nov 28 17:01:12 bgp_damp_change: Change event
Nov 28 17:01:12 bgp_dampen: Damping 10.10.3.0

keepalive

BGP keepalive messages

Nov 28 17:09:27 bgp_send: sending 19 bytes to 10.217.5.101 (External AS 65471)
Nov 28 17:09:27
Nov 28 17:09:27 BGP SEND 10.217.5.1+179 -> 10.217.5.101+52162
Nov 28 17:09:27 BGP SEND message type 4 (KeepAlive) length 19
Nov 28 17:09:28
Nov 28 17:09:28 BGP RECV 10.217.5.101+52162 -> 10.217.5.1+179
Nov 28 17:09:28 BGP RECV message type 4 (KeepAlive) length 19

open

BGP open packets

Nov 28 18:37:42 bgp_send: sending 37 bytes to 10.217.5.101 (External AS 65471)
Nov 28 18:37:42
Nov 28 18:37:42 BGP SEND 10.217.5.1+179 -> 10.217.5.101+38135
Nov 28 18:37:42 BGP SEND message type 1 (Open) length 37

packets

All BGP protocol packets

Sep 27 17:45:31 BGP RECV 10.0.100.108+179 -> 10.0.100.105+1033
Sep 27 17:45:31 BGP RECV message type 4 (KeepAlive) length 19
Sep 27 17:45:31 bgp_send: sending 19 bytes to 10.0.100.108 (Internal AS 100)
Sep 27 17:45:31 BGP SEND 10.0.100.105+1033 -> 10.0.100.108+179
Sep 27 17:45:31 BGP SEND message type 4 (KeepAlive) length 19
Sep 27 17:45:31 bgp_read_v4_update: receiving packet(s) from 10.0.100.108 (Internal AS 100)

update

Update packets

Nov 28 19:05:24 BGP SEND 10.217.5.1+179 -> 10.217.5.101+55813
Nov 28 19:05:24 BGP SEND message type 2 (Update) length 53
Nov 28 19:05:24 bgp_send: sending 65 bytes to 10.217.5.101 (External AS 65471)
Nov 28 19:05:24
Nov 28 19:05:24 BGP SEND 10.217.5.1+179 -> 10.217.5.101+55813
Nov 28 19:05:24 BGP SEND message type 2 (Update) length 65
Nov 28 19:05:24 bgp_send: sending 55 bytes to 10.217.5.101 (External AS 65471)


Diagnose BGP Session Establishment Problems

Purpose

To trace BGP session establishment problems.

Action

To trace BGP session establishment problems, follow these steps:

  1. In configuration mode, go to the following hierarchy level:
    [edit] user@host# edit protocol bgp
  2. Configure BGP open messages:
    [edit protocols bgp]user@host# set traceoptions flag open detail
  3. Verify the configuration:
    user@host# show

    For example:

    [edit protocols bgp]user@host# show traceoptions { file bgplog size 10k files 10; flag open detail;}
  4. Commit the configuration:
    user@host# commit
  5. View the contents of the file containing the detailed messages:
    user@host#run show log filename

    For example:

    [edit protocols bgp]user@hotst# run show log bgplog

    Sep 17 17:13:14 trace_on: Tracing to "/var/log/bgplog" started
    Sep 17 17:13:14 bgp_read_v4_update: done with 201.0.0.2 (Internal AS 10458) received 19 octets 0 updates 0 routes
    Sep 17 17:13:15 bgp_read_v4_update: receiving packet(s) from 201.0.0.3 (Internal AS 10458)
    Sep 17 17:13:15 bgp_read_v4_update: done with 201.0.0.3 (Internal AS 10458) received 19 octets 0 updates 0 routes
    Sep 17 17:13:44 bgp_read_v4_update: receiving packet(s) from 201.0.0.2 (Internal AS 10458)
    [...Output truncated...]

Published: 2010-01-25

[an error occurred while processing this directive]