Cisco Nexus Template

From RoseWiki
Jump to navigation Jump to search
! Set up hostname, management 
hostname examplehostname

! Some optional features we assume you'll want
no feature telnet
feature scp-server
feature interface-vlan
feature dhcp
feature lldp

! Management interface (Nexuses have dedicated gigabit ports for management
interface mgmt0
  vrf member management
  ip address 192.168.10.10/24

! Here we define the router we want our management VRF to use as its gateway. 
vrf context management
  ip route 0.0.0.0/0 192.168.10.1

! Set domain information  
ip domain-lookup
ip domain-name your-local-domain-here
ip name-server 192.168.10.1 use-vrf management

! Setup Network Time Protocol
ntp server 0.north-america.pool.ntp.org
ntp server 1.north-america.pool.ntp.org
ntp server 2.north-america.pool.ntp.org
ntp server 3.north-america.pool.ntp.org

! This is optional, but if you're used to IOS' wr to save configs, this lets you use that same phrase.
cli alias name wr copy run start

! Set up users
username AdminUser password 5 supersecretadminpassword role network-admin

! Example vlan. Note that we're just setting a description.
vlan 10
  name LAN_Management_192.168.10.0/24

! Example vlan interface
interface vlan 10 
    description Management_Address
    ip address 192.168.10.2/24
    vrf member management 
    no shutdown
    no ip redirects
    
! Enables management
line console
line vty
copy running-config startup-config