Skip to content
Snippets Groups Projects
2-6-netgen-topology.yml.template 16 KiB
Newer Older
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 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545
#
#                          +---------+
#                          |         |
#                          |   SRC   |
#                          | 9.9.9.1 |
#                          |         |
#                          +---------+
#                               |eth-rt1 (.1)
#                               |
#                               |10.0.10.0/24
#                               |
#                               |eth-src (.2)
#                          +---------+                      .
#                          |         |                      .
#                          |   RT1   |eth-rt1-pce (???)     .
#                          | 1.1.1.1 +----------------------------------+
#                          |  16010  |                      .       ??? |
#                          +---------+                      .           |
#                               |eth-sw1                    .           |
#                               |                           .           |
#                               |                           .           |
#                               |                           .           |
#          +---------+          |          +---------+      .           |
#          |         |          |          |         |      .           |
#          |   RT2   |eth-sw1   |   eth-sw1|   RT3   |      .           |
#          | 2.2.2.2 +----------+----------+ 3.3.3.3 |      .           |
#          |  16020  |     10.0.1.0/24     |  16030  |      .           |
#          +---------+                     +---------+      .eth-pce-rt1|(???)
#     eth-rt4-1|  |eth-rt4-2          eth-rt5-1|  |eth-rt5-2.      +----+----+
#              |  |                            |  |         .      |         |
#   10.0.2.0/24|  |10.0.3.0/24      10.0.4.0/24|  |10.0.5.0/24     |   PCE   |
#              |  |                            |  |         .      |   ????  |
#     eth-rt2-1|  |eth-rt2-2          eth-rt3-1|  |eth-rt3-2.      |         |
#          +---------+                     +---------+      .      +----+----+
#          |         |                     |         |      .eth-pce-rt6|(???)
#          |   RT4   |     10.0.6.0/24     |   RT5   |      .           |
#          | 4.4.4.4 +---------------------+ 5.5.5.5 |      .           |
#          |  16040  |eth-rt5       eth-rt4|  16050  |      .           |
#          +---------+                     +---------+      .           |
#        eth-rt6|                                |eth-rt6   .           |
#               |                                |          .           |
#    10.0.7.0/24|                                |10.0.8.0/24           |
#               |          +---------+           |          .           |
#               +----------|         |-----------+          .           |
#                   eth-rt4|   RT6   |eth-rt5               .           |
#                          | 6.6.6.6 |eth-rt6-pce (????)    .      ???? |
#                          |  16060  +----------------------------------+
#                          +---------+                      .
#                               |eth-dst (.1)               .
#                               |                           .
#                               |10.0.11.0/24
#                               |
#                               |eth-rt6 (.2)
#                          +---------+
#                          |         |
#                          |   DST   |
#                          | 9.9.9.2 |
#                          |         |
#                          +---------+
#

---

routers:

  src:
    links:
      lo:
        ipv4: 9.9.9.1/32
        ipv6: 2001:db8:1066::1/128
        mpls: yes
      eth-rt1:
        peer: [rt1, eth-src]
        ipv4: 10.0.10.1/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
    shell: |
      ip route add 9.9.9.2/32 encap mpls 1111 via inet 10.0.10.2 src 9.9.9.1

  rt1:
    links:
      lo:
        ipv4: 1.1.1.1/32
        mpls: yes
      eth-sw1:
        peer: [sw1, sw1-rt1]
        ipv4: 10.0.1.1/24
        mpls: yes
      eth-src:
        peer: [src, eth-rt1]
        ipv4: 10.0.10.2/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
      pathd:
        args: "-M pathd_pcep"
        config: |
          debug pathd pcep basic
          segment-routing
           traffic-eng
            mpls-te on
            policy color 1 endpoint 6.6.6.6
             name DEFAULT
             binding-sid 1111
             candidate-path preference 100 name RUNTIME dynamic
             !
            !
            pcep
             pce-config CONFIG
              source-address ip 1.1.1.1
             pce PCE
              address ip ${PCE_IP}
              config CONFIG
             pcc
              peer PCE
          !
      isisd:
        run: yes
        config: |
          interface lo
           ip router isis 1
           ipv6 router isis 1
           isis passive
          !
          interface eth-sw1
           ip router isis 1
           ipv6 router isis 1
           isis hello-multiplier 3
          !
          router isis 1
           net 49.0000.0000.0000.0001.00
           is-type level-1
           redistribute ipv4 static level-1
           redistribute ipv4 connected level-1
           topology ipv6-unicast
           segment-routing on
           segment-routing global-block 16000 23999
           segment-routing node-msd 8
           segment-routing prefix 1.1.1.1/32 index 10 explicit-null
           segment-routing prefix 2001:db8:1000::1/128 index 11 explicit-null
          !
    shell: |
      ip route add 9.9.9.1/32 dev eth-src
      ip link add eth-rt1-pce type veth peer name eth-pce-rt1
      ip addr add ${RT1_PCE_INT_IF_IP}/24 dev eth-rt1-pce
      ip link set eth-pce-rt1 netns ${PCE_NETNS}
      ip -n ${PCE_NETNS} addr add ${RT1_PCE_EXT_IF_IP}/24 dev eth-pce-rt1
      ip link set eth-rt1-pce up
      ip -n ${PCE_NETNS} link set eth-pce-rt1 up
      ip route add ${RT1_PCE_EXT_IF_IP}/24 via ${RT1_PCE_INT_IF_IP} dev eth-rt1-pce src 1.1.1.1
      ip -n ${PCE_NETNS} route add ${RT1_PCE_INT_IF_IP}/32 via ${RT1_PCE_EXT_IF_IP} dev eth-pce-rt1
      ip -n ${PCE_NETNS} route add 1.1.1.1/32 via ${RT1_PCE_EXT_IF_IP} dev eth-pce-rt1

  rt2:
    links:
      lo:
        ipv4: 2.2.2.2/32
        ipv6: 2001:db8:1000::2/128
        mpls: yes
      eth-sw1:
        peer: [sw1, sw1-rt2]
        ipv4: 10.0.1.2/24
        mpls: yes
      eth-rt4-1:
        peer: [rt4, eth-rt2-1]
        ipv4: 10.0.2.2/24
        mpls: yes
      eth-rt4-2:
        peer: [rt4, eth-rt2-2]
        ipv4: 10.0.3.2/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
      isisd:
        run: yes
        config: |
          interface lo
           ip router isis 1
           ipv6 router isis 1
           isis passive
          !
          interface eth-sw1
           ip router isis 1
           ipv6 router isis 1
           isis hello-multiplier 3
          !
          interface eth-rt4-1
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt4-2
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          router isis 1
           net 49.0000.0000.0000.0002.00
           is-type level-1
           topology ipv6-unicast
           segment-routing on
           segment-routing global-block 16000 23999
           segment-routing node-msd 8
           segment-routing prefix 2.2.2.2/32 index 20 no-php-flag
           segment-routing prefix 2001:db8:1000::2/128 index 21 no-php-flag
          !

  rt3:
    links:
      lo:
        ipv4: 3.3.3.3/32
        ipv6: 2001:db8:1000::3/128
        mpls: yes
      eth-sw1:
        peer: [sw1, sw1-rt3]
        ipv4: 10.0.1.3/24
        mpls: yes
      eth-rt5-1:
        peer: [rt5, eth-rt3-1]
        ipv4: 10.0.4.3/24
        mpls: yes
      eth-rt5-2:
        peer: [rt5, eth-rt3-2]
        ipv4: 10.0.5.3/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
      isisd:
        run: yes
        config: |
          interface lo
           ip router isis 1
           ipv6 router isis 1
           isis passive
          !
          interface eth-sw1
           ip router isis 1
           ipv6 router isis 1
           isis hello-multiplier 3
          !
          interface eth-rt5-1
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt5-2
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          router isis 1
           net 49.0000.0000.0000.0003.00
           is-type level-1
           topology ipv6-unicast
           segment-routing on
           segment-routing global-block 16000 23999
           segment-routing node-msd 8
           segment-routing prefix 3.3.3.3/32 index 30 no-php-flag
           segment-routing prefix 2001:db8:1000::3/128 index 31 no-php-flag
          !

  rt4:
    links:
      lo:
        ipv4: 4.4.4.4/32
        ipv6: 2001:db8:1000::4/128
        mpls: yes
      eth-rt2-1:
        peer: [rt2, eth-rt4-1]
        ipv4: 10.0.2.4/24
        mpls: yes
      eth-rt2-2:
        peer: [rt2, eth-rt4-2]
        ipv4: 10.0.3.4/24
        mpls: yes
      eth-rt5:
        peer: [rt5, eth-rt4]
        ipv4: 10.0.6.4/24
        mpls: yes
      eth-rt6:
        peer: [rt6, eth-rt4]
        ipv4: 10.0.7.4/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
      isisd:
        run: yes
        config: |
          interface lo
           ip router isis 1
           ipv6 router isis 1
           isis passive
          !
          interface eth-rt2-1
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt2-2
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt5
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt6
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          router isis 1
           net 49.0000.0000.0000.0004.00
           is-type level-1
           topology ipv6-unicast
           segment-routing on
           segment-routing global-block 16000 23999
           segment-routing node-msd 8
           segment-routing prefix 4.4.4.4/32 index 40 no-php-flag
           segment-routing prefix 2001:db8:1000::4/128 index 41 no-php-flag
          !

  rt5:
    links:
      lo:
        ipv4: 5.5.5.5/32
        ipv6: 2001:db8:1000::5/128
        mpls: yes
      eth-rt3-1:
        peer: [rt3, eth-rt5-1]
        ipv4: 10.0.4.5/24
        mpls: yes
      eth-rt3-2:
        peer: [rt3, eth-rt5-2]
        ipv4: 10.0.5.5/24
        mpls: yes
      eth-rt4:
        peer: [rt4, eth-rt5]
        ipv4: 10.0.6.5/24
        mpls: yes
      eth-rt6:
        peer: [rt6, eth-rt5]
        ipv4: 10.0.8.5/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
      isisd:
        run: yes
        config: |
          interface lo
           ip router isis 1
           ipv6 router isis 1
           isis passive
          !
          interface eth-rt3-1
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt3-2
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt4
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt6
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          router isis 1
           net 49.0000.0000.0000.0005.00
           is-type level-1
           topology ipv6-unicast
           segment-routing on
           segment-routing global-block 16000 23999
           segment-routing node-msd 8
           segment-routing prefix 5.5.5.5/32 index 50 no-php-flag
           segment-routing prefix 2001:db8:1000::5/128 index 51 no-php-flag
          !

  rt6:
    links:
      lo:
        ipv4: 6.6.6.6/32
        ipv6: 2001:db8:1000::6/128
        mpls: yes
      eth-rt4:
        peer: [rt4, eth-rt6]
        ipv4: 10.0.7.6/24
        mpls: yes
      eth-rt5:
        peer: [rt5, eth-rt6]
        ipv4: 10.0.8.6/24
        mpls: yes
      eth-dst:
        peer: [dst, eth-rt6]
        ipv4: 10.0.11.1/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
      pathd:
        args: "-M pathd_pcep"
        config: |
          debug pathd pcep
          segment-routing
           traffic-eng
            policy color 1 endpoint 1.1.1.1
             name DEFAULT
             binding-sid 6666
             candidate-path preference 200 name RUNTIME dynamic
             !
            !
            pcep
             pce-config CONFIG
              source-address ip 6.6.6.6
             pce PCE
              address ip ${PCE_IP}
              config CONFIG
             pcc
              peer PCE
          !
      isisd:
        run: yes
        config: |
          interface lo
           ip router isis 1
           ipv6 router isis 1
           isis passive
          !
          interface eth-rt4
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          interface eth-rt5
           ip router isis 1
           ipv6 router isis 1
           isis network point-to-point
           isis hello-multiplier 3
          !
          router isis 1
           net 49.0000.0000.0000.0006.00
           is-type level-1
           redistribute ipv4 static level-1
           redistribute ipv4 connected level-1
           topology ipv6-unicast
           segment-routing on
           segment-routing global-block 16000 23999
           segment-routing node-msd 8
           segment-routing prefix 6.6.6.6/32 index 60 explicit-null
           segment-routing prefix 2001:db8:1000::6/128 index 61 explicit-null
          !
    shell: |
      ip route add 9.9.9.2/32 dev eth-dst
      ip link add eth-rt6-pce type veth peer name eth-pce-rt6
      ip addr add ${RT6_PCE_INT_IF_IP}/24 dev eth-rt6-pce
      ip link set eth-pce-rt6 netns ${PCE_NETNS}
      ip -n ${PCE_NETNS} addr add ${RT6_PCE_EXT_IF_IP}/24 dev eth-pce-rt6
      ip link set eth-rt6-pce up
      ip -n ${PCE_NETNS} link set eth-pce-rt6 up
      ip route add ${RT6_PCE_EXT_IF_IP}/24 via ${RT6_PCE_INT_IF_IP} dev eth-rt6-pce src 6.6.6.6
      ip -n ${PCE_NETNS} route add ${RT6_PCE_INT_IF_IP}/32 via ${RT6_PCE_EXT_IF_IP} dev eth-pce-rt6
      ip -n ${PCE_NETNS} route add 6.6.6.6/32 via ${RT6_PCE_EXT_IF_IP} dev eth-pce-rt6

  dst:
    links:
      lo:
        ipv4: 9.9.9.2/32
        ipv6: 2001:db8:1066::2/128
        mpls: yes
      eth-rt6:
        peer: [rt6, eth-dst]
        ipv4: 10.0.11.2/24
        mpls: yes
    frr:
      zebra:
        run: yes
        config:
    shell: |
      ip route add 9.9.9.1/32 encap mpls 6666 via inet 10.0.11.1

switches:
  sw1:
    links:
      sw1-rt1:
        peer: [rt1, rt1-sw1]
      sw1-rt2:
        peer: [rt2, rt2-sw1]
      sw1-rt3:
        peer: [rt3, rt3-sw1]

frr:
  #perf: yes
  #valgrind: yes
  base-configs:
    all: |
      hostname %(node)
      password 1
      log file %(logdir)/%(node)-%(daemon).log
      log commands
    zebra: |
      debug zebra kernel
      debug zebra packet
      debug zebra mpls
    isisd: |
      debug isis events
      debug isis route-events
      debug isis spf-events
      debug isis sr-events
      debug isis lsp-gen