[Contents] [Prev] [Next] [Index] [Report an Error]

show bgp neighbor

Syntax

show bgp neighbor
<instance instance-name>
<logical-system (all | logical-system-name)>
<neighbor-address>
<orf (neighbor-address | detail)

Release Information

Command introduced before JUNOS Release 7.4.

orf option introduced in JUNOS Release 9.2.

Description

Display information about Border Gateway Protocol (BGP) peers.

Options

none — Display information about all BGP peers.

instance instance-name(Optional) Display information about BGP peers for only the specified routing instance.

logical-system (all | logical-system-name) — (Optional) Perform this operation on all logical systems or on a particular logical system.

neighbor-address(Optional) Display information for only the BGP peer at the specified IP address.

orf (neighbor-address | detail) — Display outbound route filtering information for all BGP peers or only for the BGP peer at the specified IP address. The default is to display brief output. Use the detail output to display detailed output.

Additional Information

For information about the local-address, nlri, hold-time, and preference statements, see the JUNOS Routing Protocols Configuration Guide.

Required Privilege Level

view

Related Topics

clear bgp neighbor

List of Sample Output

show bgp neighbor (CLNS)
show bgp neighbor (Layer 2 VPN)
show bgp neighbor (Layer 3 VPN)
show bgp neighbor neighbor-address
show bgp neighbor neighbor-address
show bgp neighbor orf neighbor-address detail

Output Fields

Table 12 describes the output fields for the show bgp neighbor command. Output fields are listed in the approximate order in which they appear.

Table 12: show bgp neighbor Output Fields

Field Name

Field Description

Peer

Address of the BGP neighbor. The address is followed by the neighbor's port number.

AS

AS number of the peer.

Local

Address of the local router. The address is followed by the peer's port number.

Type

Type of peer: Internal or External.

State

Current state of the BGP session:

  • Active—BGP is initiating a transport protocol connection in an attempt to connect to a peer. If the connection is successful, BGP sends an Open message.
  • Connect—BGP is waiting for the transport protocol connection to be completed.
  • Established—The BGP session has been established, and the peers are exchanging update messages.
  • Idle—This is the first stage of a connection. BGP is waiting for a Start event.
  • OpenConfirm—BGP has acknowledged receipt of an open message from the peer and is waiting to receive a keepalive or notification message.
  • OpenSent—BGP has sent an open message and is waiting to receive an open message from the peer.

Flags

Internal BGP flags:

  • Aggregate Label—BGP has aggregated a set of incoming labels (labels received from the peer) into a single forwarding label.
  • CleanUp—The peer session is being shut down.
  • Delete—This peer has been deleted.
  • Idled—This peer has been permanently idled.
  • ImportEval—At the last commit, this peer was identified as needing to reevaluate all received routes.
  • Initializing—The peer session is initializing.
  • SendRtn—Messages are being sent to the peer.
  • Sync—This peer is synchronized with the rest of the peer group.
  • TryConnect—Another attempt is being made to connect to the peer.
  • Unconfigured—This peer is not configured.
  • WriteFailed—An attempt to write to this peer failed.

Last state

Previous state of the BGP session:

  • Active—BGP is initiating a transport protocol connection in an attempt to connect to a peer. If the connection is successful, BGP sends an Open message.
  • Connect—BGP is waiting for the transport protocol connection to be completed.
  • Established—The BGP session has been established, and the peers are exchanging update messages.
  • Idle—This is the first stage of a connection. BGP is waiting for a Start event.
  • OpenConfirm—BGP has acknowledged receipt of an open message from the peer and is waiting to receive a keepalive or notification message.
  • OpenSent—BGP has sent an open message and is waiting to receive an open message from the peer.

Last event

Last activity that occurred in the BGP session:

  • Closed—The BGP session closed.
  • ConnectRetry—The transport protocol connection failed, and BGP is trying again to connect.
  • HoldTime—The session ended because the hold timer expired.
  • KeepAlive—The local router sent a BGP keepalive message to the peer.
  • Open—The local router sent a BGP open message to the peer.
  • OpenFail—The local router did not receive an acknowledgment of a BGP open message from the peer.
  • RecvKeepAlive—The local router received a BGP keepalive message from the peer.
  • RecvNotify—The local router received a BGP notification message from the peer.
  • RecvOpen—The local router received a BGP open message from the peer.
  • RecvUpdate—The local router received a BGP update message from the peer.
  • Start—The peering session started.
  • Stop—The peering session stopped.
  • TransportError—A TCP error occurred.

Last error

Last error that occurred in the BGP session:

  • Cease—An error occurred, such as a version mismatch, that caused the session to close.
  • Finite State Machine Error—In setting up the session, BGP received a message that it did not understand.
  • Hold Time Expired—The session's hold time expired.
  • Message Header Error—The header of a BGP message was malformed.
  • Open Message Error—A BGP open message contained an error.
  • None—No errors occurred in the BGP session.
  • Update Message Error—A BGP update message contained an error.

Export

Name of the export policy that is configured on the peer.

Import

Name of the import policy that is configured on the peer.

Options

Configured BGP options:

  • AddressFamily—Configured address family: inet or inet-vpn.
  • AutheKeyChain—Authentication key change is enabled.
  • GracefulRestart—Graceful restart is configured.
  • HoldTime—Hold time configured with the hold-time statement. The hold time is three times the interval at which keepalive messages are sent.
  • Local Address—Address configured with the local-address statement.
  • Multihop—Allow BGP connections to external peers that are not on a directly connected network.
  • NLRI—Configured MBGP state for the BGP group: multicast, unicast, or both if you have configured nlri any.
  • Peer AS—Configured peer autonomous system (AS).
  • Preference—Preference value configured with the preference statement.
  • Refresh—Configured to refresh automatically when the policy changes.
  • Rib-group—Configured routing table group.

Authentication key change

Name of the authentication key chain enabled.

Authentication algorithm

Type of authentication algorithm enabled: hmac or md5

Address families configured

Names of configured address families for the VPN.

Local Address

Address of the local router.

Holdtime

Hold time configured with the hold-time statement. The hold time is three times the interval at which keepalive messages are sent.

Flags for NLRI inet-label-unicast

Flags related to labeled-unicast:

  • TrafficStatistics—Collection of statistics for labeled-unicast traffic is enabled.

Traffic statistics

Information about labeled-unicast traffic statistics:

  • Options—Options configured for collecting statistics about labeled-unicast traffic.
  • File—Name and location of statistics log files.
  • size—Size of all the log files, in bytes.
  • files—Number of log files.

Traffic Statistics Interval

Time between sample periods for labeled-unicast traffic statistics, in seconds.

Preference

Preference value configured with the preference statement.

Number of flaps

Number of times the BGP session has gone down and then come back up.

Peer ID

Router identifier of the peer.

Local ID

Router identifier of the local router.

Active holdtime

Hold time the local router negotiated with the peer.

Keepalive Interval

Keepalive interval, in seconds.

BFD

Status of BFD failure detection.

Local Address

Name of directly connected interface over which the direct EBGP peering is established.

NLRI for restart configured on peer

Names of address families configured for restart.

NLRI advertised by peer

Address families supported by the peer: unicast or multicast.

NLRI for this session

Address families being used for this session.

Peer supports Refresh capability

Remote peer supports Route Refresh Capability, and is able to send and request full route table readvertisement. For more information, see RFC 2918, Route Refresh Capability for BGP-4.

Restart time configured on peer

Configured time allowed for restart on the neighbor.

Stale routes from peer are kept for

When graceful restart is negotiated, the maximum time allowed to hold routes from neighbors after the BGP session has gone down.

Restart time requested by this peer

Restart time requested by this neighbor during capability negotiation.

Restart flag received from the peer

When this field appears, the BGP speaker has restarted (Restarting) and this peer should not wait for the end-of-rib marker from the speaker before advertising routing information to the speaker.

NLRI that peer supports restart for

Neighbor supports graceful restart for this address family.

NLRI peer can save forwarding state

Neighbor supporting this address family saves all forwarding states.

NLRI that peer saved forwarding for

Neighbor saves all forwarding states for this address family.

NLRI that restart is negotiated for

Router supports graceful restart for this address family.

NLRI of received end-of-rib markers

Address families for which end-of-routing-table markers are received from the neighbor.

NLRI of all end-of-rib markers sent

Address families for which end-of-routing-table markers are sent to the neighbor.

Table inet.number

Information about the routing table.

  • RIB State—BGP is in the graceful restart process for this routing table: restart is complete or restart in progress.
  • Bit—Number that represents the entry in the routing table for this peer.
  • Send state—State of the BGP group: in sync, not in sync, or not advertising.
  • Active prefixes—Number of prefixes received from the peer that are active in the routing table.
  • Received prefixes—Total number of prefixes from the peer, both active and inactive, that are in the routing table.
  • Accepted prefixes—Total number of prefixes from the peer, that have been accepted by a routing policy.
  • Suppressed due to damping—Number of routes currently inactive because of damping or other reasons. These routes do not appear in the forwarding table and are not exported by routing protocols.

Last traffic (seconds)

Last time any traffic was received from the peer or sent to the peer, and the last time the local router checked.

Input messages

Messages that BGP has received from the receive socket buffer, showing the total number of messages, number of update messages, number of times a policy is changed and refreshed, and the buffer size in octets. The buffer size is 16 KB.

Output messages

Messages that BGP has written to the transmit socket buffer, showing the total number of messages, number of update messages, number of times a policy is changed and refreshed, and the buffer size in octets. The buffer size is 16 KB.

Output queue

Number of BGP packets that are queued to be transmitted to a particular neighbor for a particular routing table. Output queue 0 is for unicast NLRIs, and queue 1 is for multicast NLRIs.

Trace options

Configured tracing of BGP protocol packets and operations.

Trace file

Name of the file to receive the output of the tracing operation.

show bgp neighbor (CLNS)

user@host> show bgp neighbor
Peer: 10.245.245.1+179 AS 200  Local: 10.245.245.3+3770 AS 100  
  Type: External    State: Established    Flags: <ImportEval Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Multihop Preference LocalAddress HoldTime AddressFamily PeerAS    Rib-group Refresh>
  Address families configured: iso-vpn-unicast
  Local Address: 10.245.245.3 Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 10.245.245.1     Local ID: 10.245.245.3     Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 0   
  NLRI advertised by peer: iso-vpn-unicast
  NLRI for this session: iso-vpn-unicast
  Peer supports Refresh capability (2)
  Table bgp.isovpn.0 Bit: 10000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:              3
    Received prefixes:            3
    Suppressed due to damping:    0
    Advertised prefixes:          3
  Table aaaa.iso.0
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: not advertising
    Active prefixes:              3
    Received prefixes:            3
    Suppressed due to damping:    0
  Last traffic (seconds): Received 6    Sent 5    Checked 5   
  Input messages:  Total 1736   Updates 4       Refreshes 0     Octets 33385
  Output messages: Total 1738   Updates 3       Refreshes 0     Octets 33305
  Output Queue[0]: 0
  Output Queue[1]: 0

show bgp neighbor (Layer 2 VPN)

user@host> show bgp neighbor
Peer: 10.69.103.2     AS 65100 Local: 10.69.103.1     AS 65103
  Type: External    State: Active         Flags: <ImportEval>
  Last State: Idle          Last Event: Start
  Last Error: None
  Export: [ BGP-INET-import ] 
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily   PeerAS Refresh>
  Address families configured: inet-unicast
  Local Address: 10.69.103.1 Holdtime: 90 Preference: 170
  Number of flaps: 0
Peer: 10.69.104.2     AS 65100 Local: 10.69.104.1     AS 65104
  Type: External    State: Active         Flags: <ImportEval>
  Last State: Idle          Last Event: Start
  Last Error: None
  Export: [ BGP-L-import ] 
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily PeerAS Refresh>
  Address families configured: inet-labeled-unicast
  Local Address: 10.69.104.1 Holdtime: 90 Preference: 170
  Number of flaps: 0
Peer: 10.255.14.182+179 AS 69    Local: 10.255.14.176+2131 AS 69   
  Type: Internal    State: Established    Flags: <ImportEval>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily   Rib-group Refresh>
  Address families configured: inet-vpn-unicast l2vpn
  Local Address: 10.255.14.176 Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 10.255.14.182    Local ID: 10.255.14.176    Active Holdtime: 90
  Keepalive Interval: 30
  NLRI for restart configured on peer: inet-vpn-unicast l2vpn
  NLRI advertised by peer: inet-vpn-unicast l2vpn
  NLRI for this session: inet-vpn-unicast l2vpn
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  NLRI that peer supports restart for: inet-vpn-unicast l2vpn
  NLRI peer can save forwarding state: inet-vpn-unicast l2vpn
  NLRI that peer saved forwarding for: inet-vpn-unicast l2vpn
  NLRI that restart is negotiated for: inet-vpn-unicast l2vpn
  NLRI of received end-of-rib markers: inet-vpn-unicast l2vpn
  Table bgp.l3vpn.0 Bit: 10000
    RIB State: BGP restart in progress
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            10
    Received prefixes:          10
    Suppressed due to damping:  0
  Table bgp.l2vpn.0 Bit: 20000
    RIB State: BGP restart in progress
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Table BGP-INET.inet.0 Bit: 30000
    RIB State: BGP restart in progress
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Table BGP-L.inet.0 Bit: 40000
    RIB State: BGP restart in progress
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Table LDP.inet.0 Bit: 50000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Table OSPF.inet.0 Bit: 60000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Table RIP.inet.0 Bit: 70000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Table STATIC.inet.0 Bit: 80000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Table L2VPN.l2vpn.0 Bit: 90000
    RIB State: BGP restart is complete
    RIB State: VPN restart in progress
    Send state: in sync
    Active prefixes:            1
    Received prefixes:          1
    Suppressed due to damping:  0
  Last traffic (seconds): Received 0    Sent 0    Checked 0   
  Input messages:  Total 14     Updates 13      Refreshes 0     Octets 1053
  Output messages: Total 3      Updates 0       Refreshes 0     Octets 105
  Output Queue[0]: 0
  Output Queue[1]: 0
  Output Queue[2]: 0
  Output Queue[3]: 0
  Output Queue[4]: 0
  Output Queue[5]: 0
  Output Queue[6]: 0
  Output Queue[7]: 0
  Output Queue[8]: 0

show bgp neighbor (Layer 3 VPN)

user@host> show bgp neighbor
Peer: 4.4.4.4+179     AS 10045 Local: 5.5.5.5+1214    AS 10045
  Type: Internal    State: Established    Flags: <ImportEval>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ match-all ] Import: [ match-all ]
  Options: <Preference LocalAddress HoldTime GracefulRestart AddressFamily    Rib-group Refresh>
  Address families configured: inet-vpn-unicast
  Local Address: 5.5.5.5 Holdtime: 90 Preference: 170
  Flags for NLRI inet-labeled-unicast: TrafficStatistics
  Traffic Statistics: Options: all File: /var/log/bstat.log
                                         size 131072 files 10
  Traffic Statistics Interval: 60
  Number of flaps: 0
  Peer ID: 192.168.1.110    Local ID: 192.168.1.111    Active Holdtime: 90
  Keepalive Interval: 30
  NLRI for restart configured on peer: inet-vpn-unicast
  NLRI advertised by peer: inet-vpn-unicast
  NLRI for this session: inet-vpn-unicast
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  NLRI that peer supports restart for: inet-vpn-unicast
  NLRI peer can save forwarding state: inet-vpn-unicast
  NLRI that peer saved forwarding for: inet-vpn-unicast
  NLRI that restart is negotiated for: inet-vpn-unicast
  NLRI of received end-of-rib markers: inet-vpn-unicast
  NLRI of all end-of-rib markers sent: inet-vpn-unicast
  Table bgp.l3vpn.0 Bit: 10000
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Table vpn-green.inet.0 Bit: 20001
    RIB State: BGP restart is complete
    RIB State: VPN restart is complete
    Send state: in sync
    Active prefixes:            2
    Received prefixes:          2
    Suppressed due to damping:  0
  Last traffic (seconds): Received 15   Sent 20   Checked 20  
  Input messages:  Total 40     Updates 2       Refreshes 0     Octets 856
  Output messages: Total 44     Updates 2       Refreshes 0     Octets 1066
  Output Queue[0]: 0
  Output Queue[1]: 0
  Trace options: detail packets
  Trace file: /var/log/bgpgr.log size 131072 files 10

show bgp neighbor neighbor-address

user@host> show bgp neighbor 192.168.1.111
Peer: 10.255.245.12+179 AS 35  Local: 10.255.245.13+2884 AS 35   
  Type: Internal    State: Established  (route reflector client)Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference LocalAddress HoldTime Cluster AddressFamily Rib-group   Refresh>
  Address families configured: inet-vpn-unicast inet-labeled-unicast
  Local Address: 10.255.245.13 Holdtime: 90 Preference: 170
  Flags for NLRI inet-vpn-unicast: AggregateLabel
  Flags for NLRI inet-labeled-unicast: AggregateLabel
  Number of flaps: 0
  Peer ID: 10.255.245.12    Local ID: 10.255.245.13    Active Holdtime: 90
  Keepalive Interval: 30
BFD: disabled
  NLRI advertised by peer: inet-vpn-unicast inet-labeled-unicast
  NLRI for this session: inet-vpn-unicast inet-labeled-unicast
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 300 
  Stale routes from peer are kept for: 60 
  Restart time requested by this peer: 300 
  NLRI that peer supports restart for: inet-unicast inet6-unicast 
  NLRI that restart is negotiated for: inet-unicast inet6-unicast 
  NLRI of received end-of-rib markers: inet-unicast inet6-unicast 
  NLRI of all end-of-rib markers sent: inet-unicast inet6-unicast 
  Table inet.0 Bit: 10000
    RIB State: restart is complete 
    Send state: in sync
    Active prefixes: 4
    Received prefixes: 6
    Suppressed due to damping: 0
  Table inet6.0 Bit: 20000
    RIB State: restart is complete 
    Send state: in sync
    Active prefixes: 0
    Received prefixes: 2
    Suppressed due to damping: 0
  Last traffic (seconds): Received 3    Sent 3    Checked 3   
  Input messages:  Total 9      Updates 6       Refreshes 0     Octets 403
  Output messages: Total 7      Updates 3       Refreshes 0     Octets 365
  Output Queue[0]: 0
  Output Queue[1]: 0
  Trace options: detail packets
  Trace file: /var/log/bgpgr size 131072 files 10

show bgp neighbor neighbor-address

user@host> show bgp neighbor 192.168.4.222
Peer: 192.168.4.222+4902 AS 65501 Local: 192.168.4.221+179 AS 65500
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: Cease
  Export: [ export-policy ] Import: [ import-policy ]
  Options: <Preference HoldTime AddressFamily PeerAS PrefixLimit Refresh>
  Address families configured: inet-unicast inet-multicast
  Holdtime: 60000 Preference: 170
  Number of flaps: 4
  Last flap event: RecvUpdate
  Error: 'Cease' Sent: 5 Recv: 0
  Peer ID: 10.255.245.6     Local ID: 10.255.245.5     Active Holdtime: 60000
  Keepalive Interval: 20000      Peer index: 0   
  BFD: disabled, down
  Local Interface: fxp0.0                           
  NLRI advertised by peer: inet-unicast inet-multicast
  NLRI for this session: inet-unicast inet-multicast
  Peer supports Refresh capability (2)
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              8
    Received prefixes:            10
    Accepted prefixes:            10
    Suppressed due to damping:    0
    Advertised prefixes:          3
  Table inet.2 Bit: 20000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            0
    Accepted prefixes:            0
    Suppressed due to damping:    0
    Advertised prefixes:          0
  Last traffic (seconds): Received 357  Sent 357  Checked 357 
  Input messages:  Total 4	Updates 2 	Refreshes 0 	Octets 211
  Output messages: Total 4	Updates 1 	Refreshes 0 	Octets 147
  Output Queue[0]: 0
  Output Queue[1]: 0
  Trace options:  all
  Trace file: /var/log/bgp size 10485760 files 10

show bgp neighbor orf neighbor-address detail

user@host > show bgp neighbor orf 192.168.165.56 detail
Peer: 192.168.165.56+179 Type: External   
  Group: ext1

  inet-unicast
    Filter updates recv:          1 Immediate:          1
    Filter: prefix-filter  receive		
      Received filter entries:
        seq 1: prefix 2.2.2.2/32: minlen 32: maxlen 32: match deny: 

  inet6-unicast
    Filter updates recv:          0 Immediate:          1
    Filter: prefix-filter  receive
      Received filter entries:
        *:*

[Contents] [Prev] [Next] [Index] [Report an Error]