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.

Advertise IPv4 prefix for IPv6 enabled BGP peers

IPv6 enabled BGP peers that are configured with address-family ipv4-unicast should have a route-map to define the next hop for the ipv4 prefix. This example defines a route-map for IPv6 enabled BGP peers. The route-map enables the device with a physical IPv6 address to advertise an IPv4 prefix with proper ipv4 address as the next hop.

Figure 1. Advertise IPv4 prefix for IPv6 enabled BGP peers

In this example Router 2 is connected to Router 4 and has IPv4 and IPv6 interfaces. The physical direct connection link is configured with IPv4 30.1.1/24 and IPv6 30:1:1::/64 addresses. Router 2 and Router 4 are configured as BGP peers by using ipv6 30:1:1::/64 address.

The network should look as shown in the figure.

Table 1. Advertise IPv4 prefix for IPv6 enabled BGP peers

Router

Step

Commands

R2

Display IPv4 prefix advertised by the BGP peer.

vyatta@R2# run show ip bgp ipv4 unicast
BGP table version is 5, local router ID is 170.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

    Network          Next Hop            Metric    LocPrf       Weight Path
*> 20.1.1.0/24      30.1.1.2                                   32768   ?

Total number of prefixes 1

R2

Display the configuration.

vyatta@R2# show protocol bgp
 bgp 100 {
        address-family {
                ipv4-unicast {
                        redistribute {
                                connected {
                                        route-map map1
                                }
                        }
                }
        }
        neighbor 30:1:1::1 {
                address-family {
                        ipv4-unicast
                        ipv6-unicast
                }
                remote-as 200
        }
 }

R2

Display the policy configuration.

vyatta@R2# show policy
 policy {
        route {
                prefix-list p1 {
                        rule 10 {
                                action permit
                                prefix 20.1.1.0/24
                        }
                }
                route-map map1 {
                        rule 10 {
                                action permit
                                match {
                                        ip {
                                                address {
                                                        prefix-list p1
                                                }
                                        }
                                }
                                set {
                                        ip-next-hop 30.1.1.2
                                }
                        }
                }
        }
 }

R2

Create a rule to

match prefix

20.1.1.0/24.

vyatta@R2# set policy route prefix-list p1 rule 10 action permit
vyatta@R2# set policy route prefix-list p1 rule 10 prefix 20.1.1.0/24

R2

Create a route-map rule to allow all IP address in the prefix list p1.

vyatta@R2# set policy route route-map map1 rule 10 action 'permit'
vyatta@R2# set policy route route-map map1 rule 10 match ip address prefix-list 'p1'

R2

Create a route-map rule to configure the ip-next hop as '30.1.1.2'.

vyatta@R2# set policy route route-map map1 rule 10 set ip-next-hop '30.1.1.2'

R2

Redistribute ipv4 unicast directly connected route into BGP.

vyatta@R2# set protocols bgp 100 address-family ipv4-unicast redistribute connected route-map map1

R2

Configure IPv4 and IPv6 unicast address family between BGP peers.

vyatta@R2# set protocols bgp 100 neighbor 30:1:1::1 address-family ipv4-unicast
vyatta@R2# set protocols bgp 100 neighbor 30:1:1::1 address-family ipv6-unicast
vyatta@R2# set protocols bgp 100 neighbor 30:1:1::1 remote-as 200

R2

Display interfaces to verify the configuration.

vyatta@R2# show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
dp0p160p1        10.18.177.130/21                  u/u
dp0p161p1        20.1.1.2/24                       u/u
                 20:1:1::2/64
dp0p162p1        -                                 u/u
dp0p192p1        -                                 u/u
dp0p193p1        -                                 u/u
dp0p193p1.10     110.1.1.1/24                      A/D
dp0p194p1        30.1.1.2/24                       u/u
                 30:1:1::2/64
dp0p224p1        -                                 u/u
dp0p225p1        -                                 u/u
dp0p256p1        -                                 u/u
dp0p257p1        -                                 u/u
lo1              170.2.2.2/24                      u/u
lo99             -                                 u/u

R2

Display advertised BGP IPv4 unicast routes for a BGP neighbor.

vyatta@R2# run show ip bgp ipv4 unicast neigh 30:1:1::1 advertised-routes
BGP table version is 25, local router ID is 170.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

    Network          Next Hop            Metric    LocPrf       Weight Path
*> 20.1.1.0/24      30.1.1.2                                   32768   ?

Total number of prefixes 1

R4

Display IPv4 unicast routes for R4.

vyatta@R4# show ip bgp ipv4 unicast
BGP table version is 7, local router ID is 170.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
              S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

    Network          Next Hop            Metric    LocPrf       Weight Path
*> 20.1.1.0/24      30.1.1.2             0                     0       100 ?

Total number of prefixes 1
vyatta@R4# sh ip bgp ipv4 unicast neighbors 30:1:1::2 received-routes
BGP table version is 7, local router ID is 170.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

    Network          Next Hop            Metric    LocPrf       Weight Path
*> 20.1.1.0/24      30.1.1.2                                   0       100 ?

Total number of prefixes 1

R4

Display interfaces for R4.

vyatta@R4# show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
dp0p160p1        10.18.177.132/21                  u/u
dp0p161p1        30.1.1.1/24                       u/u
                 30:1:1::1/64
dp0p192p1        -                                 u/u
dp0p193p1        -                                 u/u
dp0p224p1        -                                 u/u
dp0p225p1        -                                 u/u
dp0p256p1        -                                 A/D
dp0p257p1        -                                 A/D
lo1              170.4.4.4/32                      u/u
lo2              -                                 u/u

R4

Display the configuration on R4.

vyatta@R4# show protocol bgp
 bgp 200 {
        neighbor 30:1:1::2 {
                address-family {
                        ipv4-unicast {
                                soft-reconfiguration {
                                        inbound
                                }
                        }
                        ipv6-unicast
                }
                remote-as 100
        }
 }

R4

Configure the IPv6 neighbor.

vyatta@R4# set protocols bgp 200 neighbor 30:1:1::2 address-family ipv4-unicast soft-reconfiguration inbound

R4

Display the configuration.

vyatta@R4# show ip bgp summary
BGP router identifier 170.4.4.4, local AS number 200
BGP table version is 7
2 BGP AS-PATH entries
0 BGP community entries

IPv4 Unicast address family:
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  Statd
30:1:1::2       4          100      52      52        7    0    0 00:25:00     1
Total number of neighbors 1

IPv6 Unicast address family:
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  Statd
30:1:1::2       4          100      52      52        1    0    0 00:25:00     0
Total number of neighbors 1