BGP/Examples/Example 2:Two routers with two peers

From ImageStream Router Documentation

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
This is meant to be an example, and not a complete BGP (Border Gateway Protocol) routing configuration.  
+
:This is meant to be an example, and ''not'' a complete BGP (Border Gateway Protocol) routing configuration.
 +
===Scenario===
 +
:You have two connections to the internet. One connection through ISP 1, one connection through ISP 2. Each ISP has a router connected to it. Each router has two ethernet ports, Ethernet port 0 is connected to the other router, while ethernet port 1 is connected to your LAN. You want to advertise your network of 192.168.42.0/24 to both ISPs. Furthermore, you want to ensure that traffic always has a path in and out of your network.
-
+
===Network Diagram===
-
Router Diagram
+
+-------------------------+            +----------------------+
-
---------------------------        ------------------------
+
  |                         |           |                      |
-
|        +------------+ |       | +------------+      |
+
  | ISP 1                   |           | ISP 2                |  
-
| AS    |Router 1   | |       |Router 2    | AS   |
+
  | AS  932                |           | AS 8855             |
-
| 9966    |172.16.96.76| |       |10.200.10.3 | 8855 |
+
  |                         |           |                     |
-
|        +------------+ |       | +------------+      |
+
+-------------------------+            +----------------------+
-
|                  /      |        |      |              |
+
    | 12.23.4.1/30                          | 120.2.4.1/30
-
---------------------------        ------------------------
+
    |                                       |  
-
                /                       |
+
    | EBGP                                  | EBGP
-
          EBGP /        |----------------|      
+
    |                                      |   
-
              /        |     EBGP      
+
---------------------------------------------------------
-
---------------------------------------------------------
+
    |                AS 9009               |
-
              /  AS 9009 |     
+
     | 12.23.4.2/30                          | 120.2.4.2/30
-
+------------+ ----------|
+
+----------------+                      +---------------+
-
|Main Router |
+
  | Router 1      | 12.23.4.2/32          | Router 2      |
-
|192.168.10.5|
+
|               |-----------------------|               |
-
+------------+
+
+----------------+         120.2.4.2/32 +---------------+
-
      |                               
+
            | 192.168.42.2/24              | 192.168.42.3/24
-
      | IBGP           
+
            |                               |
-
      |               
+
            |                               |
-
+------------+                    
+
            ---------[ LAN Switch ]--------
-
|2nd Router |
+
-
|192.168.10.6|-----------|        
+
-
+------------+          |
+
-
    \            AS 9009 |    
+
-
---------------------------------------------------------
+
-
      \                  |     EBGP
+
-
      \ EBGP            |----------------|
+
-
        \                                |
+
-
        \                                |
+
-
---------------------------        --------------------------
+
-
|         \              |        |                        |
+
-
|        +------------+  |        |  +-------------+       |
+
-
| AS    |Router 5    |  |        |  |Router 6    | AS    |
+
-
| 35000  |2.1.1.1    | |        |  |191.255.40.5 | 40000 |
+
-
|         +------------+ |        | +-------------+      |
+
-
---------------------------        --------------------------
+
-
Ensure that all routers running BGP have at least 192 MB of memory. Remember to save your configurations to flash whenever you are finished configuring your dynamic routing setup! To enable BGP, do the following:
+
:Ensure that all routers running BGP have at least 512MB of memory. Remember to save your configurations to flash whenever you are finished configuring your dynamic routing setup!
-
At the Login: prompt, enter root.
+
 
-
At the Password: prompt, enter your password.
+
===Configuration===
-
Choose Option 1 (Configuration and Update Menu) from the Main Menu. Select Option 3 (Service Configuration).
+
:There is more to this configuration than only BGP. First, the routers connect together via Ethernet0. Static routes must be assigned to each router so that either router knows to find its other half. VRRP enables a single IP address to be shared between both routers so that LAN devices can always find a path out.
-
From the Service Configuration menu, you can see the status of the Dynamic routing (gated) package. If gated is running, the option will show "(running)".  
+
====Router 1====
-
To start gated, choose Option 3 (Dynamic routing) and choose Option 5 (Start gated) from the Dynamic routing menu. You will also want to select Option 3 (Enable gated on boot) to ensure that BGP session will be established at boottime. Ensure that you have configured gated prior to attempting to start it. Unless it is properly configured, gated will not start.  
+
-
In our example above, we will be configuring the "Main Router". From the Dynamic routing menu, choose Option 1 (gated configuration). Our AS for this example will be 9009. Choose Option 4 (Configure BGP) from the menu. This will open a file in your default editor.
+
-
Edit the "autonomoussystem" parameter. In this case, our AS number is 9009:
+
-
Edit the first "External peeras" section
+
-
Add additional sections for each external and internal peer
+
-
The completed file for our example should look like this:
+

Revision as of 23:56, 31 May 2008

This is meant to be an example, and not a complete BGP (Border Gateway Protocol) routing configuration.

Contents

Scenario

You have two connections to the internet. One connection through ISP 1, one connection through ISP 2. Each ISP has a router connected to it. Each router has two ethernet ports, Ethernet port 0 is connected to the other router, while ethernet port 1 is connected to your LAN. You want to advertise your network of 192.168.42.0/24 to both ISPs. Furthermore, you want to ensure that traffic always has a path in and out of your network.

Network Diagram

+-------------------------+            +----------------------+
|                         |            |                      |
| ISP 1                   |            | ISP 2                | 
| AS  932                 |            | AS  8855             |
|                         |            |                      |
+-------------------------+            +----------------------+
   | 12.23.4.1/30                          | 120.2.4.1/30
   |                                       |    
   | EBGP                                  | EBGP
   |                                       |     
---------------------------------------------------------
   |                 AS 9009               |
   | 12.23.4.2/30                          | 120.2.4.2/30
+----------------+                       +---------------+
| Router 1       | 12.23.4.2/32          | Router 2      |
|                |-----------------------|               |
+----------------+          120.2.4.2/32 +---------------+
           | 192.168.42.2/24               | 192.168.42.3/24
           |                               |
           |                               |
           ---------[  LAN Switch  ]--------
Ensure that all routers running BGP have at least 512MB of memory. Remember to save your configurations to flash whenever you are finished configuring your dynamic routing setup!

Configuration

There is more to this configuration than only BGP. First, the routers connect together via Ethernet0. Static routes must be assigned to each router so that either router knows to find its other half. VRRP enables a single IP address to be shared between both routers so that LAN devices can always find a path out.

Router 1

Personal tools
Router software releases