Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# Segment-Routing-101
Segment Routing 101, published by Packt
Supported ansible-playbook for Cisco IOS-XR labs
17 changes: 17 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[defaults]
host_key_checking = False
inventory = inventory/hosts.ini
forks=30
stdout_callback = yaml
display_skipped_hosts = false

# https://www.redhat.com/sysadmin/faster-ansible-playbook-execution
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s

[persistent_connection]
connect_timeout = 120
connect_retry_timeout = 30
# The following is used to replace config as libssh has a bug
#ssh_type = paramiko

3 changes: 3 additions & 0 deletions inventory/group_vars/routers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: cisco.iosxr.iosxr
44 changes: 44 additions & 0 deletions inventory/host_vars/P2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
hostname: P2
interfaces:
- name : Loopback0
address: 2.2.2.2/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/0
address: 23.0.0.2/24
description: P2_to_P3
- name : GigabitEthernet0/0/0/1
address: 26.0.0.2/24
description: P2_to_P6
- name : GigabitEthernet0/0/0/2
address: 12.0.0.2/24
description: P2_to_PE1
- name : GigabitEthernet0/0/0/3
address: 27.0.0.2/24
description: P2_to_P7
- name : GigabitEthernet0/0/0/5
address: 29.0.0.2/24
description: P2_to_P9
protocols:
isis:
- net: 49.0000.0000.0002.00
sid: 2
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/0
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/1
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/2
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/3
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/5
loopback: False
metric: 10

38 changes: 38 additions & 0 deletions inventory/host_vars/P3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
hostname: P3
interfaces:
- name : Loopback0
address: 3.3.3.3/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/0
address: 23.0.0.3/24
description: P3_to_P2
- name : GigabitEthernet0/0/0/1
address: 37.0.0.3/24
description: P3_to_P7
- name : GigabitEthernet0/0/0/2
address: 34.0.0.3/24
description: P3_to_P4
- name : GigabitEthernet0/0/0/3
address: 39.0.0.3/24
description: P3_to_P9
protocols:
isis:
- net: 49.0000.0000.0003.00
sid: 3
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/0
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/1
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/2
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/3
loopback: False
metric: 10

38 changes: 38 additions & 0 deletions inventory/host_vars/P4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
hostname: P4
interfaces:
- name : Loopback0
address: 4.4.4.4/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/0
address: 45.0.0.4/24
description: P4_to_PE5
- name : GigabitEthernet0/0/0/1
address: 48.0.0.4/24
description: P4_to_P8
- name : GigabitEthernet0/0/0/2
address: 34.0.0.4/24
description: P4_to_P3
- name : GigabitEthernet0/0/0/4
address: 47.0.0.4/24
description: P4_to_P7
protocols:
isis:
- net: 49.0000.0000.0004.00
sid: 4
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/0
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/1
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/2
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/4
loopback: False
metric: 10

26 changes: 26 additions & 0 deletions inventory/host_vars/P6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
hostname: P6
interfaces:
- name : Loopback0
address: 6.6.6.6/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/0
address: 67.0.0.6/24
description: P6_to_P7
- name : GigabitEthernet0/0/0/1
address: 26.0.0.6/24
description: P6_to_P2
protocols:
isis:
- net: 49.0000.0000.0006.00
sid: 6
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/0
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/1
loopback: False
metric: 10

44 changes: 44 additions & 0 deletions inventory/host_vars/P7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
hostname: P7
interfaces:
- name : Loopback0
address: 7.7.7.7/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/0
address: 67.0.0.7/24
description: P7_to_P6
- name : GigabitEthernet0/0/0/1
address: 37.0.0.7/24
description: P7_to_P7
- name : GigabitEthernet0/0/0/2
address: 78.0.0.7/24
description: P7_to_P8
- name : GigabitEthernet0/0/0/3
address: 27.0.0.7/24
description: P7_to_P2
- name : GigabitEthernet0/0/0/4
address: 47.0.0.7/24
description: P7_to_P4
protocols:
isis:
- net: 49.0000.0000.0007.00
sid: 7
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/0
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/1
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/2
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/3
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/4
loopback: False
metric: 10

29 changes: 29 additions & 0 deletions inventory/host_vars/P8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
hostname: P8
interfaces:
- name : Loopback0
address: 8.8.8.8/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/1
address: 48.0.0.8/24
description: P8_to_P4
- name : GigabitEthernet0/0/0/2
address: 78.0.0.8/24
description: P8_to_P7
protocols:
isis:
- net: 49.0000.0000.0008.00
sid: 8
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/0
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/1
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/2
loopback: False
metric: 10

26 changes: 26 additions & 0 deletions inventory/host_vars/P9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
hostname: P9
interfaces:
- name : Loopback0
address: 9.9.9.9/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/3
address: 39.0.0.9/24
description: P9_to_P3
- name : GigabitEthernet0/0/0/5
address: 29.0.0.9/24
description: P9_to_P2
protocols:
isis:
- net: 49.0000.0000.0009.00
sid: 9
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/3
loopback: False
metric: 10
- name: GigabitEthernet0/0/0/5
loopback: False
metric: 10

19 changes: 19 additions & 0 deletions inventory/host_vars/PE1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
hostname: PE1
interfaces:
- name : Loopback0
address: 1.1.1.1/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/2
address: 12.0.0.1/24
description: PE1_to_P2
protocols:
isis:
- net: 49.0000.0000.0001.00
sid: 1
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/2
loopback: False
metric: 10

20 changes: 20 additions & 0 deletions inventory/host_vars/PE5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
hostname: PE5
interfaces:
- name : Loopback0
address: 5.5.5.5/32
description: System_Loopback_Interface
- name : GigabitEthernet0/0/0/0
address: 45.0.0.5/24
description: PE5_to_P4
protocols:
isis:
- net: 49.0000.0000.0005.00
sid: 5
interfaces:
- name: Loopback0
loopback: True
- name: GigabitEthernet0/0/0/0
loopback: False
metric: 10

16 changes: 16 additions & 0 deletions inventory/hosts.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
###hosts.ini
[routers]
PE1 ansible_host=192.168.18.1
P2 ansible_host=192.168.18.2
P3 ansible_host=192.168.18.3
P4 ansible_host=192.168.18.4
PE5 ansible_host=192.168.18.5
P6 ansible_host=192.168.18.6
P7 ansible_host=192.168.18.7
P8 ansible_host=192.168.18.8
P9 ansible_host=192.168.18.9

[zstilfa]
P2 ansible_host=192.168.18.2
P6 ansible_host=192.168.18.6
P7 ansible_host=192.168.18.7
Loading