Tip

This is the documentation for the 19.12 version. Looking for the documentation of the latest version? Have a look here.

Service Provider Route Reflectors and Client for iBGP IPv4

Use Case

In large service provider networks it is necessary to divide the routing functionality into two or more layers: a backbone layer and a gateway layer. This allows backbone routers to be focused on core routing and switching to/from other areas of the routing domain, and gateway routers may then be focused on interconnecting other service provider customers.

Example Scenario

In this example, the service provider will have a fictitious autonomous system number (ASN) of 65505, Each network POP, of which only one will be detailed here, will feature 2 backbone routers which will be configured as route-reflectors. These backbone routers will be participating in BGP Cluster ID 100. Other POPs will likely be different Cluster IDs.

There will also be a single gateway router which will be a client of the backbone route-reflectors. Of course, in real world scenarios there would likely be many more gateway routers, each serving a full complement of customers.

BGP Route Reflector Setup Parameters

Item

Value

TNSR Autonomous System Number

65505

IPv4 Networks to be announced

192.0.2.0/24, 203.0.113.0/24

BGP Route-Reflector Cluster ID

100

Scenario Topology

../../_images/diagram-bgp-router-reflector.png

TNSR BGP Route Reflector

TNSR Configuration Steps

Step 1: Configure Interfaces

RR1:

rr1 tnsr# conf
rr1 tnsr(config)# interface GigabitEthernet0/13/0
rr1 tnsr(config-interface)# description "To Backbone Network"
rr1 tnsr(config-interface)# ip address 203.0.113.13/30
rr1 tnsr(config-interface)# enable
rr1 tnsr(config-interface)# exit
rr1 tnsr(config)# interface GigabitEthernet0/14/0
rr1 tnsr(config-interface)# description "To RR2 Router"
rr1 tnsr(config-interface)# ip address 203.0.113.21/30
rr1 tnsr(config-interface)# enable
rr1 tnsr(config-interface)# exit
rr1 tnsr(config)# interface GigabitEthernet0/15/0
rr1 tnsr(config-interface)# description "To GW router"
rr1 tnsr(config-interface)# ip address 203.0.113.5/30
rr1 tnsr(config-interface)# enable
rr1 tnsr(config-interface)# exit
rr1 tnsr(config)#

RR2:

rr2 tnsr# conf
rr2 tnsr(config)# interface GigabitEthernet0/13/0
rr2 tnsr(config-interface)# description "To Backbone Network"
rr2 tnsr(config-interface)# ip address 203.0.113.17/30
rr2 tnsr(config-interface)# enable
rr2 tnsr(config-interface)# exit
rr2 tnsr(config)# interface GigabitEthernet0/14/0
rr2 tnsr(config-interface)# description "To RR1 Router"
rr2 tnsr(config-interface)# ip address 203.0.113.22/30
rr2 tnsr(config-interface)# enable
rr2 tnsr(config-interface)# exit
rr2 tnsr(config)# interface GigabitEthernet0/15/0
rr2 tnsr(config-interface)# description "To GW router"
rr2 tnsr(config-interface)# ip address 203.0.113.9/30
rr2 tnsr(config-interface)# enable
rr2 tnsr(config-interface)# exit
rr2 tnsr(config)#

GW:

gw tnsr# conf
gw tnsr(config)# interface GigabitEthernet0/13/0
gw tnsr(config-interface)# description "To RR1 Router"
gw tnsr(config-interface)# ip address 203.0.113.6/30
gw tnsr(config-interface)# enable
gw tnsr(config-interface)# exit
gw tnsr(config)# interface GigabitEthernet0/14/0
gw tnsr(config-interface)# description "To RR2 Router"
gw tnsr(config-interface)# ip address 203.0.113.10/30
gw tnsr(config-interface)# enable
gw tnsr(config-interface)# exit
gw tnsr(config)# interface GigabitEthernet0/15/0
gw tnsr(config-interface)# desc "To Customer Router"
gw tnsr(config-interface)# ip address 203.0.113.25/30
gw tnsr(config-interface)# enable
gw tnsr(config-interface)# exit
gw tnsr(config)#

Step 2: Enable BGP

RR1:

rr1 tnsr(config)# route dynamic bgp
rr1 tnsr(config-frr-bgp)# enable
rr1 tnsr(config-frr-bgp)# exit
rr1 tnsr(config)#

RR2:

rr2 tnsr(config)# route dynamic bgp
rr2 tnsr(config-frr-bgp)# enable
rr2 tnsr(config-frr-bgp)# exit
rr2 tnsr(config)#

GW:

gw tnsr(config)# route dynamic bgp
gw tnsr(config-frr-bgp)# enable
gw tnsr(config-frr-bgp)# exit
gw tnsr(config)#

Step 3: Create prefix-lists for route import into BGP on Route-Reflectors

RR1:

rr1 tnsr(config)# route dynamic prefix-list REDISTRIBUTE_IPv4
rr1 tnsr(config-prefix-list)# description "IPv4 Routes to Import"
rr1 tnsr(config-prefix-list)# seq 10 permit 192.0.2.0/24
rr1 tnsr(config-prefix-list)# seq 20 permit 203.0.113.0/24
rr1 tnsr(config-prefix-list)# exit
rr1 tnsr(config)#

RR2:

rr2 tnsr(config)# route dynamic prefix-list REDISTRIBUTE_IPv4
rr2 tnsr(config-prefix-list)# description "IPv4 Routes to Import"
rr2 tnsr(config-prefix-list)# seq 10 permit 192.0.2.0/24
rr2 tnsr(config-prefix-list)# seq 20 permit 203.0.113.0/24
rr2 tnsr(config-prefix-list)# exit
rr2 tnsr(config)#

Step 4: Create route-map for route import into iBGP on route-reflectors

RR1:

rr1 tnsr(config)# route dynamic route-map REDISTRIBUTE_IPv4 permit sequence 10
rr1 tnsr(config-route-map)# match ip address prefix-list REDISTRIBUTE_IPv4
rr1 tnsr(config-route-map)# set origin igp
rr1 tnsr(config-route-map)# exit
rr1 tnsr(config)#

RR2:

rr2 tnsr(config)# route dynamic route-map REDISTRIBUTE_IPv4 permit sequence 10
rr2 tnsr(config-route-map)# match ip address prefix-list REDISTRIBUTE_IPv4
rr2 tnsr(config-route-map)# set origin igp
rr2 tnsr(config-route-map)# exit
rr2 tnsr(config)#

Step 5: Create static route for networks to be advertised in BGP

RR1:

rr1 tnsr(config)# route ipv4 table ipv4-VRF:0
rr1 tnsr(config-route-table-v4)# route 192.0.2.0/24
rr1 tnsr(config-rttbl4-next-hop)# next-hop 1 via local
rr1 tnsr(config-rttbl4-next-hop)# exit
rr1 tnsr(config-route-table-v4)# route 203.0.113.0/24
rr1 tnsr(config-rttbl4-next-hop)# next-hop 1 via local
rr1 tnsr(config-rttbl4-next-hop)# exit
rr1 tnsr(config-route-table-v4)# exit
rr1 tnsr(config)#

RR2:

rr2 tnsr(config)# route ipv4 table ipv4-VRF:0
rr2 tnsr(config-route-table-v4)# route 192.0.2.0/24
rr2 tnsr(config-rttbl4-next-hop)# next-hop 1 via local
rr2 tnsr(config-rttbl4-next-hop)# exit
rr2 tnsr(config-route-table-v4)# route 203.0.113.0/24
rr2 tnsr(config-rttbl4-next-hop)# next-hop 1 via local
rr2 tnsr(config-rttbl4-next-hop)# exit
rr2 tnsr(config-route-table-v4)# exit
rr2 tnsr(config)#

Step 6: Configure BGP global options

RR1:

rr1 tnsr(config)# route dynamic bgp
rr1 (config-frr-bgp)# server 65505
rr1 tnsr(config-bgp)# router-id 203.0.113.21
rr1 tnsr(config-bgp)# cluster-id 100
rr1 tnsr(config-bgp)# address-family ipv4 unicast
rr1 tnsr(config-bgp-ip4uni)# redistribute kernel route-map REDISTRIBUTE_IPv4
rr1 tnsr(config-bgp-ip4uni)# exit
rr1 tnsr(config-bgp)#

RR2:

rr1 tnsr(config)# route dynamic bgp
rr1 (config-frr-bgp)# server 65505
rr2 tnsr(config-bgp)# router-id 203.0.113.22
rr2 tnsr(config-bgp)# cluster-id 100
rr2 tnsr(config-bgp)# address-family ipv4 unicast
rr2 tnsr(config-bgp-ip4uni)# redistribute kernel route-map REDISTRIBUTE_IPv4
rr2 tnsr(config-bgp-ip4uni)# exit
rr2 tnsr(config-bgp)#

GW:

gw tnsr(config)# route dynamic bgp
gw (config-frr-bgp)# server 65505
gw tnsr(config-bgp)# router-id 203.0.113.6
gw tnsr(config-bgp)#

Step 7: Configure iBGP peer-group for backbone route-reflectors and add neighbor

RR1:

rr1 tnsr(config-bgp)# neighbor iBGP
rr1 tnsr(config-bgp-neighbor)# remote-as 65505
rr1 tnsr(config-bgp-neighbor)# description "iBGP Sessions"
rr1 tnsr(config-bgp-neighbor)# update-source GigabitEthernet0/14/0
rr1 tnsr(config-bgp-neighbor)# enable
rr1 tnsr(config-bgp-neighbor)# exit
rr1 tnsr(config-bgp)# neighbor 203.0.113.22
rr1 tnsr(config-bgp-neighbor)# peer-group iBGP
rr1 tnsr(config-bgp-neighbor)# enable
rr1 tnsr(config-bgp-neighbor)# exit

RR2:

rr2 tnsr(config-bgp)# neighbor iBGP
rr2 tnsr(config-bgp-neighbor)# remote-as 65505
rr2 tnsr(config-bgp-neighbor)# description "iBGP Sessions"
rr2 tnsr(config-bgp-neighbor)# update-source GigabitEthernet0/14/0
rr2 tnsr(config-bgp-neighbor)# enable
rr2 tnsr(config-bgp-neighbor)# exit
rr2 tnsr(config-bgp)# neighbor 203.0.113.21
rr2 tnsr(config-bgp-neighbor)# peer-group iBGP
rr2 tnsr(config-bgp-neighbor)# enable
rr2 tnsr(config-bgp-neighbor)# exit

Step 8: Configure RR-CLIENT peer-group for route-reflector clients and add neighbor

RR1:

rr1 tnsr(config-bgp)# neighbor RR-CLIENT
rr1 tnsr(config-bgp-neighbor)# remote-as 65505
rr1 tnsr(config-bgp-neighbor)# description "RR-Client Sessions"
rr1 tnsr(config-bgp-neighbor)# update-source GigabitEthernet0/15/0
rr1 tnsr(config-bgp-neighbor)# enable
rr1 tnsr(config-bgp-neighbor)# exit
rr1 tnsr(config-bgp)# neighbor 203.0.113.6
rr1 tnsr(config-bgp-neighbor)# peer-group RR-CLIENT
rr1 tnsr(config-bgp-neighbor)# enable
rr1 tnsr(config-bgp-neighbor)# exit
rr1 tnsr(config-bgp)#

RR2:

rr2 tnsr(config-bgp)# neighbor RR-CLIENT
rr2 tnsr(config-bgp-neighbor)# remote-as 65505
rr2 tnsr(config-bgp-neighbor)# description "RR-Client Sessions"
rr2 tnsr(config-bgp-neighbor)# update-source GigabitEthernet0/15/0
rr2 tnsr(config-bgp-neighbor)# enable
rr2 tnsr(config-bgp-neighbor)# exit
rr2 tnsr(config-bgp)# neighbor 203.0.113.10
rr2 tnsr(config-bgp-neighbor)# peer-group RR-CLIENT
rr2 tnsr(config-bgp-neighbor)# enable
rr2 tnsr(config-bgp-neighbor)# exit
rr2 tnsr(config-bgp)#

Step 9: Configure both peer-group address-family options on route-reflectors

RR1:

rr1 tnsr(config-bgp)# address-family ipv4 unicast
rr1 tnsr(config-bgp-ip4uni)# neighbor iBGP
rr1 tnsr(config-bgp-ip4uni-nbr)# next-hop-self
rr1 tnsr(config-bgp-ip4uni-nbr)# activate
rr1 tnsr(config-bgp-ip4uni-nbr)# exit
rr1 tnsr(config-bgp-ip4uni)# neighbor RR-CLIENT
rr1 tnsr(config-bgp-ip4uni-nbr)# route-reflector-client
rr1 tnsr(config-bgp-ip4uni-nbr)# activate
rr1 tnsr(config-bgp-ip4uni-nbr)# exit
rr1 tnsr(config-bgp-ip4uni)# exit
rr1 tnsr(config-bgp)#

RR2:

rr2 tnsr(config-bgp)# address-family ipv4 unicast
rr2 tnsr(config-bgp-ip4uni)# neighbor iBGP
rr2 tnsr(config-bgp-ip4uni-nbr)# next-hop-self
rr2 tnsr(config-bgp-ip4uni-nbr)# activate
rr2 tnsr(config-bgp-ip4uni-nbr)# exit
rr2 tnsr(config-bgp-ip4uni)# neighbor RR-CLIENT
rr2 tnsr(config-bgp-ip4uni-nbr)# route-reflector-client
rr2 tnsr(config-bgp-ip4uni-nbr)# activate
rr2 tnsr(config-bgp-ip4uni-nbr)# exit
rr2 tnsr(config-bgp-ip4uni)# exit
rr2 tnsr(config-bgp)#

Step 10: Configure iBGP on gateway router to both route-reflectors

GW:

gw tnsr(config-bgp)# neighbor 203.0.113.5
gw tnsr(config-bgp-neighbor)# remote-as 65505
gw tnsr(config-bgp-neighbor)# description "RR1 Session"
gw tnsr(config-bgp-neighbor)# update-source GigabitEthernet0/13/0
gw tnsr(config-bgp-neighbor)# enable
gw tnsr(config-bgp-neighbor)# exit
gw tnsr(config-bgp)# neighbor 203.0.113.9
gw tnsr(config-bgp-neighbor)# remote-as 65505
gw tnsr(config-bgp-neighbor)# description "RR2 Session"
gw tnsr(config-bgp-neighbor)# update-source GigabitEthernet0/14/0
gw tnsr(config-bgp-neighbor)# enable
gw tnsr(config-bgp-neighbor)# exit
gw tnsr(config-bgp)# address-family ipv4 unicast
gw tnsr(config-bgp-ip4uni)# neighbor 203.0.113.5
gw tnsr(config-bgp-ip4uni-nbr)# activate
gw tnsr(config-bgp-ip4uni-nbr)# exit
gw tnsr(config-bgp-ip4uni)# neighbor 203.0.113.9
gw tnsr(config-bgp-ip4uni-nbr)# activate
gw tnsr(config-bgp-ip4uni-nbr)# exit
gw tnsr(config-bgp-ip4uni)# exit
gw tnsr(config-bgp)#

JSON Configuration

RR1

  1{
  2  "data": {
  3    "bgp-config": {
  4      "global-options": {
  5        "enable": true
  6      },
  7      "routers": {
  8        "router": [
  9          {
 10            "asn": 65505,
 11            "cluster-id": "100",
 12            "router-id": "203.0.113.21",
 13            "address-families": {
 14              "address-family": [
 15                {
 16                  "family": "ipv4",
 17                  "subfamily": "labeled-unicast"
 18                },
 19                {
 20                  "family": "ipv4",
 21                  "subfamily": "multicast"
 22                },
 23                {
 24                  "family": "ipv4",
 25                  "subfamily": "unicast",
 26                  "neighbors": {
 27                    "neighbor": [
 28                      {
 29                        "peer": "RR-CLIENT",
 30                        "activate": true,
 31                        "route-reflector-client": true
 32                      },
 33                      {
 34                        "peer": "iBGP",
 35                        "activate": true,
 36                        "next-hop-self": true
 37                      }
 38                    ]
 39                  },
 40                  "redistributions": {
 41                    "named-sources": {
 42                      "route-source": [
 43                        {
 44                          "source": "kernel",
 45                          "route-map": "REDISTRIBUTE_IPv4"
 46                        }
 47                      ]
 48                    }
 49                  }
 50                },
 51                {
 52                  "family": "ipv4",
 53                  "subfamily": "vpn"
 54                },
 55                {
 56                  "family": "ipv6",
 57                  "subfamily": "labeled-unicast"
 58                },
 59                {
 60                  "family": "ipv6",
 61                  "subfamily": "multicast"
 62                },
 63                {
 64                  "family": "ipv6",
 65                  "subfamily": "unicast"
 66                },
 67                {
 68                  "family": "ipv6",
 69                  "subfamily": "vpn"
 70                },
 71                {
 72                  "family": "l2vpn",
 73                  "subfamily": "evpn"
 74                },
 75                {
 76                  "family": "vpnv4",
 77                  "subfamily": "unicast"
 78                },
 79                {
 80                  "family": "vpnv6",
 81                  "subfamily": "unicast"
 82                }
 83              ]
 84            },
 85            "neighbors": {
 86              "neighbor": [
 87                {
 88                  "peer": "203.0.113.22",
 89                  "capability-negotiate": true,
 90                  "peer-group-name": "iBGP",
 91                  "enable": true
 92                },
 93                {
 94                  "peer": "203.0.113.6",
 95                  "capability-negotiate": true,
 96                  "peer-group-name": "RR-CLIENT",
 97                  "enable": true
 98                },
 99                {
100                  "peer": "RR-CLIENT",
101                  "capability-negotiate": true,
102                  "description": "<![CDATA[\"RR-Client Sessions\"]]>",
103                  "remote-asn": 65505,
104                  "enable": true,
105                  "update-source": "GigabitEthernet0/15/0"
106                },
107                {
108                  "peer": "iBGP",
109                  "capability-negotiate": true,
110                  "description": "<![CDATA[\"iBGP Sessions\"]]>",
111                  "remote-asn": 65505,
112                  "enable": true,
113                  "update-source": "GigabitEthernet0/14/0"
114                }
115              ]
116            }
117          }
118        ]
119      }
120    },
121    "interfaces-config": {
122      "interface": [
123        {
124          "name": "GigabitEthernet0/13/0",
125          "description": "<![CDATA[\"To Backbone Network\"]]>",
126          "enabled": true,
127          "ipv4": {
128            "enabled": true,
129            "forwarding": false,
130            "address": {
131              "ip": "203.0.113.13/30"
132            }
133          },
134          "ipv6": {
135            "enabled": true,
136            "forwarding": false
137          }
138        },
139        {
140          "name": "GigabitEthernet0/14/0",
141          "description": "<![CDATA[\"To RR2 Router\"]]>",
142          "enabled": true,
143          "ipv4": {
144            "enabled": true,
145            "forwarding": false,
146            "address": {
147              "ip": "203.0.113.21/30"
148            }
149          },
150          "ipv6": {
151            "enabled": true,
152            "forwarding": false
153          }
154        },
155        {
156          "name": "GigabitEthernet0/15/0",
157          "description": "<![CDATA[\"To GW router\"]]>",
158          "enabled": true,
159          "ipv4": {
160            "enabled": true,
161            "forwarding": false,
162            "address": {
163              "ip": "203.0.113.5/30"
164            }
165          },
166          "ipv6": {
167            "enabled": true,
168            "forwarding": false
169          }
170        }
171      ]
172    },
173    "prefix-list-config": {
174      "prefix-lists": {
175        "list": [
176          {
177            "name": "REDISTRIBUTE_IPv4",
178            "description": "<![CDATA[\"IPv4 Routes to Import\"]]>",
179            "rules": {
180              "rule": [
181                {
182                  "sequence": 10,
183                  "action": "permit",
184                  "prefix": "192.0.2.0/24"
185                },
186                {
187                  "sequence": 20,
188                  "action": "permit",
189                  "prefix": "203.0.113.0/24"
190                }
191              ]
192            }
193          }
194        ]
195      }
196    },
197    "route-map-config": {
198      "route-maps": {
199        "map": [
200          {
201            "name": "REDISTRIBUTE_IPv4",
202            "rules": {
203              "rule": [
204                {
205                  "sequence": 10,
206                  "policy": "permit",
207                  "match": {
208                    "ip-address-prefix-list": "REDISTRIBUTE_IPv4"
209                  },
210                  "set": {
211                    "origin": "igp"
212                  }
213                }
214              ]
215            }
216          }
217        ]
218      }
219    },
220    "route-table-config": {
221      "static-routes": {
222        "route-table": [
223          {
224            "name": "ipv4-VRF:0",
225            "address-family": "ipv4",
226            "ipv4-routes": {
227              "route": [
228                {
229                  "destination-prefix": "192.0.2.0/24",
230                  "next-hop": {
231                    "hop": [
232                      {
233                        "hop-id": 1,
234                        "local": true
235                      }
236                    ]
237                  }
238                },
239                {
240                  "destination-prefix": "203.0.113.0/24",
241                  "next-hop": {
242                    "hop": [
243                      {
244                        "hop-id": 1,
245                        "local": true
246                      }
247                    ]
248                  }
249                }
250              ]
251            }
252          }
253        ]
254      }
255    }
256  }
257}

RR2

  1{
  2  "data": {
  3    "bgp-config": {
  4      "global-options": {
  5        "enable": true
  6      },
  7      "routers": {
  8        "router": [
  9          {
 10            "asn": 65505,
 11            "cluster-id": "100",
 12            "router-id": "203.0.113.22",
 13            "address-families": {
 14              "address-family": [
 15                {
 16                  "family": "ipv4",
 17                  "subfamily": "unicast",
 18                  "neighbors": {
 19                    "neighbor": [
 20                      {
 21                        "peer": "RR-CLIENT",
 22                        "activate": true,
 23                        "route-reflector-client": true
 24                      },
 25                      {
 26                        "peer": "iBGP",
 27                        "activate": true,
 28                        "next-hop-self": true
 29                      }
 30                    ]
 31                  },
 32                  "redistributions": {
 33                    "named-sources": {
 34                      "route-source": [
 35                        {
 36                          "source": "kernel",
 37                          "route-map": "REDISTRIBUTE_IPv4"
 38                        }
 39                      ]
 40                    }
 41                  }
 42                },
 43                {
 44                  "family": "ipv6",
 45                  "subfamily": "unicast",
 46                  "redistributions": null
 47                }
 48              ]
 49            },
 50            "neighbors": {
 51              "neighbor": [
 52                {
 53                  "peer": "203.0.113.10",
 54                  "capability-negotiate": true,
 55                  "peer-group-name": "RR-CLIENT",
 56                  "enable": true
 57                },
 58                {
 59                  "peer": "203.0.113.21",
 60                  "capability-negotiate": true,
 61                  "peer-group-name": "iBGP",
 62                  "enable": true
 63                },
 64                {
 65                  "peer": "RR-CLIENT",
 66                  "capability-negotiate": true,
 67                  "description": "<![CDATA[\"RR-Client Sessions\"]]>",
 68                  "remote-asn": 65505,
 69                  "enable": true,
 70                  "update-source": "GigabitEthernet0/15/0"
 71                },
 72                {
 73                  "peer": "iBGP",
 74                  "capability-negotiate": true,
 75                  "description": "<![CDATA[\"iBGP Sessions\"]]>",
 76                  "remote-asn": 65505,
 77                  "enable": true,
 78                  "update-source": "GigabitEthernet0/14/0"
 79                }
 80              ]
 81            }
 82          }
 83        ]
 84      }
 85    },
 86    "interfaces-config": {
 87      "interface": [
 88        {
 89          "name": "GigabitEthernet0/13/0",
 90          "description": "<![CDATA[\"To Backbone Network\"]]>",
 91          "enabled": true,
 92          "ipv4": {
 93            "enabled": true,
 94            "forwarding": false,
 95            "address": {
 96              "ip": "203.0.113.17/30"
 97            }
 98          },
 99          "ipv6": {
100            "enabled": true,
101            "forwarding": false
102          }
103        },
104        {
105          "name": "GigabitEthernet0/14/0",
106          "description": "<![CDATA[\"To RR1 Router\"]]>",
107          "enabled": true,
108          "ipv4": {
109            "enabled": true,
110            "forwarding": false,
111            "address": {
112              "ip": "203.0.113.22/30"
113            }
114          },
115          "ipv6": {
116            "enabled": true,
117            "forwarding": false
118          }
119        },
120        {
121          "name": "GigabitEthernet0/15/0",
122          "description": "<![CDATA[\"To GW router\"]]>",
123          "enabled": true,
124          "ipv4": {
125            "enabled": true,
126            "forwarding": false,
127            "address": {
128              "ip": "203.0.113.9/30"
129            }
130          },
131          "ipv6": {
132            "enabled": true,
133            "forwarding": false
134          }
135        }
136      ]
137    },
138    "prefix-list-config": {
139      "prefix-lists": {
140        "list": [
141          {
142            "name": "REDISTRIBUTE_IPv4",
143            "description": "<![CDATA[\"IPv4 Routes to Import\"]]>",
144            "rules": {
145              "rule": [
146                {
147                  "sequence": 10,
148                  "action": "permit",
149                  "prefix": "192.0.2.0/24"
150                },
151                {
152                  "sequence": 20,
153                  "action": "permit",
154                  "prefix": "203.0.113.0/24"
155                }
156              ]
157            }
158          }
159        ]
160      }
161    },
162    "route-map-config": {
163      "route-maps": {
164        "map": [
165          {
166            "name": "REDISTRIBUTE_IPv4",
167            "rules": {
168              "rule": [
169                {
170                  "sequence": 10,
171                  "policy": "permit",
172                  "match": {
173                    "ip-address-prefix-list": "REDISTRIBUTE_IPv4"
174                  },
175                  "set": {
176                    "origin": "igp"
177                  }
178                }
179              ]
180            }
181          }
182        ]
183      }
184    },
185    "route-table-config": {
186      "static-routes": {
187        "route-table": [
188          {
189            "name": "ipv4-VRF:0",
190            "address-family": "ipv4",
191            "ipv4-routes": {
192              "route": [
193                {
194                  "destination-prefix": "192.0.2.0/24",
195                  "next-hop": {
196                    "hop": [
197                      {
198                        "hop-id": 1,
199                        "local": true
200                      }
201                    ]
202                  }
203                },
204                {
205                  "destination-prefix": "203.0.113.0/24",
206                  "next-hop": {
207                    "hop": [
208                      {
209                        "hop-id": 1,
210                        "local": true
211                      }
212                    ]
213                  }
214                }
215              ]
216            }
217          }
218        ]
219      }
220    }
221  }
222}

GW

  1{
  2  "data": {
  3    "bgp-config": {
  4      "global-options": {
  5        "enable": true
  6      },
  7      "routers": {
  8        "router": [
  9          {
 10            "asn": 65505,
 11            "router-id": "203.0.113.6",
 12            "address-families": {
 13              "address-family": [
 14                {
 15                  "family": "ipv4",
 16                  "subfamily": "labeled-unicast"
 17                },
 18                {
 19                  "family": "ipv4",
 20                  "subfamily": "multicast"
 21                },
 22                {
 23                  "family": "ipv4",
 24                  "subfamily": "unicast",
 25                  "neighbors": {
 26                    "neighbor": [
 27                      {
 28                        "peer": "203.0.113.5",
 29                        "activate": true
 30                      },
 31                      {
 32                        "peer": "203.0.113.9",
 33                        "activate": true
 34                      }
 35                    ]
 36                  }
 37                },
 38                {
 39                  "family": "ipv4",
 40                  "subfamily": "vpn"
 41                },
 42                {
 43                  "family": "ipv6",
 44                  "subfamily": "labeled-unicast"
 45                },
 46                {
 47                  "family": "ipv6",
 48                  "subfamily": "multicast"
 49                },
 50                {
 51                  "family": "ipv6",
 52                  "subfamily": "unicast"
 53                },
 54                {
 55                  "family": "ipv6",
 56                  "subfamily": "vpn"
 57                },
 58                {
 59                  "family": "l2vpn",
 60                  "subfamily": "evpn"
 61                },
 62                {
 63                  "family": "vpnv4",
 64                  "subfamily": "unicast"
 65                },
 66                {
 67                  "family": "vpnv6",
 68                  "subfamily": "unicast"
 69                }
 70              ]
 71            },
 72            "neighbors": {
 73              "neighbor": [
 74                {
 75                  "peer": "203.0.113.5",
 76                  "capability-negotiate": true,
 77                  "description": "<![CDATA[\"RR1 Session\"]]>",
 78                  "remote-asn": 65505,
 79                  "enable": true,
 80                  "update-source": "GigabitEthernet0/13/0"
 81                },
 82                {
 83                  "peer": "203.0.113.9",
 84                  "capability-negotiate": true,
 85                  "description": "<![CDATA[\"RR2 Session\"]]>",
 86                  "remote-asn": 65505,
 87                  "enable": true,
 88                  "update-source": "GigabitEthernet0/14/0"
 89                }
 90              ]
 91            }
 92          }
 93        ]
 94      }
 95    },
 96    "interfaces-config": {
 97      "interface": [
 98        {
 99          "name": "GigabitEthernet0/13/0",
100          "description": "<![CDATA[\"To RR1 Router\"]]>",
101          "enabled": true,
102          "ipv4": {
103            "enabled": true,
104            "forwarding": false,
105            "address": {
106              "ip": "203.0.113.6/30"
107            }
108          },
109          "ipv6": {
110            "enabled": true,
111            "forwarding": false
112          }
113        },
114        {
115          "name": "GigabitEthernet0/14/0",
116          "description": "<![CDATA[\"To RR2 Router\"]]>",
117          "enabled": true,
118          "ipv4": {
119            "enabled": true,
120            "forwarding": false,
121            "address": {
122              "ip": "203.0.113.10/30"
123            }
124          },
125          "ipv6": {
126            "enabled": true,
127            "forwarding": false
128          }
129        },
130        {
131          "name": "GigabitEthernet0/15/0",
132          "description": "<![CDATA[\"To Customer Router\"]]>",
133          "enabled": true,
134          "ipv4": {
135            "enabled": true,
136            "forwarding": false,
137            "address": {
138              "ip": "203.0.113.25/30"
139            }
140          },
141          "ipv6": {
142            "enabled": true,
143            "forwarding": false
144          }
145        }
146      ]
147    }
148  }
149}