Vyatta NOS documentation

Learn how to install, configure, and operate Vyatta Network Operating System (Vyatta NOS), which helps to drive our virtual networking and physical platforms portfolio.

Basic iBGP configuration

In this section, you configure iBGP on the routers labeled R1, R2, R3, and R4 in the reference network diagram. Each router has an iBGP peering connection to each of the other iBGP routers in the network, satisfying the full mesh iBGP peering requirement.

In the example, the iBGP peering connections are established between iBGP neighbors using the loopback interface IP addresses. This is typical practice, particularly when there are redundant connections between the iBGP routers.

In order for the routers to be able to reach each other using the loopback IP address, the loopback IP addresses must be reachable via an entry in the routing table of the router. This requires some form of Internal Gateway Protocol (IGP).

The following figure shows the BGP connections after you have completed the iBGP configuration.

Figure 1. Basic iBGP configuration

This example assumes that you have already configured the router interfaces and IGP; only the steps required to implement BGP are shown.

To create a basic iBGP configuration, perform the following steps in configuration mode.

Table 1. Basic iBGP configuration

Router

Step

Commands

R1

Create an iBGP peer for R2. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R1# set protocols bgp 100 neighbor 10.0.0.22 address-family ipv4-unicast

R1

Define the IP address on the local R1 router that is used to peer with the R2 router.

vyatta@R1# set protocols bgp 100 neighbor 10.0.0.22 update-source 10.0.0.11

R1

Create an iBGP peer for R3. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R1# set protocols bgp 100 neighbor 10.0.0.33 address-family ipv4-unicast

R1

Define the IP address on the local R1 router that is used to peer with the R3 router.

vyatta@R1# set protocols bgp 100 neighbor 10.0.0.33 update-source 10.0.0.11

R1

Create an iBGP peer for R4. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R1# set protocols bgp 100 neighbor 10.0.0.44 address-family ipv4-unicast

R1

Define the IP address on the local R1 router that is used to peer with the R4 router.

vyatta@R1# set protocols bgp 100 neighbor 10.0.0.44 update-source 10.0.0.11

R1

Set the router ID to the loopback address, which on R1 is 10.0.0.11.

vyatta@R1# set protocols bgp 100 parameters router-id 10.0.0.11

R1

Commit the configuration.

vyatta@R1# commit

R1

Display the configuration.

vyatta@R1# show protocols
 bgp 100 {
     neighbor 10.0.0.22 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.11
      }
     }
    }
     neighbor 10.0.0.33 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.11
      }
     }
    }
     neighbor 10.0.0.44 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.11
      }
     }
    }

R2

Set the router ID to be the loopback IP address.

vyatta@R2# set protocols ospf parameters router-id 10.0.0.22

R2

Create an iBGP peer for R1. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R2# set protocols bgp 100 neighbor 10.0.0.11 address-family ipv4-unicast

R2

Define the IP address on the local R2 router that is used to peer with the R1 router.

vyatta@R2# set protocols bgp 100 neighbor 10.0.0.11 update-source 10.0.0.22

R2

Create an iBGP peer for R3. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R2# set protocols bgp 100 neighbor 10.0.0.33 address-family ipv4-unicast

R2

Define the IP address on the local R2 router that is used to peer with the R3 router.

vyatta@R2# set protocols bgp 100 neighbor 10.0.0.33 update-source 10.0.0.22

R2

Create an iBGP peer for R4. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R2# set protocols bgp 100 neighbor 10.0.0.44 address-family ipv4-unicast

R2

Define the IP address on the local R2 router that is used to peer with the R4 router.

vyatta@R2# set protocols bgp 100 neighbor 10.0.0.44 update-source 10.0.0.22

R2

Activate the neighbor for the IPv4 unicast address family to enable the exchange IPv4 unicast routes.

vyatta@R2# set protocols bgp 100 neighbor 10.0.0.44 address-family ipv4-unicast

R2

Set the router ID to the loopback address, which on R2 is 10.0.0.22.

vyatta@R2# set protocols bgp 100 parameters router-id 10.0.0.22

R2

Commit the configuration.

vyatta@R2# commit

R2

Display the configuration.

vyatta@R2# show protocols
 bgp 100 {
     neighbor 10.0.0.11 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.22
      }
     }
    }
     neighbor 10.0.0.33 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.22
      }
     }
    }
     neighbor 10.0.0.44 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.22
      }
     }
    }
     neighbor 10.0.0.44 {
         address-family ipv4-unicast
     }
     parameters {
         router-id 10.0.0.22
     }
 }
 ospf {
     area 0.0.0.0 {
         network 172.16.0.0/24
         network 10.0.0.22/32
     }
     parameters {
         router-id 10.0.0.22
     }
 }

R3

Advertise the loopback address within the OSPF area. This is needed for iBGP.

vyatta@R3# set protocols ospf area 0.0.0.0 network 10.0.0.33/32

R3

Advertise the local network within the OSPF area.

vyatta@R3# set protocols ospf area 0.0.0.0 network 172.16.0.0/24

R3

Set the router ID to be the loopback IP address.

vyatta@R3# set protocols ospf parameters router-id 10.0.0.33

R3

Create an iBGP peer for R1. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R3# set protocols bgp 100 neighbor 10.0.0.11 address-family ipv4-unicast

R3

Define the IP address on the local R3 router that is used to peer with the R1 router.

vyatta@R3# set protocols bgp 100 neighbor 10.0.0.11 update-source 10.0.0.33 

R3

Create an iBGP peer for R2. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R3# set protocols bgp 100 neighbor 10.0.0.22 address-family ipv4-unicast

R3

Define the IP address on the local R3 router that is used to peer with the R2 router.

vyatta@R3# set protocols bgp 100 neighbor 10.0.0.22 update-source 10.0.0.33

R3

Create an iBGP peer for R4. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R3# set protocols bgp 100 neighbor 10.0.0.44 address-family ipv4-unicast

R3

Define the IP address on the local R3 router that is used to peer with the R4 router.

vyatta@R3# set protocols bgp 100 neighbor 10.0.0.44 update-source 10.0.0.33

R3

Set the router ID to the loopback address, which on R3 is 10.0.0.33.

vyatta@R3# set protocols bgp 100 parameters router-id 10.0.0.33

R3

Commit the configuration.

vyatta@R3# commit

R3

Display the configuration.

vyatta@R3# show protocols 
 bgp 100 {
     neighbor 10.0.0.11 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.33
      }
     }
    }
     neighbor 10.0.0.22 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.33
      }
     }
    }
     neighbor 10.0.0.44 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.33
      }
     }
    }
     neighbor 10.0.0.44 {
         address-family ipv4-unicast
     }
    parameters {
         router-id 10.0.0.33     }
 }
 ospf {
     area 0.0.0.0 {
         network 172.16.0.0/24
         network 10.0.0.33/32
     }
     parameters {
         router-id 10.0.0.33
     }
 }

R4

Advertise the loopback address within the OSPF area. This is needed for iBGP.

vyatta@R4# set protocols ospf area 0.0.0.0 network 10.0.0.44/32

R4

Advertise the local network within the OSPF area.

vyatta@R4# set protocols ospf area 0.0.0.0 network 172.16.0.0/24

R4

Advertise the external network within the OSPF area.

vyatta@R4# set protocols ospf area 0.0.0.0 network 99.99.99.0/30

R4

Set the router ID to be the loopback IP address.

vyatta@R4# set protocols ospf parameters router-id 10.0.0.44

R4

Configure the dp0p1p1 interface to be a passive interface (i.e. do not advertise our internal network routes over the external network).

vyatta@R4# set protocols ospf passive-interface dp0p1p1 

R4

Create an iBGP peer for R1. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R4# set protocols bgp 100 neighbor 10.0.0.11 address-family ipv4-unicast

R4

Define the IP address on the local R4 router that is used to peer with the R1 router.

vyatta@R4# set protocols bgp 100 neighbor 10.0.0.11 update-source 10.0.0.44

R4

Create an iBGP peer for R2. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R4# set protocols bgp 100 neighbor 10.0.0.22 address-family ipv4-unicast

R4

Define the IP address on the local R4 router that is used to peer with the R2 router.

vyatta@R4# set protocols bgp 100 neighbor 10.0.0.22 update-source 10.0.0.44

R4

Create an iBGP peer for R3. The peer is an iBGP peer because it resides within the same AS as this router.

vyatta@R4# set protocols bgp 100 neighbor 10.0.0.33 address-family ipv4-unicast

R4

Define the IP address on the local R4 router that is used to peer with the R3 router.

vyatta@R4# set protocols bgp 100 neighbor 10.0.0.33 update-source 10.0.0.44

R4

Set the router ID to the loopback address, which on R4 is 10.0.0.44.

vyatta@R4# set protocols bgp 100 parameters router-id 10.0.0.44

R4

Commit the configuration.

vyatta@R4# commit

R4

Display the configuration.

vyatta@R4# show protocols 
 bgp 100 {
     neighbor 10.0.0.11 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.44
      }
     }
    }
     neighbor 10.0.0.22 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.44
      }
     }
    }
     neighbor 10.0.0.33 {
         address-family {
            ipv4-unicast {
               update-source 10.0.0.44
      }
     }
    }
     neighbor 10.0.0.44 {
         address-family ipv4-unicast
     }
     parameters {
         router-id 10.0.0.44
     }
 }
 ospf {
     area 0.0.0.0 {
         network 172.16.0.0/24
         network 99.99.99.0/30
         network 10.0.0.44/32
     }
     parameters {
         router-id 10.0.0.44
     }
     passive-interface dp0p1p1
 }