Juniper Networks
Log in
|
How to Buy
|
Contact Us
|
United States (Change)
Choose Country
Close

Choose Country

North America

  • United States

Europe

  • Deutschland - Germany
  • España - Spain
  • France
  • Italia - Italy
  • Россия - Russia
  • United Kingdom

Asia Pacific

  • Asean Region (Vietnam, Indonesia, Singapore, Malaysia)
  • Australia
  • 中国 - China
  • India
  • 日本 - Japan
  • 대한민국 - Korea
  • 台灣 - Taiwan
Solutions
Products & Services
Company
Partners
Support
Education
Community
Security Intelligence Center

Technical Documentation

Technical Documentation
 
CLI Explorer New
 
Content Explorer New
 
Documentation Help New
 
Enterprise MIBs
 
EOL Documentation
 
Feature Explorer Login required New
 
Glossary
 
Portable Libraries
 
Home > Support > Technical Documentation > Configuring BGP Groups and Peers
Print
Rate and give feedback:  Feedback Received. Thank You!
Rate and give feedback: 
Close
This document helped resolve my issue.  Yes No

Additional Comments

800 characters remaining

May we contact you if necessary?

Name:  
E-mail: 
Submitting...

Configuring BGP Groups and Peers

A BGP system must determine which routing devices are its peers (neighbors). You define the peer relationships explicitly by configuring the neighboring routers that are the peers of the local BGP system. After peer relationships have been established, the BGP peers exchange update messages to advertise network reachability information.

You arrange BGP routing devices into groups of peers. Different peer groups must have different group types, AS numbers, or route reflector cluster identifiers.

Each group must contain at least one peer.

If you configure both route reflection and VPNs on the same routing device, the following modifications to the route reflection configuration cause current BGP sessions to be reset:

  • Adding a cluster ID—If a BGP session shares the same AS number with the group where you add the cluster ID, all BGP sessions are reset regardless of whether the BGP sessions are contained in the same group.
  • Creating a new route reflector—If you have an IBGP group with an AS number and create a new route reflector group with the same AS number, all BGP sessions in the IBGP group and the new route reflector group are reset.

Note: If you change the address family specified at the [edit protocols bgp family] hierarchy level, all current BGP sessions on the routing device are dropped and then reestablished.

To configure BGP groups and peers, see the following sections:

  • Defining a Group with Static Peers
  • Defining a Group with Dynamic Peers
  • Defining the Group Type
  • Specifying the Peer’s AS Number

Defining a Group with Static Peers

To define a BGP group that recognizes only the specified BGP systems as peers, statically configure all the system’s peers by including one or more neighbor statements. The peers on at least one side of each BGP connection must be configured statically. The peer neighbor’s address can be either an IPv6 or IPv4 address.

group group-name {peer-as autonomous-system;type type;neighbor address; # One "neighbor" statement for each peer}

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

As the number of EBGP groups increases, the ability to support a large number of BGP sessions may become a scaling issue. The preferred way to configure a large number of BGP neighbors is to configure a few groups consisting of multiple neighbors per group. Supporting fewer EBGP groups generally scales better than supporting a large number of EBGP groups. This becomes more evident in the case of hundreds of EBGP groups when compared with a few EBGP groups with multiple peers in each group. The following examples illustrate this point.

For sample configurations, see the following sections:

  • Example: Defining a Large Number of Groups with Static Peers
  • Example: Defining a Small Number of Groups with Static Peers for Better Scalability

Example: Defining a Large Number of Groups with Static Peers

Enable BGP and define three EBGP groups that recognize BGP systems in AS 56, AS 57, and AS 58 as peers:

[edit]routing-options {autonomous-system 23;}protocols {bgp {group G1 {type external;peer-as 56;neighbor 10.0.0.1;}group G2 {type external;peer-as 57;neighbor 10.0.10.1;}group G3 {type external;peer-as 58;neighbor 10.0.20.1;}}}

Example: Defining a Small Number of Groups with Static Peers for Better Scalability

For improved scalability, configure only one EBGP group consisting of the three BGP neighbors:

[edit]routing-options {autonomous-system 23;}protocols {bgp {group G {type external;neighbor 10.0.0.1 {peer-as 56;}neighbor 10.0.10.1 {peer-as 57;}neighbor 10.0.20.1 {peer-as 58;}}}}

Defining a Group with Dynamic Peers

To define a BGP group in which the local system’s peers are dynamic and change over time, include the allow statement. To recognize all BGP systems as peers, include the allow-all statement. To recognize BGP systems within specified address ranges, specify a set of addresses in the allow network/mask-length statement. These addresses can be IPv6 or IPv4 addresses.

group group-name {peer-as autonomous-system;type type;allow ([ network/mask-length] | all);}

Note: You cannot define a BGP group with dynamic peers with authentication enabled.

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

Defining the Group Type

When configuring a BGP group, you can indicate whether the group is an IBGP group or an EBGP group. All peers in an IBGP group are in the same AS, whereas peers in an EBGP group are in different ASs and normally share a subnet.

To configure an IBGP group, which allows intra-AS BGP routing, include the following form of the type statement:

type internal;

To configure an EBGP group, which allows inter-AS BGP routing, include the following form of the type statement:

type external;

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

Specifying the Peer’s AS Number

When configuring a peer, you must specify the peer system’s AS. To do this, include the peer-as statement:

peer-as autonomous-system;

For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.

For autonomous-system, you can specify a number of 1 through 4,294,967,295 in plain-number format. In Junos OS Release 9.1 and later, the range for autonomous system (AS) numbers is extended to provide BGP support for 4-byte AS numbers as defined in RFC 4893, BGP Support for Four-octet AS Number Space. The Junos OS continues to support 2-byte AS numbers. The 2-byte AS number range is 1 through 65,535 in plain-number format (this is a subset of the 4-byte range).

In Junos OS Release 9.2 and later, you can also configure a 4-byte AS number using the AS-dot notation format of two integer values joined by a period: <16-bit high-order value in decimal>.<16-bit low-order value in decimal>. For example, the 4-byte AS number of 65,546 in plain-number format is represented as 1.10 in the AS-dot notation format. You can specify a value in the range from 0.0 through 65535.65535 in AS-dot notation format.

For EBGP, the peer is in another AS, so the AS number you specify in the peer-as statement must be different from the local router’s AS number, which you specify in the autonomous-system statement. For IBGP, the peer is in the same AS, so the two AS numbers that you specify in the autonomous-system and peer-as statements must be the same. For more information about configuring the AS number of the local router, see Configuring AS Numbers for BGP.

With the introduction of 4-byte AS numbers, you might have a combination of routers that support 4-byte AS numbers and 2-byte AS numbers. For more information about what happens when you establish BGP peer relationships between 4-byte and 2-byte capable routers, see the following topics:

  • Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 2-Byte AS Number in the Using 4-Byte Autonomous System Numbers in BGP Networks Technology Overview.
  • Establishing a Peer Relationship Between a 4-Byte Capable Router and a 2-Byte Capable Router Using a 4-Byte AS Number in the Using 4-Byte Autonomous System Numbers in BGP Networks Technology Overview.

Published: 2011-11-11

 
  • About Juniper
  • Investor Relations
  • Press Releases
  • Newsletters
  • Juniper Offices
  • Green Networking
  • Resources
  • How to Buy
  • Partner Locator
  • Image Library
  • Visio Templates
  • Security Center
  • Community
  • Forums
  • Blogs
  • Junos Central
  • Social Media
  • Developers
  • Support
  • Technical Documentation
  • Knowledge Base (KB)
  • Software Downloads
  • Product Licensing
  • Contact Support
Site Map / RSS Feeds / Careers / Accessibility / Feedback / Privacy & Policy / Legal Notices
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.
Help
|
My Account
|
Log Out