Tip
This is the documentation for the 20.02 version. Looking for the documentation of the latest version? Have a look here.
Edge Router Speaking eBGP with Static Redistribution for IPv4 And IPv6¶
Use Case¶
Especially in cases where an enterprise is multi-homed with it’s own block of network addresses, it may become necessary to configure dynamic routing between network service providers. This is accomplished by use of external BGP (eBGP).
In this use case, the enterprise will use TNSR to speak eBGP with two network service providers, in order to exchange routes which may be redistributed from static/connected routing.
Example Scenario¶
In this example, the enterprise using TNSR will have a fictitious autonomous system number (ASN) of 65505. The network service providers in this example will have ASNs of 65510 and 65520. The enterprise using TNSR will redistribute a single /24 network from static into BGP. That network will then be advertised to each of the service providers. The service providers will announce a full routing table to the TNSR instance.
Scenario Topology¶

TNSR BGP Router (IPv4)¶

TNSR BGP Router (IPv6)¶
Item |
Value |
---|---|
TNSR Autonomous System Number |
65505 |
ISP_A Autonomous System Number |
65510 |
ISP_B Autonomous System Number |
65520 |
IPv4 Network to be announced |
192.0.2.0/24 |
IPv6 Network to be announced |
2001:db8:a100:1005::/64 |
TNSR to ISP_A IPv4 Network Address |
203.0.113.8/30 |
TNSR to ISP_A IPv6 Global Address |
2001:db8:fa00:ffaa::/64 |
TNSR to ISP_B IPv4 Network Address |
100.64.0.48/30 |
TNSR to ISP_B IPv6 Global Address |
2001:db8:fb00:ffbb::/64 |
TNSR Configuration Steps¶
Step 1: Configure Interfaces¶
tnsr# conf
tnsr(config)# interface GigabitEthernet0/13/0
tnsr(config-interface)# description "To ISP A"
tnsr(config-interface)# ip address 203.0.113.9/30
tnsr(config-interface)# ipv6 address 2001:db8:1000:aaaa::2/64
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)#
tnsr(config)# interface GigabitEthernet0/14/0
tnsr(config-interface)# description "To ISP B"
tnsr(config-interface)# ip address 100.64.0.49/30
tnsr(config-interface)# ipv6 address 2001:db8:9999:ffff::2/64
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)#
Step 2: Enable BGP¶
tnsr(config)# route dynamic bgp
tnsr(config-frr-bgp)# enable
tnsr(config-frr-bgp)# exit
tnsr(config)#
Step 3: Create prefix-lists for route export via BGP¶
tnsr(config)# route dynamic prefix-list EXPORT_IPv4
tnsr(config-prefix-list)# description "IPv4 Routes to Export"
tnsr(config-prefix-list)# seq 10 permit 192.0.2.0/24
tnsr(config-prefix-list)# exit
tnsr(config)#
tnsr(config)# route dynamic prefix-list EXPORT_IPv6
tnsr(config-prefix-list)# description "IPv6 Routes to Export"
tnsr(config-prefix-list)# seq 10 permit 2001:db8:a100:1005::/64
tnsr(config-prefix-list)# exit
tnsr(config)#
Step 4: Create static route for networks to be advertised in BGP¶
tnsr(config)# route ipv4 table ipv4-VRF:0
tnsr(config-route-table-v4)# route 192.0.2.0/24
tnsr(config-rttbl4-next-hop)# next-hop 1 via local
tnsr(config-rttbl4-next-hop)# exit
tnsr(config-route-table-v4)# exit
tnsr(config)# route ipv6 table ipv6-VRF:0
tnsr(config-route-table-v6)# route 2001:db8:a100:1005::/64
tnsr(config-rttbl6-next-hop)# next-hop 1 via local
tnsr(config-rttbl6-next-hop)# exit
tnsr(config-route-table-v6)# exit
tnsr(config)#
Step 5: Configure BGP global options¶
tnsr(config)# route dynamic bgp
tnsr(config-frr-bgp)# server 65505
tnsr(config-bgp)# router-id 203.0.113.9
tnsr(config-bgp)# address-family ipv4 unicast
tnsr(config-bgp-ip4uni)# redistribute kernel
tnsr(config-bgp-ip4uni)# exit
tnsr(config-bgp)# address-family ipv6 unicast
tnsr(config-bgp-ip4uni)# redistribute kernel
tnsr(config-bgp-ip4uni)# exit
tnsr(config-bgp)#
Step 6: Configure BGP global neighbor options¶
tnsr(config-bgp)# neighbor 203.0.113.10
tnsr(config-bgp-neighbor)# remote-as 65510
tnsr(config-bgp-neighbor)# description "ISP_A IPv4"
tnsr(config-bgp-neighbor)# enable
tnsr(config-bgp-neighbor)# exit
tnsr(config-bgp)# neighbor 2001:db8:1000:aaaa::1
tnsr(config-bgp-neighbor)# remote-as 65510
tnsr(config-bgp-neighbor)# description "ISP_A IPv6"
tnsr(config-bgp-neighbor)# enable
tnsr(config-bgp-neighbor)# exit
tnsr(config-bgp)# neighbor 100.64.0.50
tnsr(config-bgp-neighbor)# remote-as 65520
tnsr(config-bgp-neighbor)# description "ISP_B IPv4"
tnsr(config-bgp-neighbor)# enable
tnsr(config-bgp-neighbor)# exit
tnsr(config-bgp)# neighbor 2001:db8:9999:ffff::1
tnsr(config-bgp-neighbor)# remote-as 65520
tnsr(config-bgp-neighbor)# description "ISP_B IPv6"
tnsr(config-bgp-neighbor)# enable
tnsr(config-bgp-neighbor)# exit
tnsr(config-bgp)#
Step 7: Configure BGP neighbor address-family IPv4 unicast options¶
tnsr(config-bgp)# address-family ipv4 unicast
tnsr(config-bgp-ip4uni)# neighbor 203.0.113.10
tnsr(config-bgp-ip4uni-nbr)# prefix-list EXPORT_IPv4 out
tnsr(config-bgp-ip4uni-nbr)# activate
tnsr(config-bgp-ip4uni-nbr)# exit
tnsr(config-bgp-ip4uni)# neighbor 100.64.0.50
tnsr(config-bgp-ip4uni-nbr)# prefix-list EXPORT_IPv4 out
tnsr(config-bgp-ip4uni-nbr)# activate
tnsr(config-bgp-ip4uni-nbr)# exit
tnsr(config-bgp-ip4uni)# exit
tnsr(config-bgp)#
Step 8: Configure BGP neighbor address-family IPv6 unicast options¶
tnsr(config-bgp)# address-family ipv6 unicast
tnsr(config-bgp-ip4uni)# neighbor 2001:db8:1000:aaaa::1
tnsr(config-bgp-ip4uni-nbr)# prefix-list EXPORT_IPv6 out
tnsr(config-bgp-ip4uni-nbr)# activate
tnsr(config-bgp-ip4uni-nbr)# exit
tnsr(config-bgp-ip4uni)# neighbor 2001:db8:9999:ffff::1
tnsr(config-bgp-ip4uni-nbr)# prefix-list EXPORT_IPv6 out
tnsr(config-bgp-ip4uni-nbr)# activate
tnsr(config-bgp-ip4uni-nbr)# exit
tnsr(config-bgp-ip4uni)# exit
tnsr(config-bgp)# exit
tnsr(config-frr-bgp)# exit
tnsr(config)#
JSON Configuration¶
tnsr-bgp-edge-router.json
¶1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | {
"data": {
"bgp-config": {
"global-options": {
"enable": true
},
"routers": {
"router": [
{
"asn": 65505,
"router-id": "203.0.113.9",
"address-families": {
"address-family": [
{
"family": "ipv4",
"subfamily": "labeled-unicast"
},
{
"family": "ipv4",
"subfamily": "multicast"
},
{
"family": "ipv4",
"subfamily": "unicast",
"neighbors": {
"neighbor": [
{
"peer": "100.64.0.50",
"activate": true,
"prefix-list-out": "EXPORT_IPv4"
},
{
"peer": "203.0.113.10",
"activate": true,
"prefix-list-out": "EXPORT_IPv4"
}
]
},
"redistributions": {
"named-sources": {
"route-source": [
{
"source": "kernel",
"present": true
}
]
}
}
},
{
"family": "ipv4",
"subfamily": "vpn"
},
{
"family": "ipv6",
"subfamily": "labeled-unicast"
},
{
"family": "ipv6",
"subfamily": "multicast"
},
{
"family": "ipv6",
"subfamily": "unicast",
"neighbors": {
"neighbor": [
{
"peer": "2001:db8:1000:aaaa::1",
"activate": true,
"prefix-list-out": "EXPORT_IPv6"
},
{
"peer": "2001:db8:9999:ffff::1",
"activate": true,
"prefix-list-out": "EXPORT_IPv6"
}
]
},
"redistributions": {
"named-sources": {
"route-source": [
{
"source": "kernel",
"present": true
}
]
}
}
},
{
"family": "ipv6",
"subfamily": "vpn"
},
{
"family": "l2vpn",
"subfamily": "evpn"
},
{
"family": "vpnv4",
"subfamily": "unicast"
},
{
"family": "vpnv6",
"subfamily": "unicast"
}
]
},
"neighbors": {
"neighbor": [
{
"peer": "100.64.0.50",
"capability-negotiate": true,
"description": "<![CDATA[\"ISP_B IPv4\"]]>",
"interface": "GigabitEthernet0/14/0",
"remote-asn": 65520,
"enable": true
},
{
"peer": "2001:db8:1000:aaaa::1",
"capability-negotiate": true,
"description": "<![CDATA[\"ISP_A IPv6\"]]>",
"interface": "GigabitEthernet0/13/0",
"remote-asn": 65510,
"enable": true
},
{
"peer": "2001:db8:9999:ffff::1",
"capability-negotiate": true,
"description": "<![CDATA[\"ISP_B IPv6\"]]>",
"interface": "GigabitEthernet0/14/0",
"remote-asn": 65520,
"enable": true
},
{
"peer": "203.0.113.10",
"capability-negotiate": true,
"description": "<![CDATA[\"ISP_A IPv4\"]]>",
"interface": "GigabitEthernet0/13/0",
"remote-asn": 65510,
"enable": true
}
]
}
}
]
}
},
"interfaces-config": {
"interface": [
{
"name": "GigabitEthernet0/13/0",
"description": "<![CDATA[\"To ISP A\"]]>",
"enabled": true,
"ipv4": {
"enabled": true,
"forwarding": false,
"address": {
"ip": "203.0.113.9/30"
}
},
"ipv6": {
"enabled": true,
"forwarding": false,
"address": {
"ip": "2001:db8:1000:aaaa::2/64"
}
}
},
{
"name": "GigabitEthernet0/14/0",
"description": "<![CDATA[\"To ISP B\"]]>",
"enabled": true,
"ipv4": {
"enabled": true,
"forwarding": false,
"address": {
"ip": "100.64.0.49/30"
}
},
"ipv6": {
"enabled": true,
"forwarding": false,
"address": {
"ip": "2001:db8:9999:ffff::2/64"
}
}
},
{
"name": "GigabitEthernet0/15/0",
"enabled": true,
"ipv4": {
"enabled": true,
"forwarding": false,
"address": {
"ip": "10.255.255.19/24"
}
}
}
]
},
"http-config": {
"restconf": {
"enable": true
},
"authentication": {
"auth-type": "none"
}
},
"prefix-list-config": {
"prefix-lists": {
"list": [
{
"name": "EXPORT_IPv4",
"description": "<![CDATA[\"IPv4 Routes to Export\"]]>",
"rules": {
"rule": [
{
"sequence": 10,
"action": "permit",
"prefix": "192.0.2.0/24"
}
]
}
},
{
"name": "EXPORT_IPv6",
"description": "<![CDATA[\"IPv6 Routes to Export\"]]>",
"rules": {
"rule": [
{
"sequence": 10,
"action": "permit",
"prefix": "2001:db8:a100:1005::/64"
}
]
}
}
]
}
},
"route-table-config": {
"static-routes": {
"route-table": [
{
"name": "ipv4-VRF:0",
"address-family": "ipv4",
"ipv4-routes": {
"route": [
{
"destination-prefix": "192.0.2.0/24",
"next-hop": {
"hop": [
{
"hop-id": 1,
"local": true
}
]
}
}
]
}
},
{
"name": "ipv6-VRF:0",
"address-family": "ipv6",
"ipv6-routes": {
"route": [
{
"destination-prefix": "2001:db8:a100:1005::/64",
"next-hop": {
"hop": [
{
"hop-id": 1,
"local": true
}
]
}
}
]
}
}
]
}
}
}
}
|