BGP Dynamic Routing Configuration Guide
Border Gateway Protocol (BGP) is a dynamic routing protocol used to exchange routing information between different Autonomous Systems (AS). It enables routers to automatically learn and advertise network routes, reducing the need for manually configured static routes.
Ray Gateway supports BGP configuration through the Dynamic Routing feature available in Ray Cloud. Administrators can configure BGP neighbors, define routing policies, control route advertisements, and manage the exchange of network prefixes.
This guide provides step-by-step instructions for configuring External BGP (eBGP) between a Ray Gateway and a neighboring router using the Ray Cloud management interface.
PrerequisitesBefore configuring BGP, ensure that the following requirements are met:
- The Ray Gateway is registered and accessible through Ray Cloud.
- The Ray Gateway and neighboring router have IP connectivity.
- Both routers have valid Autonomous System numbers.
- The local and remote LAN interfaces are correctly configured.
- TCP port 179 is permitted between BGP neighbors.
- The neighboring router supports BGP and has the corresponding peer configuration.
- The required network interfaces and routing paths are operational.
The following configuration is used to establish BGP communication between the Ray Gateway and a neighboring router.
Ray Gateway
- Router ID: 172.16.10.1
- Local AS: 65002
- LAN IP Address: 192.168.69.1/24
- Local Network: 192.168.69.0/24
BGP Neighbor
- Neighbor IP Address: 172.16.10.2
- Remote AS: 65001
- Remote Network: 192.168.79.0/24
Configuration Objective
Establish an eBGP session between the Ray Gateway and its neighboring router.
Once the BGP session is established, the Ray Gateway will advertise its local network 192.168.69.0/24 and learn the remote network 192.168.79.0/24 through BGP.
BGP Configuration Procedure Step 1: Navigate to Dynamic Routing Configuration
- Log in to the Ray Cloud management portal.
- Navigate to Profiles from the main navigation menu.
- Under Profiles, select Routing.
- Click the Dynamic Routing tab.
- Click + Create Dynamic Routing to create a new BGP routing profile.
Navigation Path:
Profiles → Routing → Dynamic Routing → Create Dynamic Routing

Step 2: Configure BGP Profile and Global Settings
After clicking + Create Dynamic Routing, the Dynamic Routing configuration window opens.
- Enter Profile name in the Profile Name field.
- Enter a description in the Description field (optional).
- Select BGP from the Definitions dropdown.
- Keep Enable Profile Overriding and Disable Auto Publish disabled.

Configure the following BGP parameters:
- Router ID: 172.16.10.1 — Specifies the unique identifier used to identify the BGP router.
- Local AS: 65002 — Defines the Autonomous System number assigned to the Ray Gateway.
- Redistribute Kernel: Allows eligible kernel routes to be redistributed into BGP when enabled.
- Redistribute Static: Allows configured static routes to be advertised through BGP.
- Redistribute Connected: Allows eligible directly connected networks to be redistributed into BGP.
- Redistribute RIP: Allows routes learned through RIP to be redistributed into BGP.
- Redistribute OSPF: Allows routes learned through OSPF to be redistributed into BGP.
- Enable IPv6: Enables IPv6-related BGP configuration.
For this example, keep all redistribution options and IPv6 disabled.
IPv4 Neighbor ConfigurationClick the + button under IPv4 Neighbors to add a new BGP neighbor.
Configure the following parameters:
- IPv4 Address: 172.16.10.2 — Specifies the IP address of the neighboring BGP router.
- Remote AS: 65001 — Defines the Autonomous System number of the neighboring router.
- Hop Count: 1 — Specifies the permitted hop count for reaching the BGP neighbor.
- Next Hop Self: Disabled — When enabled, allows the router to advertise its own address as the next hop for applicable routes.
- Default Originate: Disabled — When enabled, allows the router to advertise a default route to its BGP neighbor.
- Weight: Optional — Influences local BGP route selection on implementations supporting this attribute.
- Password: Optional — Configures authentication between BGP neighbors.
- Keep Alive Timer: Optional — Specifies the interval for sending BGP KEEPALIVE messages.
- Hold Timer: Optional — Defines how long the router waits without receiving valid BGP messages before declaring its neighbor unavailable.
Note: Since the Local AS and Remote AS are different, this configuration establishes an External BGP (eBGP) session. Both routers must have IP connectivity and matching peer configurations for the session to establish successfully.
Step 3: Configure Inbound BGP Prefix Filtering

The Neighbor’s Prefix Configuration section allows administrators to control which network routes are received from or advertised to the BGP neighbor.
- Navigate to Neighbor’s Prefix Configuration under the configured IPv4 neighbor.
- Click the + button to add a new prefix rule.
- Configure the following parameters:
- Prefix (IP Address/Subnet Mask): 192.168.79.0/24 — Specifies the remote network prefix to be permitted.
- Action: Permit — Allows routes matching the configured prefix rule.
- Prefix Length Operator: Less than (le) — Matches prefix lengths up to a specified maximum within the configured network prefix.
- Prefix Length: Optional — Defines the maximum prefix length used with the selected operator.
- Prefix Direction: In — Applies the prefix filter to routes received from the BGP neighbor.
Note: In this configuration, the Ray Gateway is intended to accept the remote network 192.168.79.0/24 from the BGP neighbor.
If the Prefix Length Operator is set to le, specify a valid maximum prefix length as required by the platform. For an exact /24 match, use the supported exact-prefix matching configuration.
Step 4: Configure Outbound BGP Prefix Filtering

The Outbound Prefix Configuration controls which network routes the Ray Gateway is permitted to advertise to its BGP neighbor.
- Navigate to Neighbor’s Prefix Configuration under the configured IPv4 neighbor.
- Click the + button to add another prefix rule.
- Configure the following parameters:
- Prefix (IP Address/Subnet Mask): 192.168.69.0/24 — Specifies the local LAN network prefix to be advertised to the BGP neighbor.
- Action: Permit — Allows routes matching the configured prefix rule to be advertised.
- Prefix Length Operator: Less than (le) — Matches prefix lengths up to a specified maximum within the configured network prefix.
- Prefix Length: Optional — Defines the maximum prefix length used with the selected operator.
- Prefix Direction: Out — Applies the prefix filter to routes advertised from the Ray Gateway to its BGP neighbor.
Note: In this configuration, the Ray Gateway is intended to advertise its local LAN network 192.168.69.0/24 to the BGP neighbor.
Ensure the prefix-length operator is configured correctly and that the network is included in the BGP advertisement configuration.
Step 5: Configure IPv4 Networks and Save the BGP Profile

The IPv4 Networks section allows administrators to select the local network interfaces whose associated network prefixes will be advertised to BGP neighbors.
- Navigate to the IPv4 Networks section.
- Click the + button to add a network interface.
- Configure the following parameters:
- Interface: Lan — Select the local network interface whose network prefix needs to be advertised through BGP.
- IP Address: 192.168.69.1/24 — Select the configured LAN IP address. The associated network 192.168.69.0/24 will be used for BGP advertisement.
The Other Networks section allows administrators to specify additional network prefixes for BGP advertisement.
For this example, no additional network prefixes are required.
Advanced ConfigurationThe Advance section allows administrators to select the appliance type on which the BGP configuration will be applied.
- Applicable For: Gateway — Specifies that the BGP routing profile is intended for Ray Gateway devices.
- Verify the configured BGP parameters, neighbor details, and network prefixes.
- Enter the required information in the Remarks field.
- Click Save to save the BGP Dynamic Routing profile.
- Publish or apply the saved profile to the appropriate Ray Gateway.
Expected Result: Once the BGP profile is applied and the neighboring router is correctly configured, the Ray Gateway can establish an eBGP session and exchange the permitted network routes.