Nexus switches are quite different from normal CISCO switches as they are robust, offer wide variety of features and most importantly are feature based. Now by feature-based I mean is that only basic set of switching functionality is turned-ON by-default. Advance features or the features that were deemed to be an overhead on a Switch's CPU (if not used) are OFF by-default.
We'll start with the basics, going through the initial setup
process of Nexus switches, including configuring management interfaces,
setting up VLANs, and establishing basic connectivity.
Today's agenda
is as per below. We will used following topology to configure these
parameters but you are free to modify as you find it fit.
Right
out of the box, we need to go through following to be able to access
switch. Unlike non-NX-OS switches, Nexus has an admin account to access
to. To get into enable mode of the switch, we need to following the
following.
Accessing and Initializing admin Password
Abort Power On Auto Provisioning (POAP)
[yes - continue with normal setup, skip - bypass password and basic
configuration, no - continue with Power On Auto Provisioning]
(yes/skip/no)[no]: yes
Disabling POAP.......Disabling POAP
---- System Admin Account Setup ----
Do you want to enforce secure password standard (yes/no) [y]: yes
Enter the password for "admin": Cisco@123
Confirm the password for "admin": Cisco@123
Remember, we mentioned that Nexus offers wide variety of features. So, one that makes a life of a Network Engineer/administrator is the use of Alias.
Alias
is a way of making long or frequent use commands shorter. Rather than
typing whole command all the time to get a result we can lessen it by
using following commands in config terminal mode.
Aliases
cli alias name NAME_OF_THE_ALIAS COMMAND_TO_BE_SHORTENED.
e.g.,
cli alias name sintb sh interface brief
Keep in mind that alias should not conflict with any cisco's actual command.
Similarly, there are features that defines/enables certain functionalities of the device e.g., LACP
Command to show all feature is
switch(config)# show featureTo enable few feature, we can use following
feature interface-vlan
feature ospf
feature vtp
feature lacp
feature telnetserver
Nexus also offers Module that can be used to extend Nexus' fabric.
command to see module is as follow
show module
We have the leverage of using Checkpoint and Rollback, just in case our new configuration is not working as expected or causing network hiccups, we can always revert to that configuration that was working properly. Previously, we had to restore working configuration and if new does not work, we restore that configuration. Hey but not anymore. We just have to create a checkpoint that defines that everything is working fine till here. To do that we need to parse following command.
checkpoint NAME_OF_THE_CHECKPOINT
e.g.,
switch(config)# checkpoint HasnainZaidi-2023
Done
And to Rollback to this checkpoint, we just have to put following
rollback running-config HasnainZaidi-2023 (where HasnainZaidi-2023 is the name of the checkpoint)
All Ethernet port whether Ethernet, FastEthernet, GigaEthernet etc are denoted as Ethernet in Nexus.
In
Nexus, there is no need to mentioned range while selecting multiple
ports, if we parse right range format of interfaces, nexus can
understand and select that range intelligently.
Configuring Trunk or VLANs is as same as other OS of Cisco
Configuring Trunking
NX-01
Interface E 1/1-4
switchport mode trunk
switchport trunk allowed vlan 10-20
NX-02
Interface E 1/1-4
switchport mode trunk
switchport trunk allowed vlan 10-20
NX-03
Interface E 1/1-4
switchport mode trunk
switchport trunk allowed vlan 10-20
Configuring VLANs and Access Ports
NX-01
vlan 10,20
Interface E1/5-6
switchport access vlan 10
Interface E1/7-8
switchport access vlan 20
NX-02
vlan 10,20
!
Interface E1/5-6
switchport access vlan 10
!
Interface E1/7-8
switchport access vlan 20
NX-03
vlan 10,20
Interface E1/5-6
switchport access vlan 10
Interface E1/7-8
switchport access vlan 20
Configuring Port-Channels - Manual
Port
Channels in Nexus is bit different than IOS based as in Nexus there is
no PAGP support. And if we just enable channel group with specifying
active/passive the port channel will be considered as ON and will not
negotiate. To enable LACP, we have to enable feature by using following
command.
NX-02
Interface E 1/3-4
channel-group 34
Interface Port-channel34
switchport mode trunk
port-channel load-balance src-dst ipNX-03
default Interface E1/3-4
Interface E 1/3-4
channel-group 34
Interface Port-channel34
switchport mode trunk
Same as IOS, port-channel's number should not be identical on both sides. Numbers are independent of the negotiation factor.
Configuring Port-Channels - LACP
NX-01
Since
we configured port channels without specifying who is Active and who is
passive, therefore its a wise decision to remove all the configuration
on particular interfaces by using following command.
default Interface E1/3-4
this will make these interfaces as default. Notice,we use range of interfaces.
feature lacp
Interface E 1/1-2
channel-group 12 mode active
Interface Port-channel12
switchport mode trunk
Interface E 1/3-4
channel-group 13 mode active
Interface Port-channel13
switchport mode trunk
NX-02
feature lacp
Interface E 1/1-2
channel-group 12 mode active
Interface Port-channel12
switchport mode trunk
NX-03
feature lacp
Interface E 1/1-2
channel-group 13 mode passive
Interface Port-channel13
switchport mode trunk