From 39399086d93cfd098b6254027aec20c5b6e03137 Mon Sep 17 00:00:00 2001 From: Dom Date: Sun, 19 Nov 2023 17:31:30 +0000 Subject: [PATCH] Adding OSPF config, updating authentication to fail back to local on Cisco --- provisioning/templates/cisco_ios.j2 | 46 +++++++++++++++++++---------- provisioning/templates/junos.j2 | 22 ++++++++++++-- 2 files changed, 50 insertions(+), 18 deletions(-) diff --git a/provisioning/templates/cisco_ios.j2 b/provisioning/templates/cisco_ios.j2 index 44afb37..107b185 100644 --- a/provisioning/templates/cisco_ios.j2 +++ b/provisioning/templates/cisco_ios.j2 @@ -15,9 +15,10 @@ aaa new-model ! aaa group server radius LAB-RADIUS server-private 192.168.0.247 auth-port 1812 acct-port 1813 key Juniper1 + deadtime 5 ! -aaa authentication login default group LAB-RADIUS -aaa authorization exec default group LAB-RADIUS +aaa authentication login default group LAB-RADIUS local +aaa authorization exec default group LAB-RADIUS local aaa accounting exec default start-stop group LAB-RADIUS aaa accounting system default start-stop group LAB-RADIUS ! @@ -103,50 +104,65 @@ interface Ethernet0 shutdown ! interface GigabitEthernet0 - description "Management Network" + no ip address + shutdown +! +interface GigabitEthernet1 + description "{{ hostname }} GigabitEthernet1 <--> ge-0/0/1 LAB-SRX300" switchport access vlan 10 no ip address ! -interface GigabitEthernet1 - description "{{ hostname }} gigabitEthernet1 <--> ge-0/0/1 LAB-SRX300" - switchport access vlan 20 - no ip address -! interface GigabitEthernet2 - description "{{ hostname }} gigabitEthernet2 <--> ge-0/0/2 LAB-SRX300" - switchport access vlan 30 + description "{{ hostname }} GigabitEthernet2 <--> ge-0/0/2 LAB-SRX300" + switchport access vlan 20 no ip address ! interface GigabitEthernet3 no ip address + shutdown ! interface GigabitEthernet4 no ip address + shutdown ! interface GigabitEthernet5 no ip address + shutdown ! interface GigabitEthernet6 no ip address + shutdown ! interface GigabitEthernet7 no ip address + shutdown ! interface GigabitEthernet8 - description "{{ hostname }} gigabitEthernet2 <--> gigabitEthernet1 LAB-RELAY" + description "{{ hostname }} GigabitEthernet8 <--> gigabitEthernet1 LAB-RELAY" ip address 10.0.0.3 255.255.255.254 + ip ospf network point-to-point + ip ospf 1 area 0 duplex auto speed auto no shut ! interface Vlan1 no ip address + shutdown +! +interface Vlan10 + ip address 10.0.0.5 255.255.255.254 + ip ospf network point-to-point + ip ospf 1 area 0 ! interface Vlan20 - ip address 10.0.0.5 255.255.255.254 -! -interface Vlan30 ip address 10.0.0.7 255.255.255.254 + ip ospf network point-to-point + ip ospf 1 area 0 +! +router ospf 1 + router-id {{ loopback_ip }} + passive-interface Loopback0 ! ip forward-protocol nd no ip http server @@ -175,7 +191,7 @@ mgcp profile default ! ! ! -! +ip route 192.168.0.0 255.255.255.0 10.0.0.2 ! ! ! diff --git a/provisioning/templates/junos.j2 b/provisioning/templates/junos.j2 index 906b46c..3552c2f 100644 --- a/provisioning/templates/junos.j2 +++ b/provisioning/templates/junos.j2 @@ -54,7 +54,7 @@ security { } interfaces { ge-0/0/0 { - description "{{ hostname }} ge-0/0/0 <--> gigabitEthernet0 LAB-RELAY"; + description "{{ hostname }} ge-0/0/0 <--> GigabitEthernet0 LAB-RELAY"; unit 0 { family inet { address 10.0.0.1/31; @@ -62,7 +62,7 @@ interfaces { } } ge-0/0/1 { - description "{{ hostname }} ge-0/0/1 <--> gigabitEthernet1 LAB-897VA"; + description "{{ hostname }} ge-0/0/1 <--> GigabitEthernet1 LAB-897VA"; unit 0 { family inet { address 10.0.0.4/31; @@ -70,7 +70,7 @@ interfaces { } } ge-0/0/2 { - description "{{ hostname }} ge-0/0/2 <--> gigabitEthernet2 LAB-897VA"; + description "{{ hostname }} ge-0/0/2 <--> GigabitEthernet2 LAB-897VA"; unit 0 { family inet { address 10.0.0.6/31; @@ -86,6 +86,22 @@ interfaces { } } protocols { + ospf { + area 0.0.0.0 { + interface ge-0/0/0.0 { + interface-type p2p; + } + interface ge-0/0/1.0 { + interface-type p2p; + } + interface ge-0/0/2.0 { + interface-type p2p; + } + interface lo0.0 { + passive; + } + } + } lldp { interface all; }