forked from sonic-net/sonic-mgmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharista_7060_deploy.j2
More file actions
95 lines (93 loc) · 2.35 KB
/
arista_7060_deploy.j2
File metadata and controls
95 lines (93 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
!
no errdisable detect cause link-flap
!
no schedule tech-support
!
transceiver qsfp default-mode 4x10G
!
no lldp run
!
hostname {{ inventory_hostname }}
!
ntp source vrf management Management1
{% for ntp_server in ntp_servers %}
ntp server vrf management {{ ntp_server }}
{% endfor %}
!
spanning-tree mode none
no spanning-tree vlan {{ device_vlan_range | list | join(',') }}
!
aaa authorization exec default local
aaa root secret 0 {{ lab_admin_pass }}
!
username admin privilege 15 role network-admin secret 0 {{ lab_admin_pass }}
username eapi privilege 15 secret 0 {{ lab_admin_pass }}
!
vlan {{ device_vlan_range | list | join(',') }}
!
vrf definition management
rd 1:1
!
{% for i in range(1,33) %}
{% set intf = 'Ethernet' + i|string + '/1' %}
interface {{ intf }}
{% if intf in device_port_vlans and device_port_vlans[intf]['mode'] != "Trunk" %}
description {{ device_conn[intf]['peerdevice'] }}-{{ device_conn[intf]['peerport'] }}
switchport access vlan {{ device_port_vlans[intf]['vlanids'] }}
switchport mode dot1q-tunnel
spanning-tree portfast
speed forced 100gfull
no shutdown
{% elif intf in device_port_vlans and device_port_vlans[intf]['mode'] == 'Trunk' %}
description {{ device_conn[intf]['peerdevice'] }}-{{ device_conn[intf]['peerport'] }}
switchport mode trunk
switchport trunk allowed vlan {{ device_port_vlans[intf]['vlanids'] }}
spanning-tree portfast
speed force 40gfull
no shutdown
{% else %}
shutdown
{% endif %}
!
{% endfor %}
!
interface Management 1
description TO LAB MGMT SWITCH
vrf forwarding management
ip address {{ device_info["ManagementIp"] }}
no shutdown
!
# LACP packets pass through
mac address-table reserved forward 0180.c200.0002
# LLDP packets pass through
mac address-table reserved forward 0180.c200.000e
!
ip route vrf management 0.0.0.0/0 {{ device_info["ManagementGw"] }}
!
ip routing
no ip routing vrf management
!
banner login
NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
Unauthorized access and/or use prohibited. All access and/or use subject to monitoring.
NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
EOF
!
management api http-commands
vrf management
no shutdown
!
management api http-commands
no protocol https
protocol http
no shutdown
!
management console
idle-timeout 60
!
management ssh
idle-timeout 60
authentication mode password
!
!
end