├── Section 4 ├── ansible.cfg ├── my_hosts ├── 1_my_playbook.yml ├── 2_gather_facts_by_os.yml ├── 2_gather_facts_by_role.yml ├── 3_gather_facts_group_var.yml ├── 5_Cisco_Backup_Config_Example.yml ├── hosts ├── 4_Cisco_Backup_Facts_Example.yml ├── 7_Cisco_ACL_Example.yml ├── 6_Cisco_Banner_Example.yml └── backup │ ├── lax-tor-r1-example1_config.2018-06-26@08_07_11 │ └── lax-agg-r1_config.2018-06-26@08_07_15 ├── Section 5 ├── ansible.cfg ├── 4_Ansible_Custom_Module_Example.yml ├── 1_Ansible_Vault_Example_1.yml ├── 2_Ansible_Vault_Example_2.yml ├── hosts ├── 3_Ansible_Template_Example.yml ├── Section_5_Additional_Resources.txt └── backup │ ├── lax-tor-r1_config.2018-06-26@14_28_39 │ └── lax-agg-r1_config.2018-06-26@14_23_59 ├── README.md ├── Section 2 ├── tor_inventory.py ├── command_write_mem.py ├── connectionTest.py ├── router_object.py ├── class_example.py ├── commandTest.py ├── tor_operations_2.py ├── commandTest_2.py ├── tor_operations.py ├── Section_2_Additional_Resources.txt └── router_object_v2.py ├── Section 3 ├── juniper_pyez_example.py ├── cisco_iosxr_napalm_example.py ├── arista_pyeapi_example.py ├── agg_operations.py ├── cisco_nxapi_example.py └── Section_3_Additional_Resources.txt ├── LICENSE └── Section 1 └── 2-dc-topology.virl /Section 4/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = ./hosts 3 | host_key_checking = False 4 | timeout = 5 5 | 6 | -------------------------------------------------------------------------------- /Section 5/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | inventory = ./hosts 3 | host_key_checking = False 4 | timeout = 5 5 | 6 | -------------------------------------------------------------------------------- /Section 4/my_hosts: -------------------------------------------------------------------------------- 1 | lax-tor-r1 ansible_host=172.16.1.10 ansible_user=cisco ansible_ssh_pass=cisco ansible_connection=network_cli ansible_network_os=ios 2 | -------------------------------------------------------------------------------- /Section 4/1_my_playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Gather Facts" 3 | hosts: lax-tor-r1 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: Gather facts for IOS Devices 8 | ios_facts: 9 | 10 | 11 | -------------------------------------------------------------------------------- /Section 5/4_Ansible_Custom_Module_Example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Your First Custom Module 3 | hosts: localhost 4 | gather_facts: false 5 | connection: local 6 | 7 | tasks: 8 | - name: Show Version 9 | action: my_module 10 | register: output 11 | 12 | - debug: 13 | var: output 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hands-on-Network-Programming-with-Python 2 | Hands-on Network Programming with Python, Published by Packt 3 | 4 | ## Access the Directory after Clone 5 | Due to the dash (-) character in the directory name, use "cd -- <-dir>" after cloning: 6 | 7 | ``` 8 | $ cd -- -Hands-on-Network-Programming-with-Python/ 9 | ``` 10 | -------------------------------------------------------------------------------- /Section 4/2_gather_facts_by_os.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Gather Facts" 3 | hosts: ios 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: Gather Facts from all IOS Devices 8 | ios_facts: 9 | 10 | register: output 11 | 12 | - name: Display facts variables 13 | debug: 14 | var: output 15 | 16 | -------------------------------------------------------------------------------- /Section 4/2_gather_facts_by_role.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Gather Facts" 3 | hosts: lax-dc-tor 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: Gather Facts from LAX-DC-TOR Devices 8 | ios_facts: 9 | 10 | register: output 11 | 12 | - name: Display facts variables 13 | debug: 14 | var: output 15 | 16 | -------------------------------------------------------------------------------- /Section 4/3_gather_facts_group_var.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Gather Facts" 3 | hosts: lax-dc-tor-example1 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: Gather Facts from IOS Devices 8 | ios_facts: 9 | 10 | register: output 11 | 12 | - name: Display facts variables 13 | debug: 14 | var: output 15 | 16 | -------------------------------------------------------------------------------- /Section 4/5_Cisco_Backup_Config_Example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Backup Running Configuration" 3 | hosts: all 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: 8 | ios_config: 9 | backup: yes 10 | when: ansible_network_os == 'ios' 11 | 12 | - name: 13 | nxos_config: 14 | backup: yes 15 | when: ansible_network_os == 'nxos' 16 | 17 | -------------------------------------------------------------------------------- /Section 5/1_Ansible_Vault_Example_1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Backup Running Configuration" 3 | hosts: all 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: 8 | ios_config: 9 | backup: yes 10 | when: ansible_network_os == 'ios' 11 | 12 | - name: 13 | nxos_config: 14 | backup: yes 15 | when: ansible_network_os == 'nxos' 16 | 17 | -------------------------------------------------------------------------------- /Section 5/2_Ansible_Vault_Example_2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Backup Running Configuration" 3 | hosts: lax-tor-r1 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: 8 | ios_config: 9 | backup: yes 10 | when: ansible_network_os == 'ios' 11 | 12 | - name: 13 | nxos_config: 14 | backup: yes 15 | when: ansible_network_os == 'nxos' 16 | 17 | -------------------------------------------------------------------------------- /Section 2/tor_inventory.py: -------------------------------------------------------------------------------- 1 | 2 | devices = [ 3 | {'nyc-tor-r1':{ 4 | 'device_type': 'cisco_ios', 5 | 'ip': '172.16.1.16', 6 | 'username': 'cisco', 7 | 'password': 'cisco', 8 | 'secret': 'cisco', 9 | }}, 10 | {'nyc-tor-r2':{ 11 | 'device_type': 'cisco_ios', 12 | 'ip': '172.16.1.17', 13 | 'username': 'cisco', 14 | 'password': 'cisco', 15 | 'secret': 'cisco', 16 | }} 17 | ] 18 | 19 | -------------------------------------------------------------------------------- /Section 5/hosts: -------------------------------------------------------------------------------- 1 | [lax-dc-tor] 2 | lax-tor-r1 3 | lax-tor-r2 4 | 5 | [lax-dc-agg] 6 | lax-agg-r1 7 | 8 | [lax-dc-cor] 9 | lax-cor-r1 10 | 11 | [nyc-dc-tor] 12 | nyc-tor-r[1:2] 13 | 14 | [nyc-dc-agg] 15 | nyc-agg-r1 16 | 17 | [nyc-dc-cor] 18 | nyc-cor-r1 19 | 20 | [ios:children] 21 | lax-dc-tor 22 | nyc-dc-tor 23 | 24 | [nxos:children] 25 | lax-dc-agg 26 | nyc-dc-agg 27 | 28 | [iosxr:children] 29 | lax-dc-cor 30 | nyc-dc-cor 31 | 32 | 33 | -------------------------------------------------------------------------------- /Section 3/juniper_pyez_example.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from jnpr.junos import Device 4 | from jnpr.junos.utils.config import Config 5 | 6 | dev = Device(host='172.16.0.1', user='netconf', password='test123') 7 | dev.open() 8 | print(dev.facts) 9 | 10 | with Config(dev, mode='private') as cu: 11 | cu.load('set system services netconf traceoptions file test.log', format='set') 12 | cu.pdiff() 13 | cu.commit() 14 | 15 | dev.close() 16 | 17 | -------------------------------------------------------------------------------- /Section 3/cisco_iosxr_napalm_example.py: -------------------------------------------------------------------------------- 1 | # 2 | # Example From: 3 | # https://xrdocs.io/application-hosting/tutorials/2016-08-15-netmiko-and-napalm-with-ios-xr-quick-look/ 4 | # 5 | 6 | from napalm import get_network_driver 7 | import pprint 8 | 9 | driver = get_network_driver('iosxr') 10 | 11 | device = driver('172.16.1.13', 'cisco', 'cisco') 12 | device.open() 13 | pprint.pprint(device.get_facts()) 14 | pprint.pprint(device.get_interfaces()) 15 | device.close() 16 | 17 | -------------------------------------------------------------------------------- /Section 5/3_Ansible_Template_Example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Template Example 3 | hosts: localhost 4 | gather_facts: false 5 | connection: local 6 | 7 | tasks: 8 | - name: Generate Config 9 | template: src=./config_templates/tor.j2 dest=./configs/{{ item.hostname }}.txt 10 | 11 | with_items: 12 | - { hostname: lax-tor-r1, loopback: '192.168.0.10 255.255.255.255' } 13 | - { hostname: lax-tor-r2, loopback: '192.168.0.11 255.255.255.255' } 14 | 15 | 16 | -------------------------------------------------------------------------------- /Section 2/command_write_mem.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function, unicode_literals 4 | from netmiko import ConnectHandler 5 | 6 | lax_tor_r1 = { 7 | 'device_type': 'cisco_ios', 8 | 'ip': '172.16.1.10', 9 | 'username': 'cisco', 10 | 'password': 'cisco', 11 | 'secret': 'cisco', 12 | 'verbose': False, 13 | } 14 | 15 | net_connect = ConnectHandler(**lax_tor_r1) 16 | output = net_connect.send_command_expect('write memory') 17 | print(output) 18 | 19 | 20 | -------------------------------------------------------------------------------- /Section 5/Section_5_Additional_Resources.txt: -------------------------------------------------------------------------------- 1 | - Ansible Vault 2 | https://docs.ansible.com/ansible/2.5/user_guide/vault.html 3 | 4 | - Ansible Template 5 | https://docs.ansible.com/ansible/latest/modules/template_module.html 6 | 7 | - Ansible Developing Modules 8 | https://docs.ansible.com/ansible/latest/dev_guide/developing_modules.html 9 | 10 | - Custom Module Example (From Mastering Python Networking) 11 | https://github.com/PacktPublishing/Mastering-Python-Networking/tree/master/Chapter05/Custom_Modules 12 | -------------------------------------------------------------------------------- /Section 2/connectionTest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function, unicode_literals 4 | from netmiko import ConnectHandler 5 | 6 | lax_tor_r1 = { 7 | 'device_type': 'cisco_ios', 8 | 'ip': '172.16.1.10', 9 | 'username': 'cisco', 10 | 'password': 'cisco', 11 | 'secret': 'cisco', 12 | 'verbose': False, 13 | } 14 | 15 | net_connect = ConnectHandler(**lax_tor_r1) 16 | output = net_connect.send_command('show ip int brief') 17 | print("this is the output: " + output) 18 | 19 | 20 | -------------------------------------------------------------------------------- /Section 4/hosts: -------------------------------------------------------------------------------- 1 | [lax-dc-tor] 2 | lax-tor-r1 3 | lax-tor-r2 4 | 5 | [lax-dc-agg] 6 | lax-agg-r1 7 | 8 | [lax-dc-cor] 9 | lax-cor-r1 10 | 11 | [nyc-dc-tor] 12 | nyc-tor-r[1:2] 13 | 14 | [nyc-dc-agg] 15 | nyc-agg-r1 16 | 17 | [nyc-dc-cor] 18 | nyc-cor-r1 19 | 20 | [ios:children] 21 | lax-dc-tor 22 | nyc-dc-tor 23 | 24 | [nxos:children] 25 | lax-dc-agg 26 | nyc-dc-agg 27 | 28 | [iosxr:children] 29 | lax-dc-cor 30 | nyc-dc-cor 31 | 32 | [lax-dc-tor-example1] 33 | lax-tor-r1-example1 34 | lax-tor-r2-example1 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Section 2/router_object.py: -------------------------------------------------------------------------------- 1 | class Router(object): 2 | def __init__(self, hostname, os): 3 | self.hostname = hostname 4 | self.os = os 5 | if self.os == "nxos": 6 | self.interfaces = 48 7 | else: 8 | self.interfaces = 2 9 | 10 | def print_hostname(self): 11 | print("router hostname is " + self.hostname) 12 | 13 | 14 | if __name__ == "__main__": 15 | r1 = Router("lax-tor-r1", "iosv") 16 | print("router interface count: " + str(r1.interfaces)) 17 | r1.print_hostname() 18 | 19 | 20 | -------------------------------------------------------------------------------- /Section 2/class_example.py: -------------------------------------------------------------------------------- 1 | class Car(object): 2 | def __init__(self, maker, color): 3 | self.maker = maker 4 | self.color = color 5 | 6 | def drive(self): 7 | print("I am driving a car made by " + self.maker) 8 | 9 | def park(self): 10 | print("I am parking a " + self.color + " car") 11 | 12 | 13 | if __name__ == "__main__": 14 | # instance 1 15 | toyota = Car("Toyota", "Red") 16 | toyota.drive() 17 | toyota.park() 18 | 19 | # instance 2 20 | ford = Car("Ford", "Blue") 21 | ford.drive() 22 | ford.park() 23 | 24 | -------------------------------------------------------------------------------- /Section 2/commandTest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function, unicode_literals 4 | from netmiko import ConnectHandler 5 | 6 | lax_tor_r1 = { 7 | 'device_type': 'cisco_ios', 8 | 'ip': '172.16.1.10', 9 | 'username': 'cisco', 10 | 'password': 'cisco', 11 | 'secret': 'cisco', 12 | 'verbose': True, 13 | } 14 | 15 | net_connect = ConnectHandler(**lax_tor_r1) 16 | net_connect.enable() 17 | config_commands = [ 18 | 'hostname lax-tor-r1-new', 19 | ] 20 | 21 | output = net_connect.send_config_set(config_commands) 22 | print(output) 23 | 24 | 25 | -------------------------------------------------------------------------------- /Section 4/4_Cisco_Backup_Facts_Example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Gather Facts and Backup" 3 | hosts: lax-dc-tor 4 | gather_facts: yes 5 | 6 | tasks: 7 | - name: Default Gather Facts 8 | debug: 9 | var: ansible_date_time 10 | 11 | # - debug: 12 | # var: ansible_distribution 13 | 14 | - name: Gather Facts from IOS Devices 15 | ios_facts: 16 | 17 | register: output 18 | 19 | - name: copy output to file 20 | copy: content="{{ output }}" dest=./backup_output/{{ inventory_hostname }}.{{ ansible_date_time.date }}.txt 21 | 22 | 23 | -------------------------------------------------------------------------------- /Section 2/tor_operations_2.py: -------------------------------------------------------------------------------- 1 | from __future__ import print_function 2 | from tor_inventory import devices 3 | from router_object_v2 import Router 4 | 5 | # grab the first device from inventory 6 | print("This is the first device in inventory: " + str(devices[0])) 7 | router = devices[0] 8 | for key, value in router.items(): 9 | d = Router(hostname=key, os='iosv', **value) 10 | output = d.check_cdp() 11 | if output == 'no cdp run': 12 | print("cdp is turned off") 13 | else: 14 | print("turning off cdp") 15 | output = d.turn_off_cdp() 16 | print(output) 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Section 3/arista_pyeapi_example.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Example from https://eos.arista.com/introducing-the-python-client-for-eapi-pyeapi/ 3 | # 4 | 5 | import pyeapi, pprint 6 | 7 | node = pyeapi.connect_to('veos01') 8 | 9 | print('show version output') 10 | pprint.pprint(node.enable('show version')) 11 | 12 | print('show multiple command output') 13 | pprint.pprint(node.enable(['show version', 'show ip route'])) 14 | 15 | print('configure with single line') 16 | node.config('hostname veos01') 17 | 18 | print('configure multiline configuration') 19 | node.config(['interface Management1', 'description management interface']) 20 | 21 | -------------------------------------------------------------------------------- /Section 4/7_Cisco_ACL_Example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: configure and show access list 3 | hosts: lax-dc-tor 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: configure ip access list 8 | ios_config: 9 | lines: 10 | - 10 permit ip host 10.10.10.10 any log 11 | - 20 permit ip host 20.20.20.20 any log 12 | parents: ip access-list extended MY_ACL 13 | before: no ip access-list extended MY_ACL 14 | match: exact 15 | 16 | - name: show ip access list 17 | ios_command: 18 | commands: 19 | - show ip access-list 20 | register: output 21 | 22 | - debug: 23 | var: output 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Section 2/commandTest_2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function, unicode_literals 4 | from netmiko import ConnectHandler 5 | 6 | """ 7 | lax_tor_r1 = { 8 | 'device_type': 'cisco_ios', 9 | 'ip': '172.16.1.10', 10 | 'username': 'cisco', 11 | 'password': 'cisco', 12 | 'secret': 'cisco', 13 | 'verbose': True, 14 | } 15 | """ 16 | 17 | net_connect = ConnectHandler(device_type='cisco_ios', ip='172.16.1.10', username='cisco', password='cisco', secret='cisco', verbose=False) 18 | net_connect.enable() 19 | config_commands = [ 20 | 'hostname lax-tor-r1', 21 | ] 22 | 23 | output = net_connect.send_config_set(config_commands) 24 | print(output) 25 | 26 | 27 | -------------------------------------------------------------------------------- /Section 4/6_Cisco_Banner_Example.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Configure Banner" 3 | hosts: all 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: banner for IOS devices 8 | ios_banner: 9 | banner: login 10 | text: | 11 | this is my login banner 12 | state: present 13 | when: ansible_network_os == 'ios' 14 | 15 | - name: banner for NX-OS devices 16 | nxos_banner: 17 | banner: exec 18 | state: absent 19 | when: ansible_network_os == 'nxos' 20 | 21 | - name: banner for IOS-XR devices 22 | iosxr_banner: 23 | banner: login 24 | text: | 25 | this is my login banner 26 | state: present 27 | when: ansible_network_os == 'iosxr' 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Section 2/tor_operations.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | from tor_inventory import devices 5 | from router_object_v2 import Router 6 | 7 | # List inventory file and values (optional) 8 | print("Loop thru all devices") 9 | for d in devices: 10 | for key, value in d.items(): 11 | print(key, d[key]) 12 | 13 | # grab the first device from inventory for further operation 14 | print("This is the first device in inventory: " + str(devices[0])) 15 | router = devices[0] 16 | for key, value in router.items(): 17 | print("Key is the hostname: " + key) 18 | print("Unpacking individual values: " + router[key]['device_type'] + " " + router[key]['ip']) 19 | d = Router(hostname=key, os='iosv', **value) 20 | output = d.show_interface() 21 | print(output) 22 | output = d.save_config() 23 | print(output) 24 | 25 | 26 | -------------------------------------------------------------------------------- /Section 2/Section_2_Additional_Resources.txt: -------------------------------------------------------------------------------- 1 | - Wikipedia Object-Oriented Programming 2 | https://en.wikipedia.org/wiki/Object-oriented_programming 3 | 4 | - Object-Oriented Programming in Python 3 5 | https://www.amazon.com/dp/1784398780/ref=sspa_dk_detail_0?psc=1 6 | 7 | - Netmiko documenation: 8 | http://netmiko.readthedocs.io/en/stable/index.html 9 | 10 | - Netmiko GitHub repository: 11 | https://github.com/ktbyers/netmiko 12 | 13 | - Netmiko Blog Post: 14 | https://pynet.twb-tech.com/blog/automation/netmiko.html 15 | 16 | - Netmiko Installation 17 | sudo apt-get install -y git python-pip 18 | git clone https://github.com/ktbyers/netmiko.git 19 | cd netmiko/ 20 | pip install -r requirements.txt 21 | python setup.py install 22 | 23 | - Pexpect and Parmiko Examples 24 | https://github.com/PacktPublishing/Mastering-Python-Networking/tree/master/Chapter02 25 | 26 | - Python **kwargs 27 | https://www.digitalocean.com/community/tutorials/how-to-use-args-and-kwargs-in-python-3 28 | -------------------------------------------------------------------------------- /Section 3/agg_operations.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from __future__ import print_function 4 | from router_object_v3 import Router 5 | import sqlite3, ast 6 | 7 | # Retrieve device information from SQL Database 8 | conn = sqlite3.connect('networks.db') 9 | c = conn.cursor() 10 | 11 | # Query for specific device 12 | t = ('lax-agg-r1',) 13 | c.execute('SELECT * FROM devices WHERE hostname=?', t) 14 | device = c.fetchone() 15 | conn.close() 16 | 17 | # unpacking returned information 18 | hostname = device[0] 19 | device_attributes = device[1] 20 | print("Device hostname: %s attribute: %s" % (hostname, device_attributes)) 21 | 22 | # instanciate router object with our model 23 | print('*' * 10) 24 | attr = ast.literal_eval(device_attributes) # string to dict 25 | d = Router(hostname=hostname, os='nxos', **attr) 26 | output = d.show_interface() 27 | print(output) 28 | d.configure_vlan(100) 29 | output = d.show_vlan() 30 | print(output) 31 | print('saving config...') 32 | output = d.save_config() 33 | 34 | 35 | -------------------------------------------------------------------------------- /Section 3/cisco_nxapi_example.py: -------------------------------------------------------------------------------- 1 | # 2 | # https://github.com/datacenter/nxos/blob/master/nxapi/samples/show_version.py 3 | # Print Chassis info, Hostname and software version of a given switch. 4 | # 5 | 6 | import json 7 | import requests 8 | 9 | ip="172.16.1.12" 10 | 11 | my_headers = {'content-type': 'application/json-rpc'} 12 | url = "http://"+ip+"/ins" 13 | username = "cisco" 14 | password = "cisco" 15 | 16 | 17 | payload=[{"jsonrpc": "2.0", 18 | "method": "cli", 19 | "params": {"cmd": "show version", 20 | "version": 1}, 21 | "id": 1} 22 | ] 23 | 24 | response = requests.post(url, data=json.dumps(payload), headers=my_headers, auth=(username, password)).json() 25 | 26 | #Now Process the response 27 | kick_start_image = response['result']['body']['kickstart_ver_str'] 28 | chassis_id = response['result']['body']['chassis_id'] 29 | hostname = response['result']['body']['host_name'] 30 | 31 | print "ip : {0} is a \"{1}\" with hostname: {2} running software version : {3}".format(ip , chassis_id, hostname, kick_start_image) 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Section 3/Section_3_Additional_Resources.txt: -------------------------------------------------------------------------------- 1 | - Application Programming interface 2 | https://en.wikipedia.org/wiki/Application_programming_interface 3 | 4 | - Databases overview 5 | https://en.wikipedia.org/wiki/Database 6 | 7 | - Sqlite Python documenation 8 | https://docs.python.org/2/library/sqlite3.html 9 | 10 | - NX-API 11 | https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus7000/sw/programmability/guide/b_Cisco_Nexus_7000_Series_NX-OS_Programmability_Guide/b_Cisco_Nexus_7000_Series_NX-OS_Programmability_Guide_chapter_0101.html 12 | https://github.com/datacenter/nxos/tree/master/nxapi/samples 13 | lax-agg-r1# confi t 14 | Enter configuration commands, one per line. End with CNTL/Z. 15 | lax-agg-r1(config)# feature nxapi 16 | lax-agg-r1(config)# nxapi sandbox 17 | lax-agg-r1# show nxapi 18 | 19 | - IOS-XR 20 | https://xrdocs.io/application-hosting/tutorials/2016-08-15-netmiko-and-napalm-with-ios-xr-quick-look/ 21 | 22 | RP/0/0/CPU0:lax-cor-r1(config)#xml agent tty iteration off 23 | 24 | - Juniper PyEZ 25 | https://www.juniper.net/documentation/en_US/junos-pyez/topics/task/installation/junos-pyez-server-installing.html#task-junos-pyez-install-dependencies 26 | 27 | - Arista eAPI 28 | https://eos.arista.com/introducing-the-python-client-for-eapi-pyeapi/ 29 | 30 | vEOS#confi t 31 | vEOS(config)#management api http-commands 32 | vEOS(config-mgmt-api-http-cmds)#no shutdown 33 | vEOS(config-mgmt-api-http-cmds)#protocol https 34 | vEOS(config-mgmt-api-http-cmds)#end 35 | vEOS#show management api http-commands 36 | 37 | - VyOS Links 38 | https://wiki.vyos.net/wiki/Basic_setup 39 | https://github.com/vyos/python-vyos-mgmt 40 | http://vymgmt.readthedocs.io/en/latest/ 41 | -------------------------------------------------------------------------------- /Section 2/router_object_v2.py: -------------------------------------------------------------------------------- 1 | from netmiko import ConnectHandler 2 | 3 | class Router(object): 4 | def __init__(self, hostname=None, os=None, device_type='cisco_ios', ip=None, username='cisco', password='cisco', secret='cisco'): 5 | self.hostname = hostname 6 | self.os = os 7 | self.interfaces = 2 8 | self.device_type = device_type 9 | self.ip = ip 10 | self.username = username 11 | self.password = password 12 | 13 | def show_interface(self): 14 | self.net_connect = ConnectHandler(device_type=self.device_type, ip=self.ip, username=self.username, password=self.password) 15 | output = self.net_connect.send_command('show ip int brief') 16 | return output 17 | 18 | def save_config(self): 19 | self.net_connect = ConnectHandler(device_type=self.device_type, ip=self.ip, username=self.username, password=self.password) 20 | output = self.net_connect.send_command_expect('write memory') 21 | return output 22 | 23 | def check_cdp(self): 24 | self.net_connect = ConnectHandler(device_type=self.device_type, ip=self.ip, username=self.username, password=self.password) 25 | output = self.net_connect.send_command('show run | i cdp') 26 | return output 27 | 28 | def turn_off_cdp(self): 29 | self.net_connect = ConnectHandler(device_type=self.device_type, ip=self.ip, username=self.username, password=self.password) 30 | self.net_connect.enable() 31 | config_commands = ['no cdp run'] 32 | output = self.net_connect.send_config_set(config_commands) 33 | return output 34 | 35 | if __name__ == "__main__": 36 | r1 = Router(hostname='lax-tor-r1', os='iosv', device_type='cisco_ios', ip='172.16.1.17', username='cisco', password='cisco') 37 | print("router interface count: " + str(r1.interfaces)) 38 | output = r1.show_interface() 39 | print(output) 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Section 4/backup/lax-tor-r1-example1_config.2018-06-26@08_07_11: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 3641 bytes 4 | ! 5 | ! Last configuration change at 01:12:02 UTC Tue Jun 26 2018 by cisco 6 | ! 7 | version 15.6 8 | service timestamps debug datetime msec 9 | service timestamps log datetime msec 10 | no service password-encryption 11 | ! 12 | hostname lax-tor-r1 13 | ! 14 | boot-start-marker 15 | boot-end-marker 16 | ! 17 | ! 18 | vrf definition Mgmt-intf 19 | ! 20 | address-family ipv4 21 | exit-address-family 22 | ! 23 | address-family ipv6 24 | exit-address-family 25 | ! 26 | enable password cisco 27 | ! 28 | no aaa new-model 29 | ! 30 | ! 31 | ! 32 | mmi polling-interval 60 33 | no mmi auto-configure 34 | no mmi pvc 35 | mmi snmp-timeout 180 36 | ! 37 | ! 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | no ip domain lookup 48 | ip domain name virl.info 49 | ip cef 50 | ipv6 unicast-routing 51 | ipv6 cef 52 | ! 53 | multilink bundle-name authenticated 54 | ! 55 | ! 56 | ! 57 | ! 58 | username cisco privilege 15 secret 5 $1$Rb7r$vAXRgIHXEn7sLTrsGqB6G. 59 | ! 60 | redundancy 61 | ! 62 | no cdp run 63 | ! 64 | ! 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | ! 74 | ! 75 | ! 76 | interface Loopback0 77 | description Loopback 78 | ip address 192.168.0.10 255.255.255.255 79 | ! 80 | interface GigabitEthernet0/0 81 | description OOB Management 82 | vrf forwarding Mgmt-intf 83 | ip address 172.16.1.10 255.255.255.0 84 | duplex full 85 | speed auto 86 | media-type rj45 87 | ! 88 | interface GigabitEthernet0/1 89 | description to lax-agg-r1 90 | ip address 10.1.0.1 255.255.255.252 91 | ip ospf cost 1 92 | duplex full 93 | speed auto 94 | media-type rj45 95 | ! 96 | router ospf 65002 97 | passive-interface Loopback0 98 | network 10.1.0.0 0.0.0.3 area 0 99 | network 192.168.0.10 0.0.0.0 area 0 100 | ! 101 | router bgp 65002 102 | bgp router-id 192.168.0.10 103 | bgp log-neighbor-changes 104 | neighbor 192.168.0.11 remote-as 65002 105 | neighbor 192.168.0.11 description iBGP peer lax-tor-r2 106 | neighbor 192.168.0.11 update-source Loopback0 107 | neighbor 192.168.0.12 remote-as 65002 108 | neighbor 192.168.0.12 description iBGP peer lax-agg-r1 109 | neighbor 192.168.0.12 update-source Loopback0 110 | ! 111 | address-family ipv4 112 | network 192.168.0.10 mask 255.255.255.255 113 | neighbor 192.168.0.11 activate 114 | neighbor 192.168.0.12 activate 115 | exit-address-family 116 | ! 117 | ip forward-protocol nd 118 | ! 119 | ! 120 | no ip http server 121 | no ip http secure-server 122 | ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr 123 | ip ssh server algorithm authentication password 124 | ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr 125 | ! 126 | ip access-list extended MY_ACL 127 | permit ip host 10.10.10.10 any log 128 | permit ip host 20.20.20.20 any log 129 | ! 130 | ipv6 ioam timestamp 131 | ! 132 | ! 133 | ! 134 | control-plane 135 | ! 136 | banner exec ^C 137 | ************************************************************************** 138 | * IOSv is strictly limited to use for evaluation, demonstration and IOS * 139 | * education. IOSv is provided as-is and is not supported by Cisco's * 140 | * Technical Advisory Center. Any use or disclosure, in whole or in part, * 141 | * of the IOSv Software or Documentation to any third party for any * 142 | * purposes is expressly prohibited except as otherwise authorized by * 143 | * Cisco in writing. * 144 | **************************************************************************^C 145 | banner incoming ^C 146 | ************************************************************************** 147 | * IOSv is strictly limited to use for evaluation, demonstration and IOS * 148 | * education. IOSv is provided as-is and is not supported by Cisco's * 149 | * Technical Advisory Center. Any use or disclosure, in whole or in part, * 150 | * of the IOSv Software or Documentation to any third party for any * 151 | * purposes is expressly prohibited except as otherwise authorized by * 152 | * Cisco in writing. * 153 | **************************************************************************^C 154 | banner login ^C 155 | this is my login banner 156 | ^C 157 | ! 158 | line con 0 159 | password cisco 160 | line aux 0 161 | line vty 0 4 162 | exec-timeout 720 0 163 | password cisco 164 | login local 165 | transport input telnet ssh 166 | ! 167 | no scheduler allocate 168 | ! 169 | end -------------------------------------------------------------------------------- /Section 5/backup/lax-tor-r1_config.2018-06-26@14_28_39: -------------------------------------------------------------------------------- 1 | Building configuration... 2 | 3 | Current configuration : 3662 bytes 4 | ! 5 | ! Last configuration change at 16:44:48 UTC Tue Jun 26 2018 by cisco 6 | ! 7 | version 15.6 8 | service timestamps debug datetime msec 9 | service timestamps log datetime msec 10 | no service password-encryption 11 | ! 12 | hostname lax-tor-r1 13 | ! 14 | boot-start-marker 15 | boot-end-marker 16 | ! 17 | ! 18 | vrf definition Mgmt-intf 19 | ! 20 | address-family ipv4 21 | exit-address-family 22 | ! 23 | address-family ipv6 24 | exit-address-family 25 | ! 26 | vrf list Mgmt-intf 27 | ! 28 | enable password cisco 29 | ! 30 | no aaa new-model 31 | ! 32 | ! 33 | ! 34 | mmi polling-interval 60 35 | no mmi auto-configure 36 | no mmi pvc 37 | mmi snmp-timeout 180 38 | ! 39 | ! 40 | ! 41 | ! 42 | ! 43 | ! 44 | ! 45 | ! 46 | ! 47 | ! 48 | ! 49 | no ip domain lookup 50 | ip domain name virl.info 51 | ip cef 52 | ipv6 unicast-routing 53 | ipv6 cef 54 | ! 55 | multilink bundle-name authenticated 56 | ! 57 | ! 58 | ! 59 | ! 60 | username cisco privilege 15 secret 5 $1$Rb7r$vAXRgIHXEn7sLTrsGqB6G. 61 | ! 62 | redundancy 63 | ! 64 | no cdp run 65 | ! 66 | ! 67 | ! 68 | ! 69 | ! 70 | ! 71 | ! 72 | ! 73 | ! 74 | ! 75 | ! 76 | ! 77 | ! 78 | interface Loopback0 79 | description Loopback 80 | ip address 192.168.0.10 255.255.255.255 81 | ! 82 | interface GigabitEthernet0/0 83 | description OOB Management 84 | vrf forwarding Mgmt-intf 85 | ip address 172.16.1.10 255.255.255.0 86 | duplex full 87 | speed auto 88 | media-type rj45 89 | ! 90 | interface GigabitEthernet0/1 91 | description to lax-agg-r1 92 | ip address 10.1.0.1 255.255.255.252 93 | ip ospf cost 1 94 | duplex full 95 | speed auto 96 | media-type rj45 97 | ! 98 | router ospf 65002 99 | passive-interface Loopback0 100 | network 10.1.0.0 0.0.0.3 area 0 101 | network 192.168.0.10 0.0.0.0 area 0 102 | ! 103 | router bgp 65002 104 | bgp router-id 192.168.0.10 105 | bgp log-neighbor-changes 106 | neighbor 192.168.0.11 remote-as 65002 107 | neighbor 192.168.0.11 description iBGP peer lax-tor-r2 108 | neighbor 192.168.0.11 update-source Loopback0 109 | neighbor 192.168.0.12 remote-as 65002 110 | neighbor 192.168.0.12 description iBGP peer lax-agg-r1 111 | neighbor 192.168.0.12 update-source Loopback0 112 | ! 113 | address-family ipv4 114 | network 192.168.0.10 mask 255.255.255.255 115 | neighbor 192.168.0.11 activate 116 | neighbor 192.168.0.12 activate 117 | exit-address-family 118 | ! 119 | ip forward-protocol nd 120 | ! 121 | ! 122 | no ip http server 123 | no ip http secure-server 124 | ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr 125 | ip ssh server algorithm authentication password 126 | ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr 127 | ! 128 | ip access-list extended MY_ACL 129 | permit ip host 10.10.10.10 any log 130 | permit ip host 20.20.20.20 any log 131 | ! 132 | ipv6 ioam timestamp 133 | ! 134 | ! 135 | ! 136 | control-plane 137 | ! 138 | banner exec ^C 139 | ************************************************************************** 140 | * IOSv is strictly limited to use for evaluation, demonstration and IOS * 141 | * education. IOSv is provided as-is and is not supported by Cisco's * 142 | * Technical Advisory Center. Any use or disclosure, in whole or in part, * 143 | * of the IOSv Software or Documentation to any third party for any * 144 | * purposes is expressly prohibited except as otherwise authorized by * 145 | * Cisco in writing. * 146 | **************************************************************************^C 147 | banner incoming ^C 148 | ************************************************************************** 149 | * IOSv is strictly limited to use for evaluation, demonstration and IOS * 150 | * education. IOSv is provided as-is and is not supported by Cisco's * 151 | * Technical Advisory Center. Any use or disclosure, in whole or in part, * 152 | * of the IOSv Software or Documentation to any third party for any * 153 | * purposes is expressly prohibited except as otherwise authorized by * 154 | * Cisco in writing. * 155 | **************************************************************************^C 156 | banner login ^C 157 | this is my login banner 158 | ^C 159 | ! 160 | line con 0 161 | password cisco 162 | line aux 0 163 | line vty 0 4 164 | exec-timeout 720 0 165 | password cisco 166 | login local 167 | transport input telnet ssh 168 | ! 169 | no scheduler allocate 170 | ! 171 | end -------------------------------------------------------------------------------- /Section 4/backup/lax-agg-r1_config.2018-06-26@08_07_15: -------------------------------------------------------------------------------- 1 | !Command: show running-config 2 | !Time: Tue Jun 26 15:14:22 2018 3 | 4 | version 7.3(0)D1(1) 5 | power redundancy-mode redundant 6 | license grace-period 7 | 8 | hostname lax-agg-r1 9 | vdc lax-agg-r1 id 1 10 | limit-resource module-type m1 m1xl m2xl f2e 11 | allocate interface Ethernet2/1-48 12 | allocate interface Ethernet3/1-48 13 | allocate interface Ethernet4/1-48 14 | limit-resource vlan minimum 16 maximum 4094 15 | limit-resource vrf minimum 2 maximum 4096 16 | limit-resource port-channel minimum 0 maximum 768 17 | limit-resource u4route-mem minimum 96 maximum 96 18 | limit-resource u6route-mem minimum 24 maximum 24 19 | limit-resource m4route-mem minimum 58 maximum 58 20 | limit-resource m6route-mem minimum 8 maximum 8 21 | 22 | feature telnet 23 | feature ospf 24 | feature bgp 25 | feature nxapi 26 | 27 | username admin password 5 $1$KuOSBsvW$Cy0TSD..gEBGBPjzpDgf51 role network-admin 28 | username adminbackup password 5 ! role network-operator 29 | username adminbackup passphrase lifetime 99999 warntime 14 gracetime 3 30 | username cisco password 5 $1$Nk7ZkwH0$fyiRmMMfIheqE3BqvcL0C1 role network-operator 31 | username cisco role network-admin 32 | username cisco passphrase lifetime 99999 warntime 14 gracetime 3 33 | username lab password 5 $1$buoy/oqy$.EXQz8rCn72ii8qtdldj00 role network-admin 34 | username lab passphrase lifetime 99999 warntime 14 gracetime 3 35 | no password strength-check 36 | ip domain-lookup 37 | vlan dot1Q tag native 38 | system default switchport 39 | system jumbomtu 0 40 | no logging event trunk-status enable 41 | copp profile strict 42 | snmp-server user lab network-admin auth md5 0x5ceb414591539ee35159fca86fdfa101 priv 0x5ceb414591539ee35159fca86fdfa101 localizedkey 43 | snmp-server user admin network-admin auth md5 0x328945d53e05e8e7207f8c20b142f0b7 priv 0x328945d53e05e8e7207f8c20b142f0b7 localizedkey 44 | snmp-server user cisco network-admin auth md5 0x55b3c64a53fb95518e75358ee75e82e9 priv 0x55b3c64a53fb95518e75358ee75e82e9 localizedkey 45 | snmp-server user cisco network-operator 46 | snmp-server user admin auth md5 0x328945d53e05e8e7207f8c20b142f0b7 priv 0x328945d53e05e8e7207f8c20b142f0b7 localizedkey engineID 128:0:0:9:3:0:0:0:0:0:0 47 | rmon event 1 log trap public description FATAL(1) owner PMON@FATAL 48 | rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL 49 | rmon event 3 log trap public description ERROR(3) owner PMON@ERROR 50 | rmon event 4 log trap public description WARNING(4) owner PMON@WARNING 51 | rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO 52 | snmp-server enable traps link 53 | 54 | ip route 10.1.0.0/30 Null0 254 55 | ip route 10.1.128.0/30 Null0 254 56 | vlan 1,100 57 | 58 | vrf context management 59 | hardware forwarding unicast trace 60 | 61 | 62 | interface mgmt0 63 | description OOB Management 64 | duplex full 65 | vrf member management 66 | ip address 172.16.1.12/24 67 | 68 | interface Ethernet2/1 69 | description to lax-cor-r1 70 | no switchport 71 | mac-address fa16.3e00.0001 72 | ip address 10.1.0.6/30 73 | no shutdown 74 | 75 | interface Ethernet2/2 76 | description to lax-tor-r1 77 | no switchport 78 | mac-address fa16.3e00.0002 79 | ip address 10.1.0.2/30 80 | ip router ospf 65002 area 0.0.0.0 81 | no shutdown 82 | 83 | interface Ethernet2/3 84 | description to lax-tor-r2 85 | no switchport 86 | mac-address fa16.3e00.0003 87 | ip address 10.1.128.1/30 88 | ip router ospf 65002 area 0.0.0.0 89 | no shutdown 90 | 91 | interface Ethernet2/4 92 | shutdown 93 | no switchport 94 | mac-address 0000.0000.002f 95 | 96 | interface Ethernet2/5 97 | shutdown 98 | no switchport 99 | mac-address 0000.0000.002f 100 | 101 | interface Ethernet2/6 102 | shutdown 103 | no switchport 104 | mac-address 0000.0000.002f 105 | 106 | interface Ethernet2/7 107 | shutdown 108 | no switchport 109 | mac-address 0000.0000.002f 110 | 111 | interface Ethernet2/8 112 | shutdown 113 | no switchport 114 | mac-address 0000.0000.002f 115 | 116 | interface Ethernet2/9 117 | shutdown 118 | no switchport 119 | mac-address 0000.0000.002f 120 | 121 | interface Ethernet2/10 122 | shutdown 123 | no switchport 124 | mac-address 0000.0000.002f 125 | 126 | interface Ethernet2/11 127 | shutdown 128 | no switchport 129 | mac-address 0000.0000.002f 130 | 131 | interface Ethernet2/12 132 | shutdown 133 | no switchport 134 | mac-address 0000.0000.002f 135 | 136 | interface Ethernet2/13 137 | shutdown 138 | no switchport 139 | mac-address 0000.0000.002f 140 | 141 | interface Ethernet2/14 142 | shutdown 143 | no switchport 144 | mac-address 0000.0000.002f 145 | 146 | interface Ethernet2/15 147 | shutdown 148 | no switchport 149 | mac-address 0000.0000.002f 150 | 151 | interface Ethernet2/16 152 | shutdown 153 | no switchport 154 | mac-address 0000.0000.002f 155 | 156 | interface Ethernet2/17 157 | shutdown 158 | no switchport 159 | mac-address 0000.0000.002f 160 | 161 | interface Ethernet2/18 162 | shutdown 163 | no switchport 164 | mac-address 0000.0000.002f 165 | 166 | interface Ethernet2/19 167 | shutdown 168 | no switchport 169 | mac-address 0000.0000.002f 170 | 171 | interface Ethernet2/20 172 | shutdown 173 | no switchport 174 | mac-address 0000.0000.002f 175 | 176 | interface Ethernet2/21 177 | shutdown 178 | no switchport 179 | mac-address 0000.0000.002f 180 | 181 | interface Ethernet2/22 182 | shutdown 183 | no switchport 184 | mac-address 0000.0000.002f 185 | 186 | interface Ethernet2/23 187 | shutdown 188 | no switchport 189 | mac-address 0000.0000.002f 190 | 191 | interface Ethernet2/24 192 | shutdown 193 | no switchport 194 | mac-address 0000.0000.002f 195 | 196 | interface Ethernet2/25 197 | shutdown 198 | no switchport 199 | mac-address 0000.0000.002f 200 | 201 | interface Ethernet2/26 202 | shutdown 203 | no switchport 204 | mac-address 0000.0000.002f 205 | 206 | interface Ethernet2/27 207 | shutdown 208 | no switchport 209 | mac-address 0000.0000.002f 210 | 211 | interface Ethernet2/28 212 | shutdown 213 | no switchport 214 | mac-address 0000.0000.002f 215 | 216 | interface Ethernet2/29 217 | shutdown 218 | no switchport 219 | mac-address 0000.0000.002f 220 | 221 | interface Ethernet2/30 222 | shutdown 223 | no switchport 224 | mac-address 0000.0000.002f 225 | 226 | interface Ethernet2/31 227 | shutdown 228 | no switchport 229 | mac-address 0000.0000.002f 230 | 231 | interface Ethernet2/32 232 | shutdown 233 | no switchport 234 | mac-address 0000.0000.002f 235 | 236 | interface Ethernet2/33 237 | shutdown 238 | no switchport 239 | mac-address 0000.0000.002f 240 | 241 | interface Ethernet2/34 242 | shutdown 243 | no switchport 244 | mac-address 0000.0000.002f 245 | 246 | interface Ethernet2/35 247 | shutdown 248 | no switchport 249 | mac-address 0000.0000.002f 250 | 251 | interface Ethernet2/36 252 | shutdown 253 | no switchport 254 | mac-address 0000.0000.002f 255 | 256 | interface Ethernet2/37 257 | shutdown 258 | no switchport 259 | mac-address 0000.0000.002f 260 | 261 | interface Ethernet2/38 262 | shutdown 263 | no switchport 264 | mac-address 0000.0000.002f 265 | 266 | interface Ethernet2/39 267 | shutdown 268 | no switchport 269 | mac-address 0000.0000.002f 270 | 271 | interface Ethernet2/40 272 | shutdown 273 | no switchport 274 | mac-address 0000.0000.002f 275 | 276 | interface Ethernet2/41 277 | shutdown 278 | no switchport 279 | mac-address 0000.0000.002f 280 | 281 | interface Ethernet2/42 282 | shutdown 283 | no switchport 284 | mac-address 0000.0000.002f 285 | 286 | interface Ethernet2/43 287 | shutdown 288 | no switchport 289 | mac-address 0000.0000.002f 290 | 291 | interface Ethernet2/44 292 | shutdown 293 | no switchport 294 | mac-address 0000.0000.002f 295 | 296 | interface Ethernet2/45 297 | shutdown 298 | no switchport 299 | mac-address 0000.0000.002f 300 | 301 | interface Ethernet2/46 302 | shutdown 303 | no switchport 304 | mac-address 0000.0000.002f 305 | 306 | interface Ethernet2/47 307 | shutdown 308 | no switchport 309 | mac-address 0000.0000.002f 310 | 311 | interface Ethernet2/48 312 | shutdown 313 | no switchport 314 | mac-address 0000.0000.002f 315 | 316 | interface Ethernet3/1 317 | shutdown 318 | no switchport 319 | mac-address 0000.0000.002f 320 | 321 | interface Ethernet3/2 322 | shutdown 323 | no switchport 324 | mac-address 0000.0000.002f 325 | 326 | interface Ethernet3/3 327 | shutdown 328 | no switchport 329 | mac-address 0000.0000.002f 330 | 331 | interface Ethernet3/4 332 | shutdown 333 | no switchport 334 | mac-address 0000.0000.002f 335 | 336 | interface Ethernet3/5 337 | shutdown 338 | no switchport 339 | mac-address 0000.0000.002f 340 | 341 | interface Ethernet3/6 342 | shutdown 343 | no switchport 344 | mac-address 0000.0000.002f 345 | 346 | interface Ethernet3/7 347 | shutdown 348 | no switchport 349 | mac-address 0000.0000.002f 350 | 351 | interface Ethernet3/8 352 | shutdown 353 | no switchport 354 | mac-address 0000.0000.002f 355 | 356 | interface Ethernet3/9 357 | shutdown 358 | no switchport 359 | mac-address 0000.0000.002f 360 | 361 | interface Ethernet3/10 362 | shutdown 363 | no switchport 364 | mac-address 0000.0000.002f 365 | 366 | interface Ethernet3/11 367 | shutdown 368 | no switchport 369 | mac-address 0000.0000.002f 370 | 371 | interface Ethernet3/12 372 | shutdown 373 | no switchport 374 | mac-address 0000.0000.002f 375 | 376 | interface Ethernet3/13 377 | shutdown 378 | no switchport 379 | mac-address 0000.0000.002f 380 | 381 | interface Ethernet3/14 382 | shutdown 383 | no switchport 384 | mac-address 0000.0000.002f 385 | 386 | interface Ethernet3/15 387 | shutdown 388 | no switchport 389 | mac-address 0000.0000.002f 390 | 391 | interface Ethernet3/16 392 | shutdown 393 | no switchport 394 | mac-address 0000.0000.002f 395 | 396 | interface Ethernet3/17 397 | shutdown 398 | no switchport 399 | mac-address 0000.0000.002f 400 | 401 | interface Ethernet3/18 402 | shutdown 403 | no switchport 404 | mac-address 0000.0000.002f 405 | 406 | interface Ethernet3/19 407 | shutdown 408 | no switchport 409 | mac-address 0000.0000.002f 410 | 411 | interface Ethernet3/20 412 | shutdown 413 | no switchport 414 | mac-address 0000.0000.002f 415 | 416 | interface Ethernet3/21 417 | shutdown 418 | no switchport 419 | mac-address 0000.0000.002f 420 | 421 | interface Ethernet3/22 422 | shutdown 423 | no switchport 424 | mac-address 0000.0000.002f 425 | 426 | interface Ethernet3/23 427 | shutdown 428 | no switchport 429 | mac-address 0000.0000.002f 430 | 431 | interface Ethernet3/24 432 | shutdown 433 | no switchport 434 | mac-address 0000.0000.002f 435 | 436 | interface Ethernet3/25 437 | shutdown 438 | no switchport 439 | mac-address 0000.0000.002f 440 | 441 | interface Ethernet3/26 442 | shutdown 443 | no switchport 444 | mac-address 0000.0000.002f 445 | 446 | interface Ethernet3/27 447 | shutdown 448 | no switchport 449 | mac-address 0000.0000.002f 450 | 451 | interface Ethernet3/28 452 | shutdown 453 | no switchport 454 | mac-address 0000.0000.002f 455 | 456 | interface Ethernet3/29 457 | shutdown 458 | no switchport 459 | mac-address 0000.0000.002f 460 | 461 | interface Ethernet3/30 462 | shutdown 463 | no switchport 464 | mac-address 0000.0000.002f 465 | 466 | interface Ethernet3/31 467 | shutdown 468 | no switchport 469 | mac-address 0000.0000.002f 470 | 471 | interface Ethernet3/32 472 | shutdown 473 | no switchport 474 | mac-address 0000.0000.002f 475 | 476 | interface Ethernet3/33 477 | shutdown 478 | no switchport 479 | mac-address 0000.0000.002f 480 | 481 | interface Ethernet3/34 482 | shutdown 483 | no switchport 484 | mac-address 0000.0000.002f 485 | 486 | interface Ethernet3/35 487 | shutdown 488 | no switchport 489 | mac-address 0000.0000.002f 490 | 491 | interface Ethernet3/36 492 | shutdown 493 | no switchport 494 | mac-address 0000.0000.002f 495 | 496 | interface Ethernet3/37 497 | shutdown 498 | no switchport 499 | mac-address 0000.0000.002f 500 | 501 | interface Ethernet3/38 502 | shutdown 503 | no switchport 504 | mac-address 0000.0000.002f 505 | 506 | interface Ethernet3/39 507 | shutdown 508 | no switchport 509 | mac-address 0000.0000.002f 510 | 511 | interface Ethernet3/40 512 | shutdown 513 | no switchport 514 | mac-address 0000.0000.002f 515 | 516 | interface Ethernet3/41 517 | shutdown 518 | no switchport 519 | mac-address 0000.0000.002f 520 | 521 | interface Ethernet3/42 522 | shutdown 523 | no switchport 524 | mac-address 0000.0000.002f 525 | 526 | interface Ethernet3/43 527 | shutdown 528 | no switchport 529 | mac-address 0000.0000.002f 530 | 531 | interface Ethernet3/44 532 | shutdown 533 | no switchport 534 | mac-address 0000.0000.002f 535 | 536 | interface Ethernet3/45 537 | shutdown 538 | no switchport 539 | mac-address 0000.0000.002f 540 | 541 | interface Ethernet3/46 542 | shutdown 543 | no switchport 544 | mac-address 0000.0000.002f 545 | 546 | interface Ethernet3/47 547 | shutdown 548 | no switchport 549 | mac-address 0000.0000.002f 550 | 551 | interface Ethernet3/48 552 | shutdown 553 | no switchport 554 | mac-address 0000.0000.002f 555 | 556 | interface Ethernet4/1 557 | shutdown 558 | no switchport 559 | mac-address 0000.0000.002f 560 | 561 | interface Ethernet4/2 562 | shutdown 563 | no switchport 564 | mac-address 0000.0000.002f 565 | 566 | interface Ethernet4/3 567 | shutdown 568 | no switchport 569 | mac-address 0000.0000.002f 570 | 571 | interface Ethernet4/4 572 | shutdown 573 | no switchport 574 | mac-address 0000.0000.002f 575 | 576 | interface Ethernet4/5 577 | shutdown 578 | no switchport 579 | mac-address 0000.0000.002f 580 | 581 | interface Ethernet4/6 582 | shutdown 583 | no switchport 584 | mac-address 0000.0000.002f 585 | 586 | interface Ethernet4/7 587 | shutdown 588 | no switchport 589 | mac-address 0000.0000.002f 590 | 591 | interface Ethernet4/8 592 | shutdown 593 | no switchport 594 | mac-address 0000.0000.002f 595 | 596 | interface Ethernet4/9 597 | shutdown 598 | no switchport 599 | mac-address 0000.0000.002f 600 | 601 | interface Ethernet4/10 602 | shutdown 603 | no switchport 604 | mac-address 0000.0000.002f 605 | 606 | interface Ethernet4/11 607 | shutdown 608 | no switchport 609 | mac-address 0000.0000.002f 610 | 611 | interface Ethernet4/12 612 | shutdown 613 | no switchport 614 | mac-address 0000.0000.002f 615 | 616 | interface Ethernet4/13 617 | shutdown 618 | no switchport 619 | mac-address 0000.0000.002f 620 | 621 | interface Ethernet4/14 622 | shutdown 623 | no switchport 624 | mac-address 0000.0000.002f 625 | 626 | interface Ethernet4/15 627 | shutdown 628 | no switchport 629 | mac-address 0000.0000.002f 630 | 631 | interface Ethernet4/16 632 | shutdown 633 | no switchport 634 | mac-address 0000.0000.002f 635 | 636 | interface Ethernet4/17 637 | shutdown 638 | no switchport 639 | mac-address 0000.0000.002f 640 | 641 | interface Ethernet4/18 642 | shutdown 643 | no switchport 644 | mac-address 0000.0000.002f 645 | 646 | interface Ethernet4/19 647 | shutdown 648 | no switchport 649 | mac-address 0000.0000.002f 650 | 651 | interface Ethernet4/20 652 | shutdown 653 | no switchport 654 | mac-address 0000.0000.002f 655 | 656 | interface Ethernet4/21 657 | shutdown 658 | no switchport 659 | mac-address 0000.0000.002f 660 | 661 | interface Ethernet4/22 662 | shutdown 663 | no switchport 664 | mac-address 0000.0000.002f 665 | 666 | interface Ethernet4/23 667 | shutdown 668 | no switchport 669 | mac-address 0000.0000.002f 670 | 671 | interface Ethernet4/24 672 | shutdown 673 | no switchport 674 | mac-address 0000.0000.002f 675 | 676 | interface Ethernet4/25 677 | shutdown 678 | no switchport 679 | mac-address 0000.0000.002f 680 | 681 | interface Ethernet4/26 682 | shutdown 683 | no switchport 684 | mac-address 0000.0000.002f 685 | 686 | interface Ethernet4/27 687 | shutdown 688 | no switchport 689 | mac-address 0000.0000.002f 690 | 691 | interface Ethernet4/28 692 | shutdown 693 | no switchport 694 | mac-address 0000.0000.002f 695 | 696 | interface Ethernet4/29 697 | shutdown 698 | no switchport 699 | mac-address 0000.0000.002f 700 | 701 | interface Ethernet4/30 702 | shutdown 703 | no switchport 704 | mac-address 0000.0000.002f 705 | 706 | interface Ethernet4/31 707 | shutdown 708 | no switchport 709 | mac-address 0000.0000.002f 710 | 711 | interface Ethernet4/32 712 | shutdown 713 | no switchport 714 | mac-address 0000.0000.002f 715 | 716 | interface Ethernet4/33 717 | shutdown 718 | no switchport 719 | mac-address 0000.0000.002f 720 | 721 | interface Ethernet4/34 722 | shutdown 723 | no switchport 724 | mac-address 0000.0000.002f 725 | 726 | interface Ethernet4/35 727 | shutdown 728 | no switchport 729 | mac-address 0000.0000.002f 730 | 731 | interface Ethernet4/36 732 | shutdown 733 | no switchport 734 | mac-address 0000.0000.002f 735 | 736 | interface Ethernet4/37 737 | shutdown 738 | no switchport 739 | mac-address 0000.0000.002f 740 | 741 | interface Ethernet4/38 742 | shutdown 743 | no switchport 744 | mac-address 0000.0000.002f 745 | 746 | interface Ethernet4/39 747 | shutdown 748 | no switchport 749 | mac-address 0000.0000.002f 750 | 751 | interface Ethernet4/40 752 | shutdown 753 | no switchport 754 | mac-address 0000.0000.002f 755 | 756 | interface Ethernet4/41 757 | shutdown 758 | no switchport 759 | mac-address 0000.0000.002f 760 | 761 | interface Ethernet4/42 762 | shutdown 763 | no switchport 764 | mac-address 0000.0000.002f 765 | 766 | interface Ethernet4/43 767 | shutdown 768 | no switchport 769 | mac-address 0000.0000.002f 770 | 771 | interface Ethernet4/44 772 | shutdown 773 | no switchport 774 | mac-address 0000.0000.002f 775 | 776 | interface Ethernet4/45 777 | shutdown 778 | no switchport 779 | mac-address 0000.0000.002f 780 | 781 | interface Ethernet4/46 782 | shutdown 783 | no switchport 784 | mac-address 0000.0000.002f 785 | 786 | interface Ethernet4/47 787 | shutdown 788 | no switchport 789 | mac-address 0000.0000.002f 790 | 791 | interface Ethernet4/48 792 | shutdown 793 | no switchport 794 | mac-address 0000.0000.002f 795 | 796 | interface loopback0 797 | description Loopback 798 | ip address 192.168.0.12/32 799 | ip router ospf 65002 area 0.0.0.0 800 | line console 801 | line vty 802 | boot kickstart bootflash:/titanium-d1-kickstart.7.3.0.D1.1.bin 803 | boot system bootflash:/titanium-d1.7.3.0.D1.1.bin 804 | router ospf 65002 805 | router-id 192.168.0.12 806 | router bgp 65002 807 | router-id 192.168.0.12 808 | address-family ipv4 unicast 809 | network 10.1.0.0/30 810 | network 10.1.128.0/30 811 | network 192.168.0.12/32 812 | neighbor 10.1.0.5 remote-as 65001 813 | description eBGP peer lax-cor-r1 814 | address-family ipv4 unicast 815 | send-community 816 | next-hop-self 817 | neighbor 192.168.0.10 remote-as 65002 818 | description iBGP peer lax-tor-r1 819 | update-source loopback0 820 | address-family ipv4 unicast 821 | next-hop-self 822 | neighbor 192.168.0.11 remote-as 65002 823 | description iBGP peer lax-tor-r2 824 | update-source loopback0 825 | address-family ipv4 unicast 826 | next-hop-self 827 | no system default switchport shutdown 828 | nxapi sandbox -------------------------------------------------------------------------------- /Section 5/backup/lax-agg-r1_config.2018-06-26@14_23_59: -------------------------------------------------------------------------------- 1 | !Command: show running-config 2 | !Time: Tue Jun 26 21:31:29 2018 3 | 4 | version 7.3(0)D1(1) 5 | power redundancy-mode redundant 6 | license grace-period 7 | 8 | hostname lax-agg-r1 9 | vdc lax-agg-r1 id 1 10 | limit-resource module-type m1 m1xl m2xl f2e 11 | allocate interface Ethernet2/1-48 12 | allocate interface Ethernet3/1-48 13 | allocate interface Ethernet4/1-48 14 | limit-resource vlan minimum 16 maximum 4094 15 | limit-resource vrf minimum 2 maximum 4096 16 | limit-resource port-channel minimum 0 maximum 768 17 | limit-resource u4route-mem minimum 96 maximum 96 18 | limit-resource u6route-mem minimum 24 maximum 24 19 | limit-resource m4route-mem minimum 58 maximum 58 20 | limit-resource m6route-mem minimum 8 maximum 8 21 | 22 | feature telnet 23 | feature ospf 24 | feature bgp 25 | feature nxapi 26 | 27 | username admin password 5 $1$KuOSBsvW$Cy0TSD..gEBGBPjzpDgf51 role network-admin 28 | username adminbackup password 5 ! role network-operator 29 | username adminbackup passphrase lifetime 99999 warntime 14 gracetime 3 30 | username cisco password 5 $1$Nk7ZkwH0$fyiRmMMfIheqE3BqvcL0C1 role network-operator 31 | username cisco role network-admin 32 | username cisco passphrase lifetime 99999 warntime 14 gracetime 3 33 | username lab password 5 $1$buoy/oqy$.EXQz8rCn72ii8qtdldj00 role network-admin 34 | username lab passphrase lifetime 99999 warntime 14 gracetime 3 35 | no password strength-check 36 | ip domain-lookup 37 | vlan dot1Q tag native 38 | system default switchport 39 | system jumbomtu 0 40 | no logging event trunk-status enable 41 | copp profile strict 42 | snmp-server user lab network-admin auth md5 0x5ceb414591539ee35159fca86fdfa101 priv 0x5ceb414591539ee35159fca86fdfa101 localizedkey 43 | snmp-server user admin network-admin auth md5 0x328945d53e05e8e7207f8c20b142f0b7 priv 0x328945d53e05e8e7207f8c20b142f0b7 localizedkey 44 | snmp-server user cisco network-admin auth md5 0x55b3c64a53fb95518e75358ee75e82e9 priv 0x55b3c64a53fb95518e75358ee75e82e9 localizedkey 45 | snmp-server user cisco network-operator 46 | snmp-server user admin auth md5 0x328945d53e05e8e7207f8c20b142f0b7 priv 0x328945d53e05e8e7207f8c20b142f0b7 localizedkey engineID 128:0:0:9:3:0:0:0:0:0:0 47 | rmon event 1 log trap public description FATAL(1) owner PMON@FATAL 48 | rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL 49 | rmon event 3 log trap public description ERROR(3) owner PMON@ERROR 50 | rmon event 4 log trap public description WARNING(4) owner PMON@WARNING 51 | rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO 52 | snmp-server enable traps link 53 | 54 | ip route 10.1.0.0/30 Null0 254 55 | ip route 10.1.128.0/30 Null0 254 56 | vlan 1,100 57 | 58 | vrf context management 59 | hardware forwarding unicast trace 60 | 61 | 62 | interface mgmt0 63 | description OOB Management 64 | duplex full 65 | vrf member management 66 | ip address 172.16.1.12/24 67 | 68 | interface Ethernet2/1 69 | description to lax-cor-r1 70 | no switchport 71 | mac-address fa16.3e00.0001 72 | ip address 10.1.0.6/30 73 | no shutdown 74 | 75 | interface Ethernet2/2 76 | description to lax-tor-r1 77 | no switchport 78 | mac-address fa16.3e00.0002 79 | ip address 10.1.0.2/30 80 | ip router ospf 65002 area 0.0.0.0 81 | no shutdown 82 | 83 | interface Ethernet2/3 84 | description to lax-tor-r2 85 | no switchport 86 | mac-address fa16.3e00.0003 87 | ip address 10.1.128.1/30 88 | ip router ospf 65002 area 0.0.0.0 89 | no shutdown 90 | 91 | interface Ethernet2/4 92 | shutdown 93 | no switchport 94 | mac-address 0000.0000.002f 95 | 96 | interface Ethernet2/5 97 | shutdown 98 | no switchport 99 | mac-address 0000.0000.002f 100 | 101 | interface Ethernet2/6 102 | shutdown 103 | no switchport 104 | mac-address 0000.0000.002f 105 | 106 | interface Ethernet2/7 107 | shutdown 108 | no switchport 109 | mac-address 0000.0000.002f 110 | 111 | interface Ethernet2/8 112 | shutdown 113 | no switchport 114 | mac-address 0000.0000.002f 115 | 116 | interface Ethernet2/9 117 | shutdown 118 | no switchport 119 | mac-address 0000.0000.002f 120 | 121 | interface Ethernet2/10 122 | shutdown 123 | no switchport 124 | mac-address 0000.0000.002f 125 | 126 | interface Ethernet2/11 127 | shutdown 128 | no switchport 129 | mac-address 0000.0000.002f 130 | 131 | interface Ethernet2/12 132 | shutdown 133 | no switchport 134 | mac-address 0000.0000.002f 135 | 136 | interface Ethernet2/13 137 | shutdown 138 | no switchport 139 | mac-address 0000.0000.002f 140 | 141 | interface Ethernet2/14 142 | shutdown 143 | no switchport 144 | mac-address 0000.0000.002f 145 | 146 | interface Ethernet2/15 147 | shutdown 148 | no switchport 149 | mac-address 0000.0000.002f 150 | 151 | interface Ethernet2/16 152 | shutdown 153 | no switchport 154 | mac-address 0000.0000.002f 155 | 156 | interface Ethernet2/17 157 | shutdown 158 | no switchport 159 | mac-address 0000.0000.002f 160 | 161 | interface Ethernet2/18 162 | shutdown 163 | no switchport 164 | mac-address 0000.0000.002f 165 | 166 | interface Ethernet2/19 167 | shutdown 168 | no switchport 169 | mac-address 0000.0000.002f 170 | 171 | interface Ethernet2/20 172 | shutdown 173 | no switchport 174 | mac-address 0000.0000.002f 175 | 176 | interface Ethernet2/21 177 | shutdown 178 | no switchport 179 | mac-address 0000.0000.002f 180 | 181 | interface Ethernet2/22 182 | shutdown 183 | no switchport 184 | mac-address 0000.0000.002f 185 | 186 | interface Ethernet2/23 187 | shutdown 188 | no switchport 189 | mac-address 0000.0000.002f 190 | 191 | interface Ethernet2/24 192 | shutdown 193 | no switchport 194 | mac-address 0000.0000.002f 195 | 196 | interface Ethernet2/25 197 | shutdown 198 | no switchport 199 | mac-address 0000.0000.002f 200 | 201 | interface Ethernet2/26 202 | shutdown 203 | no switchport 204 | mac-address 0000.0000.002f 205 | 206 | interface Ethernet2/27 207 | shutdown 208 | no switchport 209 | mac-address 0000.0000.002f 210 | 211 | interface Ethernet2/28 212 | shutdown 213 | no switchport 214 | mac-address 0000.0000.002f 215 | 216 | interface Ethernet2/29 217 | shutdown 218 | no switchport 219 | mac-address 0000.0000.002f 220 | 221 | interface Ethernet2/30 222 | shutdown 223 | no switchport 224 | mac-address 0000.0000.002f 225 | 226 | interface Ethernet2/31 227 | shutdown 228 | no switchport 229 | mac-address 0000.0000.002f 230 | 231 | interface Ethernet2/32 232 | shutdown 233 | no switchport 234 | mac-address 0000.0000.002f 235 | 236 | interface Ethernet2/33 237 | shutdown 238 | no switchport 239 | mac-address 0000.0000.002f 240 | 241 | interface Ethernet2/34 242 | shutdown 243 | no switchport 244 | mac-address 0000.0000.002f 245 | 246 | interface Ethernet2/35 247 | shutdown 248 | no switchport 249 | mac-address 0000.0000.002f 250 | 251 | interface Ethernet2/36 252 | shutdown 253 | no switchport 254 | mac-address 0000.0000.002f 255 | 256 | interface Ethernet2/37 257 | shutdown 258 | no switchport 259 | mac-address 0000.0000.002f 260 | 261 | interface Ethernet2/38 262 | shutdown 263 | no switchport 264 | mac-address 0000.0000.002f 265 | 266 | interface Ethernet2/39 267 | shutdown 268 | no switchport 269 | mac-address 0000.0000.002f 270 | 271 | interface Ethernet2/40 272 | shutdown 273 | no switchport 274 | mac-address 0000.0000.002f 275 | 276 | interface Ethernet2/41 277 | shutdown 278 | no switchport 279 | mac-address 0000.0000.002f 280 | 281 | interface Ethernet2/42 282 | shutdown 283 | no switchport 284 | mac-address 0000.0000.002f 285 | 286 | interface Ethernet2/43 287 | shutdown 288 | no switchport 289 | mac-address 0000.0000.002f 290 | 291 | interface Ethernet2/44 292 | shutdown 293 | no switchport 294 | mac-address 0000.0000.002f 295 | 296 | interface Ethernet2/45 297 | shutdown 298 | no switchport 299 | mac-address 0000.0000.002f 300 | 301 | interface Ethernet2/46 302 | shutdown 303 | no switchport 304 | mac-address 0000.0000.002f 305 | 306 | interface Ethernet2/47 307 | shutdown 308 | no switchport 309 | mac-address 0000.0000.002f 310 | 311 | interface Ethernet2/48 312 | shutdown 313 | no switchport 314 | mac-address 0000.0000.002f 315 | 316 | interface Ethernet3/1 317 | shutdown 318 | no switchport 319 | mac-address 0000.0000.002f 320 | 321 | interface Ethernet3/2 322 | shutdown 323 | no switchport 324 | mac-address 0000.0000.002f 325 | 326 | interface Ethernet3/3 327 | shutdown 328 | no switchport 329 | mac-address 0000.0000.002f 330 | 331 | interface Ethernet3/4 332 | shutdown 333 | no switchport 334 | mac-address 0000.0000.002f 335 | 336 | interface Ethernet3/5 337 | shutdown 338 | no switchport 339 | mac-address 0000.0000.002f 340 | 341 | interface Ethernet3/6 342 | shutdown 343 | no switchport 344 | mac-address 0000.0000.002f 345 | 346 | interface Ethernet3/7 347 | shutdown 348 | no switchport 349 | mac-address 0000.0000.002f 350 | 351 | interface Ethernet3/8 352 | shutdown 353 | no switchport 354 | mac-address 0000.0000.002f 355 | 356 | interface Ethernet3/9 357 | shutdown 358 | no switchport 359 | mac-address 0000.0000.002f 360 | 361 | interface Ethernet3/10 362 | shutdown 363 | no switchport 364 | mac-address 0000.0000.002f 365 | 366 | interface Ethernet3/11 367 | shutdown 368 | no switchport 369 | mac-address 0000.0000.002f 370 | 371 | interface Ethernet3/12 372 | shutdown 373 | no switchport 374 | mac-address 0000.0000.002f 375 | 376 | interface Ethernet3/13 377 | shutdown 378 | no switchport 379 | mac-address 0000.0000.002f 380 | 381 | interface Ethernet3/14 382 | shutdown 383 | no switchport 384 | mac-address 0000.0000.002f 385 | 386 | interface Ethernet3/15 387 | shutdown 388 | no switchport 389 | mac-address 0000.0000.002f 390 | 391 | interface Ethernet3/16 392 | shutdown 393 | no switchport 394 | mac-address 0000.0000.002f 395 | 396 | interface Ethernet3/17 397 | shutdown 398 | no switchport 399 | mac-address 0000.0000.002f 400 | 401 | interface Ethernet3/18 402 | shutdown 403 | no switchport 404 | mac-address 0000.0000.002f 405 | 406 | interface Ethernet3/19 407 | shutdown 408 | no switchport 409 | mac-address 0000.0000.002f 410 | 411 | interface Ethernet3/20 412 | shutdown 413 | no switchport 414 | mac-address 0000.0000.002f 415 | 416 | interface Ethernet3/21 417 | shutdown 418 | no switchport 419 | mac-address 0000.0000.002f 420 | 421 | interface Ethernet3/22 422 | shutdown 423 | no switchport 424 | mac-address 0000.0000.002f 425 | 426 | interface Ethernet3/23 427 | shutdown 428 | no switchport 429 | mac-address 0000.0000.002f 430 | 431 | interface Ethernet3/24 432 | shutdown 433 | no switchport 434 | mac-address 0000.0000.002f 435 | 436 | interface Ethernet3/25 437 | shutdown 438 | no switchport 439 | mac-address 0000.0000.002f 440 | 441 | interface Ethernet3/26 442 | shutdown 443 | no switchport 444 | mac-address 0000.0000.002f 445 | 446 | interface Ethernet3/27 447 | shutdown 448 | no switchport 449 | mac-address 0000.0000.002f 450 | 451 | interface Ethernet3/28 452 | shutdown 453 | no switchport 454 | mac-address 0000.0000.002f 455 | 456 | interface Ethernet3/29 457 | shutdown 458 | no switchport 459 | mac-address 0000.0000.002f 460 | 461 | interface Ethernet3/30 462 | shutdown 463 | no switchport 464 | mac-address 0000.0000.002f 465 | 466 | interface Ethernet3/31 467 | shutdown 468 | no switchport 469 | mac-address 0000.0000.002f 470 | 471 | interface Ethernet3/32 472 | shutdown 473 | no switchport 474 | mac-address 0000.0000.002f 475 | 476 | interface Ethernet3/33 477 | shutdown 478 | no switchport 479 | mac-address 0000.0000.002f 480 | 481 | interface Ethernet3/34 482 | shutdown 483 | no switchport 484 | mac-address 0000.0000.002f 485 | 486 | interface Ethernet3/35 487 | shutdown 488 | no switchport 489 | mac-address 0000.0000.002f 490 | 491 | interface Ethernet3/36 492 | shutdown 493 | no switchport 494 | mac-address 0000.0000.002f 495 | 496 | interface Ethernet3/37 497 | shutdown 498 | no switchport 499 | mac-address 0000.0000.002f 500 | 501 | interface Ethernet3/38 502 | shutdown 503 | no switchport 504 | mac-address 0000.0000.002f 505 | 506 | interface Ethernet3/39 507 | shutdown 508 | no switchport 509 | mac-address 0000.0000.002f 510 | 511 | interface Ethernet3/40 512 | shutdown 513 | no switchport 514 | mac-address 0000.0000.002f 515 | 516 | interface Ethernet3/41 517 | shutdown 518 | no switchport 519 | mac-address 0000.0000.002f 520 | 521 | interface Ethernet3/42 522 | shutdown 523 | no switchport 524 | mac-address 0000.0000.002f 525 | 526 | interface Ethernet3/43 527 | shutdown 528 | no switchport 529 | mac-address 0000.0000.002f 530 | 531 | interface Ethernet3/44 532 | shutdown 533 | no switchport 534 | mac-address 0000.0000.002f 535 | 536 | interface Ethernet3/45 537 | shutdown 538 | no switchport 539 | mac-address 0000.0000.002f 540 | 541 | interface Ethernet3/46 542 | shutdown 543 | no switchport 544 | mac-address 0000.0000.002f 545 | 546 | interface Ethernet3/47 547 | shutdown 548 | no switchport 549 | mac-address 0000.0000.002f 550 | 551 | interface Ethernet3/48 552 | shutdown 553 | no switchport 554 | mac-address 0000.0000.002f 555 | 556 | interface Ethernet4/1 557 | shutdown 558 | no switchport 559 | mac-address 0000.0000.002f 560 | 561 | interface Ethernet4/2 562 | shutdown 563 | no switchport 564 | mac-address 0000.0000.002f 565 | 566 | interface Ethernet4/3 567 | shutdown 568 | no switchport 569 | mac-address 0000.0000.002f 570 | 571 | interface Ethernet4/4 572 | shutdown 573 | no switchport 574 | mac-address 0000.0000.002f 575 | 576 | interface Ethernet4/5 577 | shutdown 578 | no switchport 579 | mac-address 0000.0000.002f 580 | 581 | interface Ethernet4/6 582 | shutdown 583 | no switchport 584 | mac-address 0000.0000.002f 585 | 586 | interface Ethernet4/7 587 | shutdown 588 | no switchport 589 | mac-address 0000.0000.002f 590 | 591 | interface Ethernet4/8 592 | shutdown 593 | no switchport 594 | mac-address 0000.0000.002f 595 | 596 | interface Ethernet4/9 597 | shutdown 598 | no switchport 599 | mac-address 0000.0000.002f 600 | 601 | interface Ethernet4/10 602 | shutdown 603 | no switchport 604 | mac-address 0000.0000.002f 605 | 606 | interface Ethernet4/11 607 | shutdown 608 | no switchport 609 | mac-address 0000.0000.002f 610 | 611 | interface Ethernet4/12 612 | shutdown 613 | no switchport 614 | mac-address 0000.0000.002f 615 | 616 | interface Ethernet4/13 617 | shutdown 618 | no switchport 619 | mac-address 0000.0000.002f 620 | 621 | interface Ethernet4/14 622 | shutdown 623 | no switchport 624 | mac-address 0000.0000.002f 625 | 626 | interface Ethernet4/15 627 | shutdown 628 | no switchport 629 | mac-address 0000.0000.002f 630 | 631 | interface Ethernet4/16 632 | shutdown 633 | no switchport 634 | mac-address 0000.0000.002f 635 | 636 | interface Ethernet4/17 637 | shutdown 638 | no switchport 639 | mac-address 0000.0000.002f 640 | 641 | interface Ethernet4/18 642 | shutdown 643 | no switchport 644 | mac-address 0000.0000.002f 645 | 646 | interface Ethernet4/19 647 | shutdown 648 | no switchport 649 | mac-address 0000.0000.002f 650 | 651 | interface Ethernet4/20 652 | shutdown 653 | no switchport 654 | mac-address 0000.0000.002f 655 | 656 | interface Ethernet4/21 657 | shutdown 658 | no switchport 659 | mac-address 0000.0000.002f 660 | 661 | interface Ethernet4/22 662 | shutdown 663 | no switchport 664 | mac-address 0000.0000.002f 665 | 666 | interface Ethernet4/23 667 | shutdown 668 | no switchport 669 | mac-address 0000.0000.002f 670 | 671 | interface Ethernet4/24 672 | shutdown 673 | no switchport 674 | mac-address 0000.0000.002f 675 | 676 | interface Ethernet4/25 677 | shutdown 678 | no switchport 679 | mac-address 0000.0000.002f 680 | 681 | interface Ethernet4/26 682 | shutdown 683 | no switchport 684 | mac-address 0000.0000.002f 685 | 686 | interface Ethernet4/27 687 | shutdown 688 | no switchport 689 | mac-address 0000.0000.002f 690 | 691 | interface Ethernet4/28 692 | shutdown 693 | no switchport 694 | mac-address 0000.0000.002f 695 | 696 | interface Ethernet4/29 697 | shutdown 698 | no switchport 699 | mac-address 0000.0000.002f 700 | 701 | interface Ethernet4/30 702 | shutdown 703 | no switchport 704 | mac-address 0000.0000.002f 705 | 706 | interface Ethernet4/31 707 | shutdown 708 | no switchport 709 | mac-address 0000.0000.002f 710 | 711 | interface Ethernet4/32 712 | shutdown 713 | no switchport 714 | mac-address 0000.0000.002f 715 | 716 | interface Ethernet4/33 717 | shutdown 718 | no switchport 719 | mac-address 0000.0000.002f 720 | 721 | interface Ethernet4/34 722 | shutdown 723 | no switchport 724 | mac-address 0000.0000.002f 725 | 726 | interface Ethernet4/35 727 | shutdown 728 | no switchport 729 | mac-address 0000.0000.002f 730 | 731 | interface Ethernet4/36 732 | shutdown 733 | no switchport 734 | mac-address 0000.0000.002f 735 | 736 | interface Ethernet4/37 737 | shutdown 738 | no switchport 739 | mac-address 0000.0000.002f 740 | 741 | interface Ethernet4/38 742 | shutdown 743 | no switchport 744 | mac-address 0000.0000.002f 745 | 746 | interface Ethernet4/39 747 | shutdown 748 | no switchport 749 | mac-address 0000.0000.002f 750 | 751 | interface Ethernet4/40 752 | shutdown 753 | no switchport 754 | mac-address 0000.0000.002f 755 | 756 | interface Ethernet4/41 757 | shutdown 758 | no switchport 759 | mac-address 0000.0000.002f 760 | 761 | interface Ethernet4/42 762 | shutdown 763 | no switchport 764 | mac-address 0000.0000.002f 765 | 766 | interface Ethernet4/43 767 | shutdown 768 | no switchport 769 | mac-address 0000.0000.002f 770 | 771 | interface Ethernet4/44 772 | shutdown 773 | no switchport 774 | mac-address 0000.0000.002f 775 | 776 | interface Ethernet4/45 777 | shutdown 778 | no switchport 779 | mac-address 0000.0000.002f 780 | 781 | interface Ethernet4/46 782 | shutdown 783 | no switchport 784 | mac-address 0000.0000.002f 785 | 786 | interface Ethernet4/47 787 | shutdown 788 | no switchport 789 | mac-address 0000.0000.002f 790 | 791 | interface Ethernet4/48 792 | shutdown 793 | no switchport 794 | mac-address 0000.0000.002f 795 | 796 | interface loopback0 797 | description Loopback 798 | ip address 192.168.0.12/32 799 | ip router ospf 65002 area 0.0.0.0 800 | line console 801 | line vty 802 | boot kickstart bootflash:/titanium-d1-kickstart.7.3.0.D1.1.bin 803 | boot system bootflash:/titanium-d1.7.3.0.D1.1.bin 804 | router ospf 65002 805 | router-id 192.168.0.12 806 | router bgp 65002 807 | router-id 192.168.0.12 808 | address-family ipv4 unicast 809 | network 10.1.0.0/30 810 | network 10.1.128.0/30 811 | network 192.168.0.12/32 812 | neighbor 10.1.0.5 remote-as 65001 813 | description eBGP peer lax-cor-r1 814 | address-family ipv4 unicast 815 | send-community 816 | next-hop-self 817 | neighbor 192.168.0.10 remote-as 65002 818 | description iBGP peer lax-tor-r1 819 | update-source loopback0 820 | address-family ipv4 unicast 821 | next-hop-self 822 | neighbor 192.168.0.11 remote-as 65002 823 | description iBGP peer lax-tor-r2 824 | update-source loopback0 825 | address-family ipv4 unicast 826 | next-hop-self 827 | no system default switchport shutdown 828 | nxapi sandbox -------------------------------------------------------------------------------- /Section 1/2-dc-topology.virl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | flat 5 | 6 | 7 | 8 | 65002 9 | 10 | ! IOS Config generated on 2018-06-21 14:27 11 | ! by autonetkit_0.24.0 12 | ! 13 | hostname lax-tor-r1 14 | boot-start-marker 15 | boot-end-marker 16 | ! 17 | vrf definition Mgmt-intf 18 | ! 19 | address-family ipv4 20 | exit-address-family 21 | ! 22 | address-family ipv6 23 | exit-address-family 24 | ! 25 | ! 26 | ! 27 | no aaa new-model 28 | ! 29 | ! 30 | ip cef 31 | ipv6 unicast-routing 32 | ipv6 cef 33 | ! 34 | ! 35 | service timestamps debug datetime msec 36 | service timestamps log datetime msec 37 | no service password-encryption 38 | no service config 39 | enable password cisco 40 | ip classless 41 | ip subnet-zero 42 | no ip domain lookup 43 | ip domain name virl.info 44 | crypto key generate rsa modulus 768 45 | ip ssh server algorithm authentication password 46 | username cisco privilege 15 secret cisco 47 | line vty 0 4 48 | transport input ssh telnet 49 | exec-timeout 720 0 50 | password cisco 51 | login local 52 | line con 0 53 | password cisco 54 | ! 55 | no cdp run 56 | ! 57 | ! 58 | interface Loopback0 59 | description Loopback 60 | ip address 192.168.0.10 255.255.255.255 61 | ! 62 | interface GigabitEthernet0/0 63 | description OOB Management 64 | vrf forwarding Mgmt-intf 65 | ! Configured on launch 66 | no ip address 67 | duplex full 68 | speed auto 69 | no shutdown 70 | ! 71 | interface GigabitEthernet0/1 72 | description to lax-agg-r1 73 | ip address 10.1.0.1 255.255.255.252 74 | ip ospf cost 1 75 | duplex full 76 | speed auto 77 | no shutdown 78 | ! 79 | ! 80 | ! 81 | router ospf 65002 82 | network 192.168.0.10 0.0.0.0 area 0 83 | log-adjacency-changes 84 | passive-interface Loopback0 85 | network 10.1.0.0 0.0.0.3 area 0 86 | ! 87 | ! 88 | router bgp 65002 89 | bgp router-id 192.168.0.10 90 | no synchronization 91 | ! ibgp 92 | ! ibgp peers 93 | ! 94 | neighbor 192.168.0.12 remote-as 65002 95 | neighbor 192.168.0.12 description iBGP peer lax-agg-r1 96 | neighbor 192.168.0.12 update-source Loopback0 97 | ! 98 | neighbor 192.168.0.11 remote-as 65002 99 | neighbor 192.168.0.11 description iBGP peer lax-tor-r2 100 | neighbor 192.168.0.11 update-source Loopback0 101 | ! 102 | ! 103 | ! 104 | address-family ipv4 105 | network 192.168.0.10 mask 255.255.255.255 106 | neighbor 192.168.0.12 activate 107 | neighbor 192.168.0.11 activate 108 | exit-address-family 109 | ! 110 | ! 111 | ! 112 | end 113 | 172.16.1.10 114 | 115 | 116 | 117 | 118 | 119 | 65002 120 | 121 | ! IOS Config generated on 2018-06-21 14:27 122 | ! by autonetkit_0.24.0 123 | ! 124 | hostname lax-tor-r2 125 | boot-start-marker 126 | boot-end-marker 127 | ! 128 | vrf definition Mgmt-intf 129 | ! 130 | address-family ipv4 131 | exit-address-family 132 | ! 133 | address-family ipv6 134 | exit-address-family 135 | ! 136 | ! 137 | ! 138 | no aaa new-model 139 | ! 140 | ! 141 | ip cef 142 | ipv6 unicast-routing 143 | ipv6 cef 144 | ! 145 | ! 146 | service timestamps debug datetime msec 147 | service timestamps log datetime msec 148 | no service password-encryption 149 | no service config 150 | enable password cisco 151 | ip classless 152 | ip subnet-zero 153 | no ip domain lookup 154 | ip domain name virl.info 155 | crypto key generate rsa modulus 768 156 | ip ssh server algorithm authentication password 157 | username cisco privilege 15 secret cisco 158 | line vty 0 4 159 | transport input ssh telnet 160 | exec-timeout 720 0 161 | password cisco 162 | login local 163 | line con 0 164 | password cisco 165 | ! 166 | no cdp run 167 | ! 168 | ! 169 | interface Loopback0 170 | description Loopback 171 | ip address 192.168.0.11 255.255.255.255 172 | ! 173 | interface GigabitEthernet0/0 174 | description OOB Management 175 | vrf forwarding Mgmt-intf 176 | ! Configured on launch 177 | no ip address 178 | duplex full 179 | speed auto 180 | no shutdown 181 | ! 182 | interface GigabitEthernet0/1 183 | description to lax-agg-r1 184 | ip address 10.1.128.2 255.255.255.252 185 | ip ospf cost 1 186 | duplex full 187 | speed auto 188 | no shutdown 189 | ! 190 | ! 191 | ! 192 | router ospf 65002 193 | network 192.168.0.11 0.0.0.0 area 0 194 | log-adjacency-changes 195 | passive-interface Loopback0 196 | network 10.1.128.0 0.0.0.3 area 0 197 | ! 198 | ! 199 | router bgp 65002 200 | bgp router-id 192.168.0.11 201 | no synchronization 202 | ! ibgp 203 | ! ibgp peers 204 | ! 205 | neighbor 192.168.0.12 remote-as 65002 206 | neighbor 192.168.0.12 description iBGP peer lax-agg-r1 207 | neighbor 192.168.0.12 update-source Loopback0 208 | ! 209 | neighbor 192.168.0.10 remote-as 65002 210 | neighbor 192.168.0.10 description iBGP peer lax-tor-r1 211 | neighbor 192.168.0.10 update-source Loopback0 212 | ! 213 | ! 214 | ! 215 | address-family ipv4 216 | network 192.168.0.11 mask 255.255.255.255 217 | neighbor 192.168.0.12 activate 218 | neighbor 192.168.0.10 activate 219 | exit-address-family 220 | ! 221 | ! 222 | ! 223 | end 224 | 172.16.1.11 225 | 226 | 227 | 228 | 229 | 230 | 65003 231 | 232 | ! IOS Config generated on 2018-06-21 14:27 233 | ! by autonetkit_0.24.0 234 | ! 235 | hostname nyc-tor-r1 236 | boot-start-marker 237 | boot-end-marker 238 | ! 239 | vrf definition Mgmt-intf 240 | ! 241 | address-family ipv4 242 | exit-address-family 243 | ! 244 | address-family ipv6 245 | exit-address-family 246 | ! 247 | ! 248 | ! 249 | no aaa new-model 250 | ! 251 | ! 252 | ip cef 253 | ipv6 unicast-routing 254 | ipv6 cef 255 | ! 256 | ! 257 | service timestamps debug datetime msec 258 | service timestamps log datetime msec 259 | no service password-encryption 260 | no service config 261 | enable password cisco 262 | ip classless 263 | ip subnet-zero 264 | no ip domain lookup 265 | ip domain name virl.info 266 | crypto key generate rsa modulus 768 267 | ip ssh server algorithm authentication password 268 | username cisco privilege 15 secret cisco 269 | line vty 0 4 270 | transport input ssh telnet 271 | exec-timeout 720 0 272 | password cisco 273 | login local 274 | line con 0 275 | password cisco 276 | ! 277 | no cdp run 278 | ! 279 | ! 280 | interface Loopback0 281 | description Loopback 282 | ip address 192.168.0.16 255.255.255.255 283 | ! 284 | interface GigabitEthernet0/0 285 | description OOB Management 286 | vrf forwarding Mgmt-intf 287 | ! Configured on launch 288 | no ip address 289 | duplex full 290 | speed auto 291 | no shutdown 292 | ! 293 | interface GigabitEthernet0/1 294 | description to nyc-agg-r1 295 | ip address 10.2.0.5 255.255.255.252 296 | ip ospf cost 1 297 | duplex full 298 | speed auto 299 | no shutdown 300 | ! 301 | ! 302 | ! 303 | router ospf 65003 304 | network 192.168.0.16 0.0.0.0 area 0 305 | log-adjacency-changes 306 | passive-interface Loopback0 307 | network 10.2.0.4 0.0.0.3 area 0 308 | ! 309 | ! 310 | router bgp 65003 311 | bgp router-id 192.168.0.16 312 | no synchronization 313 | ! ibgp 314 | ! ibgp peers 315 | ! 316 | neighbor 192.168.0.15 remote-as 65003 317 | neighbor 192.168.0.15 description iBGP peer nyc-agg-r1 318 | neighbor 192.168.0.15 update-source Loopback0 319 | ! 320 | neighbor 192.168.0.17 remote-as 65003 321 | neighbor 192.168.0.17 description iBGP peer nyc-tor-r2 322 | neighbor 192.168.0.17 update-source Loopback0 323 | ! 324 | ! 325 | ! 326 | address-family ipv4 327 | network 192.168.0.16 mask 255.255.255.255 328 | neighbor 192.168.0.15 activate 329 | neighbor 192.168.0.17 activate 330 | exit-address-family 331 | ! 332 | ! 333 | ! 334 | end 335 | 172.16.1.16 336 | 337 | 338 | 339 | 340 | 341 | 65003 342 | 343 | ! IOS Config generated on 2018-06-21 14:27 344 | ! by autonetkit_0.24.0 345 | ! 346 | hostname nyc-tor-r2 347 | boot-start-marker 348 | boot-end-marker 349 | ! 350 | vrf definition Mgmt-intf 351 | ! 352 | address-family ipv4 353 | exit-address-family 354 | ! 355 | address-family ipv6 356 | exit-address-family 357 | ! 358 | ! 359 | ! 360 | no aaa new-model 361 | ! 362 | ! 363 | ip cef 364 | ipv6 unicast-routing 365 | ipv6 cef 366 | ! 367 | ! 368 | service timestamps debug datetime msec 369 | service timestamps log datetime msec 370 | no service password-encryption 371 | no service config 372 | enable password cisco 373 | ip classless 374 | ip subnet-zero 375 | no ip domain lookup 376 | ip domain name virl.info 377 | crypto key generate rsa modulus 768 378 | ip ssh server algorithm authentication password 379 | username cisco privilege 15 secret cisco 380 | line vty 0 4 381 | transport input ssh telnet 382 | exec-timeout 720 0 383 | password cisco 384 | login local 385 | line con 0 386 | password cisco 387 | ! 388 | no cdp run 389 | ! 390 | ! 391 | interface Loopback0 392 | description Loopback 393 | ip address 192.168.0.17 255.255.255.255 394 | ! 395 | interface GigabitEthernet0/0 396 | description OOB Management 397 | vrf forwarding Mgmt-intf 398 | ! Configured on launch 399 | no ip address 400 | duplex full 401 | speed auto 402 | no shutdown 403 | ! 404 | interface GigabitEthernet0/1 405 | description to nyc-agg-r1 406 | ip address 10.2.128.2 255.255.255.252 407 | ip ospf cost 1 408 | duplex full 409 | speed auto 410 | no shutdown 411 | ! 412 | ! 413 | ! 414 | router ospf 65003 415 | network 192.168.0.17 0.0.0.0 area 0 416 | log-adjacency-changes 417 | passive-interface Loopback0 418 | network 10.2.128.0 0.0.0.3 area 0 419 | ! 420 | ! 421 | router bgp 65003 422 | bgp router-id 192.168.0.17 423 | no synchronization 424 | ! ibgp 425 | ! ibgp peers 426 | ! 427 | neighbor 192.168.0.15 remote-as 65003 428 | neighbor 192.168.0.15 description iBGP peer nyc-agg-r1 429 | neighbor 192.168.0.15 update-source Loopback0 430 | ! 431 | neighbor 192.168.0.16 remote-as 65003 432 | neighbor 192.168.0.16 description iBGP peer nyc-tor-r1 433 | neighbor 192.168.0.16 update-source Loopback0 434 | ! 435 | ! 436 | ! 437 | address-family ipv4 438 | network 192.168.0.17 mask 255.255.255.255 439 | neighbor 192.168.0.15 activate 440 | neighbor 192.168.0.16 activate 441 | exit-address-family 442 | ! 443 | ! 444 | ! 445 | end 446 | 172.16.1.17 447 | 448 | 449 | 450 | 451 | 452 | ospf 453 | 65002 454 | 455 | ! NX-OSv Config generated on 2018-06-21 14:27 456 | ! by autonetkit_0.24.0 457 | ! 458 | version 6.2(1) 459 | license grace-period 460 | ! 461 | hostname lax-agg-r1 462 | vdc lax-agg-r1 id 1 463 | allocate interface Ethernet2/1-48 464 | allocate interface Ethernet3/1-48 465 | limit-resource vlan minimum 16 maximum 4094 466 | limit-resource vrf minimum 2 maximum 4096 467 | limit-resource port-channel minimum 0 maximum 768 468 | limit-resource u4route-mem minimum 96 maximum 96 469 | limit-resource u6route-mem minimum 24 maximum 24 470 | limit-resource m4route-mem minimum 58 maximum 58 471 | limit-resource m6route-mem minimum 8 maximum 8 472 | 473 | feature telnet 474 | 475 | feature ospf 476 | feature bgp 477 | 478 | username adminbackup password 5 ! role network-operator 479 | username admin password 5 $1$KuOSBsvW$Cy0TSD..gEBGBPjzpDgf51 role network-admin 480 | username cisco password 5 $1$Nk7ZkwH0$fyiRmMMfIheqE3BqvcL0C1 role network-operator 481 | username cisco role network-admin 482 | username lab password 5 $1$buoy/oqy$.EXQz8rCn72ii8qtdldj00 role network-admin 483 | no password strength-check 484 | ip domain-lookup 485 | copp profile strict 486 | snmp-server user lab network-admin auth md5 0x5ceb414591539ee35159fca86fdfa101 priv 0x5ceb414591539ee35159fca86fdfa101 localizedkey 487 | snmp-server user admin network-admin auth md5 0x328945d53e05e8e7207f8c20b142f0b7 priv 0x328945d53e05e8e7207f8c20b142f0b7 localizedkey 488 | snmp-server user cisco network-operator auth md5 0x55b3c64a53fb95518e75358ee75e82e9 priv 0x55b3c64a53fb95518e75358ee75e82e9 localizedkey 489 | snmp-server user cisco network-admin 490 | rmon event 1 log trap public description FATAL(1) owner PMON@FATAL 491 | rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL 492 | rmon event 3 log trap public description ERROR(3) owner PMON@ERROR 493 | rmon event 4 log trap public description WARNING(4) owner PMON@WARNING 494 | rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO 495 | 496 | ip route 10.1.0.0 255.255.255.252 Null0 254 497 | ip route 10.1.128.0 255.255.255.252 Null0 254 498 | 499 | vlan 1 500 | 501 | vrf context management 502 | hardware forwarding unicast trace 503 | 504 | interface Loopback0 505 | description Loopback 506 | ip address 192.168.0.12/32 507 | ip router ospf 65002 area 0 508 | 509 | interface Ethernet2/1 510 | description to lax-cor-r1 511 | ip address 10.1.0.6/30 512 | duplex full 513 | mac-address fa16.3e00.0001 514 | no shutdown 515 | 516 | interface Ethernet2/2 517 | description to lax-tor-r1 518 | ip address 10.1.0.2/30 519 | ip router ospf 65002 area 0 520 | duplex full 521 | mac-address fa16.3e00.0002 522 | no shutdown 523 | 524 | interface Ethernet2/3 525 | description to lax-tor-r2 526 | ip address 10.1.128.1/30 527 | ip router ospf 65002 area 0 528 | duplex full 529 | mac-address fa16.3e00.0003 530 | no shutdown 531 | 532 | interface mgmt0 533 | description OOB Management 534 | ! Configured on launch 535 | no ip address 536 | duplex full 537 | mac-address fa16.3e00.0004 538 | no shutdown 539 | vrf member management 540 | 541 | 542 | line console 543 | line vty 544 | router ospf 65002 545 | router-id 192.168.0.12 546 | router bgp 65002 547 | router-id 192.168.0.12 548 | address-family ipv4 unicast 549 | network 192.168.0.12/32 550 | network 10.1.0.0/30 551 | network 10.1.128.0/30 552 | ! 553 | ! iBGP 554 | ! 555 | ! iBGP peers 556 | ! 557 | neighbor 192.168.0.10 remote-as 65002 558 | description iBGP peer lax-tor-r1 559 | update-source Loopback0 560 | address-family ipv4 unicast 561 | next-hop-self 562 | ! 563 | ! 564 | ! 565 | neighbor 192.168.0.11 remote-as 65002 566 | description iBGP peer lax-tor-r2 567 | update-source Loopback0 568 | address-family ipv4 unicast 569 | next-hop-self 570 | ! 571 | ! 572 | ! eBGP peers 573 | ! 574 | neighbor 10.1.0.5 remote-as 65001 575 | description eBGP peer lax-cor-r1 576 | address-family ipv4 unicast 577 | send-community standard 578 | next-hop-self 579 | 580 | 172.16.1.12 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | ospf 589 | 65003 590 | 591 | ! NX-OSv Config generated on 2018-06-21 14:27 592 | ! by autonetkit_0.24.0 593 | ! 594 | version 6.2(1) 595 | license grace-period 596 | ! 597 | hostname nyc-agg-r1 598 | vdc nyc-agg-r1 id 1 599 | allocate interface Ethernet2/1-48 600 | allocate interface Ethernet3/1-48 601 | limit-resource vlan minimum 16 maximum 4094 602 | limit-resource vrf minimum 2 maximum 4096 603 | limit-resource port-channel minimum 0 maximum 768 604 | limit-resource u4route-mem minimum 96 maximum 96 605 | limit-resource u6route-mem minimum 24 maximum 24 606 | limit-resource m4route-mem minimum 58 maximum 58 607 | limit-resource m6route-mem minimum 8 maximum 8 608 | 609 | feature telnet 610 | 611 | feature ospf 612 | feature bgp 613 | 614 | username adminbackup password 5 ! role network-operator 615 | username admin password 5 $1$KuOSBsvW$Cy0TSD..gEBGBPjzpDgf51 role network-admin 616 | username cisco password 5 $1$Nk7ZkwH0$fyiRmMMfIheqE3BqvcL0C1 role network-operator 617 | username cisco role network-admin 618 | username lab password 5 $1$buoy/oqy$.EXQz8rCn72ii8qtdldj00 role network-admin 619 | no password strength-check 620 | ip domain-lookup 621 | copp profile strict 622 | snmp-server user lab network-admin auth md5 0x5ceb414591539ee35159fca86fdfa101 priv 0x5ceb414591539ee35159fca86fdfa101 localizedkey 623 | snmp-server user admin network-admin auth md5 0x328945d53e05e8e7207f8c20b142f0b7 priv 0x328945d53e05e8e7207f8c20b142f0b7 localizedkey 624 | snmp-server user cisco network-operator auth md5 0x55b3c64a53fb95518e75358ee75e82e9 priv 0x55b3c64a53fb95518e75358ee75e82e9 localizedkey 625 | snmp-server user cisco network-admin 626 | rmon event 1 log trap public description FATAL(1) owner PMON@FATAL 627 | rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL 628 | rmon event 3 log trap public description ERROR(3) owner PMON@ERROR 629 | rmon event 4 log trap public description WARNING(4) owner PMON@WARNING 630 | rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO 631 | 632 | ip route 10.2.0.4 255.255.255.252 Null0 254 633 | ip route 10.2.128.0 255.255.255.252 Null0 254 634 | 635 | vlan 1 636 | 637 | vrf context management 638 | hardware forwarding unicast trace 639 | 640 | interface Loopback0 641 | description Loopback 642 | ip address 192.168.0.15/32 643 | ip router ospf 65003 area 0 644 | 645 | interface Ethernet2/1 646 | description to nyc-cor-r1 647 | ip address 10.2.0.2/30 648 | duplex full 649 | mac-address fa16.3e00.0005 650 | no shutdown 651 | 652 | interface Ethernet2/2 653 | description to nyc-tor-r1 654 | ip address 10.2.0.6/30 655 | ip router ospf 65003 area 0 656 | duplex full 657 | mac-address fa16.3e00.0006 658 | no shutdown 659 | 660 | interface Ethernet2/3 661 | description to nyc-tor-r2 662 | ip address 10.2.128.1/30 663 | ip router ospf 65003 area 0 664 | duplex full 665 | mac-address fa16.3e00.0007 666 | no shutdown 667 | 668 | interface mgmt0 669 | description OOB Management 670 | ! Configured on launch 671 | no ip address 672 | duplex full 673 | mac-address fa16.3e00.0008 674 | no shutdown 675 | vrf member management 676 | 677 | 678 | line console 679 | line vty 680 | router ospf 65003 681 | router-id 192.168.0.15 682 | router bgp 65003 683 | router-id 192.168.0.15 684 | address-family ipv4 unicast 685 | network 192.168.0.15/32 686 | network 10.2.0.4/30 687 | network 10.2.128.0/30 688 | ! 689 | ! iBGP 690 | ! 691 | ! iBGP peers 692 | ! 693 | neighbor 192.168.0.16 remote-as 65003 694 | description iBGP peer nyc-tor-r1 695 | update-source Loopback0 696 | address-family ipv4 unicast 697 | next-hop-self 698 | ! 699 | ! 700 | ! 701 | neighbor 192.168.0.17 remote-as 65003 702 | description iBGP peer nyc-tor-r2 703 | update-source Loopback0 704 | address-family ipv4 unicast 705 | next-hop-self 706 | ! 707 | ! 708 | ! eBGP peers 709 | ! 710 | neighbor 10.2.0.1 remote-as 65001 711 | description eBGP peer nyc-cor-r1 712 | address-family ipv4 unicast 713 | send-community standard 714 | next-hop-self 715 | 716 | 172.16.1.15 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 65001 725 | 726 | ! IOS-XR Config generated on 2018-06-21 14:27 727 | ! by autonetkit_0.24.0 728 | ! 729 | hostname lax-cor-r1 730 | service timestamps log datetime msec 731 | service timestamps debug datetime msec 732 | telnet vrf default ipv4 server max-servers 10 733 | telnet vrf Mgmt-intf ipv4 server max-servers 10 734 | domain lookup disable 735 | vrf Mgmt-intf 736 | address-family ipv4 unicast 737 | ! 738 | address-family ipv6 unicast 739 | ! 740 | ! 741 | domain name virl.info 742 | ssh server v2 743 | ssh server vrf Mgmt-intf 744 | ! 745 | line template vty 746 | timestamp 747 | exec-timeout 720 0 748 | ! 749 | line console 750 | exec-timeout 0 0 751 | ! 752 | line default 753 | exec-timeout 720 0 754 | ! 755 | vty-pool default 0 50 756 | control-plane 757 | management-plane 758 | inband 759 | interface all 760 | allow all 761 | ! 762 | ! 763 | ! 764 | ! 765 | ! 766 | interface Loopback0 767 | description Loopback 768 | ipv4 address 192.168.0.13 255.255.255.255 769 | ! 770 | interface GigabitEthernet0/0/0/0 771 | description to nyc-cor-r1 772 | ipv4 address 10.0.0.2 255.255.0.0 773 | no shutdown 774 | ! 775 | interface GigabitEthernet0/0/0/1 776 | description to lax-agg-r1 777 | ipv4 address 10.1.0.5 255.255.255.252 778 | no shutdown 779 | ! 780 | interface mgmteth0/0/CPU0/0 781 | description OOB Management 782 | ! Configured on launch 783 | vrf Mgmt-intf 784 | no ipv4 address 785 | no shutdown 786 | ! 787 | ! 788 | router ospf 65001 789 | log adjacency changes 790 | area 0 791 | interface GigabitEthernet0/0/0/0 792 | cost 1 793 | ! 794 | interface Loopback0 795 | passive enable 796 | ! 797 | ! 798 | ! 799 | route-policy bgp_in 800 | pass 801 | end-policy 802 | ! 803 | route-policy bgp_out 804 | pass 805 | end-policy 806 | ! 807 | route-policy ibgp_in 808 | pass 809 | end-policy 810 | ! 811 | router static 812 | address-family ipv4 unicast 813 | 10.0.0.0 255.255.0.0 Null0 254 814 | 10.1.0.4 255.255.255.252 Null0 254 815 | 10.2.0.0 255.255.255.252 Null0 254 816 | ! 817 | ! 818 | router bgp 65001 819 | bgp router-id 192.168.0.13 820 | address-family ipv4 unicast 821 | network 192.168.0.13/32 822 | network 10.0.0.0/16 823 | network 10.1.0.4/30 824 | network 10.2.0.0/30 825 | ! 826 | ! iBGP 827 | ! 828 | ! iBGP peers 829 | ! 830 | neighbor 192.168.0.14 831 | description iBGP peer nyc-cor-r1 832 | remote-as 65001 833 | update-source Loopback0 834 | address-family ipv4 unicast 835 | next-hop-self 836 | ! 837 | ! 838 | ! eBGP peers 839 | ! 840 | neighbor 10.1.0.6 841 | description eBGP peer lax-agg-r1 842 | remote-as 65002 843 | address-family ipv4 unicast 844 | send-community-ebgp 845 | route-policy bgp_in in 846 | route-policy bgp_out out 847 | next-hop-self 848 | ! 849 | 850 | 172.16.1.13 851 | 852 | 853 | 854 | 855 | 856 | 857 | 65001 858 | 859 | ! IOS-XR Config generated on 2018-06-21 14:27 860 | ! by autonetkit_0.24.0 861 | ! 862 | hostname nyc-cor-r1 863 | service timestamps log datetime msec 864 | service timestamps debug datetime msec 865 | telnet vrf default ipv4 server max-servers 10 866 | telnet vrf Mgmt-intf ipv4 server max-servers 10 867 | domain lookup disable 868 | vrf Mgmt-intf 869 | address-family ipv4 unicast 870 | ! 871 | address-family ipv6 unicast 872 | ! 873 | ! 874 | domain name virl.info 875 | ssh server v2 876 | ssh server vrf Mgmt-intf 877 | ! 878 | line template vty 879 | timestamp 880 | exec-timeout 720 0 881 | ! 882 | line console 883 | exec-timeout 0 0 884 | ! 885 | line default 886 | exec-timeout 720 0 887 | ! 888 | vty-pool default 0 50 889 | control-plane 890 | management-plane 891 | inband 892 | interface all 893 | allow all 894 | ! 895 | ! 896 | ! 897 | ! 898 | ! 899 | interface Loopback0 900 | description Loopback 901 | ipv4 address 192.168.0.14 255.255.255.255 902 | ! 903 | interface GigabitEthernet0/0/0/0 904 | description to lax-cor-r1 905 | ipv4 address 10.0.0.1 255.255.0.0 906 | no shutdown 907 | ! 908 | interface GigabitEthernet0/0/0/1 909 | description to nyc-agg-r1 910 | ipv4 address 10.2.0.1 255.255.255.252 911 | no shutdown 912 | ! 913 | interface mgmteth0/0/CPU0/0 914 | description OOB Management 915 | ! Configured on launch 916 | vrf Mgmt-intf 917 | no ipv4 address 918 | no shutdown 919 | ! 920 | ! 921 | router ospf 65001 922 | log adjacency changes 923 | area 0 924 | interface GigabitEthernet0/0/0/0 925 | cost 1 926 | ! 927 | interface Loopback0 928 | passive enable 929 | ! 930 | ! 931 | ! 932 | route-policy bgp_in 933 | pass 934 | end-policy 935 | ! 936 | route-policy bgp_out 937 | pass 938 | end-policy 939 | ! 940 | route-policy ibgp_in 941 | pass 942 | end-policy 943 | ! 944 | router static 945 | address-family ipv4 unicast 946 | 10.0.0.0 255.255.0.0 Null0 254 947 | 10.1.0.4 255.255.255.252 Null0 254 948 | 10.2.0.0 255.255.255.252 Null0 254 949 | ! 950 | ! 951 | router bgp 65001 952 | bgp router-id 192.168.0.14 953 | address-family ipv4 unicast 954 | network 192.168.0.14/32 955 | network 10.0.0.0/16 956 | network 10.1.0.4/30 957 | network 10.2.0.0/30 958 | ! 959 | ! iBGP 960 | ! 961 | ! iBGP peers 962 | ! 963 | neighbor 192.168.0.13 964 | description iBGP peer lax-cor-r1 965 | remote-as 65001 966 | update-source Loopback0 967 | address-family ipv4 unicast 968 | next-hop-self 969 | ! 970 | ! 971 | ! eBGP peers 972 | ! 973 | neighbor 10.2.0.2 974 | description eBGP peer nyc-agg-r1 975 | remote-as 65003 976 | address-family ipv4 unicast 977 | send-community-ebgp 978 | route-policy bgp_in in 979 | route-policy bgp_out out 980 | next-hop-self 981 | ! 982 | 983 | 172.16.1.14 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 998 | 999 | --------------------------------------------------------------------------------