Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 481 Bytes

exercise1.md

File metadata and controls

13 lines (11 loc) · 481 Bytes

Jinja2 Exercise 1

  1. Create a Python program that uses Jinja2 to generate the below BGP configuration. Your template should be directly embedded inside of your program as a string and should use for the following variables: local_as, peer1_ip, peer1_as, peer2_ip, peer2_as.
router bgp 10
  neighbor 10.1.20.2 remote-as 20
    update-source loopback99
    ebgp-multihop 2
    address-family ipv4 unicast
  neighbor 10.1.30.2 remote-as 30
    address-family ipv4 unicast