Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

60b391e0a7db6 - 1622381024 - Nexus Workbook Ver 1 7 Networkchap Com

Download as pdf or txt
Download as pdf or txt
You are on page 1of 100

NETWORKCHAP.

COM
Ashish

Lab 1: Verifying License and Features in NX-OS

1. What are the commands to check licenses in NX-OS ?


Ans - show license brief, show license usage, show license

2. How to check the unique host id of the nexus switch?


NETWORKCHAP.COM
Ashish

3. What is the way to find the license file in bootflash directory?


Ans – License file has extension of .lic

4. What is the way to install the license?

5. How to copy the license file?

6. How to backup the installed license files?

7. How to extract the .tar file in case we want to install the licenses?
NETWORKCHAP.COM
Ashish

8. How to uninstall or clear the license from the Nexus Switch?

9. How to update the existing license on cisco nexus switch?

Ans - update bootflash:NEW-FILE-NAME.lic EXISTING-FILE.lic


NETWORKCHAP.COM
Ashish

Here License update failed because I did not have updated license. Purpose is to show how
this command runs. Once you have new updated license file, then you will see positive
result.

10. How to enable grace period?

11. How to verify and enable the features in NX-OS?


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

12. How to verify and enable the feature-set in NX-OS?


NETWORKCHAP.COM
Ashish

Lab 2 : Basic Functions of Cisco Nexus


1. What is the command to check the interface status?
NETWORKCHAP.COM
Ashish

2. What is the command to check VRF?

3. How to verify whether Telnet service is enabled or disabled? Is it enabled by default? How to
enable it ?
Ans: Telnet is disabled by default and SSH is enabled by default.
NETWORKCHAP.COM
Ashish

4. How to verify SSH status? How can we check what key is being used in SSH in NX-OS?

5. Change the SSH RSA keys from 1024 to 2048

Ans: You need to disable the SSH feature in order to change the key, later you can enable it. To
be able to do so, you can either console nexus switch or do telnet. Pay attention to below
command
NETWORKCHAP.COM
Ashish

6. How to check existing usernames created in the system? Also, create one user and show the
criteria required for setting up password. Use the role “network-operator”

7. Are usernames case-sensitive? Prove it.

8. How to check the model of the chassis?

9. How to check kickstart and system image running on Nexus 5K and 7K?
NETWORKCHAP.COM
Ashish

10. How to save the configuration on Nexus Switches?


Ans - The only way is to use “copy run start” command. Here “write memory” does not work

11. Does “Write memory” work?

12. How to view the current and saved configuration on Nexus?

Ans : Command is same as traditional switches

13. How to erase the startup configuration?

14. What are the spanning-tree modes supported in NX-OS?

15. How to setup “exec-timeout” and limit “max-sessions” on Nexus 5k and 7k switches?
NETWORKCHAP.COM
Ashish

16. Do we need to use the “do” command in configuration mode to run the commands of privilege
mode?
Ans : It is not required.

However, “do” command works as well.

17. What is the way to reload nexus switch?


NETWORKCHAP.COM
Ashish

Lab 3 : Port Profiles in NX-OS


1. What is the first step in creating port-profile?
Ans : Define the “port-profile type” else default type will be set to “ethernet”.

2. How to activate Port-Profile in NX-OS?


NETWORKCHAP.COM
Ashish

3. Enter the commands you want to configure in Port-Profile named “Ashish”

4. How to attach the Port-Profile to the Interfaces?

5. How to verify if the Interfaces received the configuration or not?

6. Is Port-Profile Event Driven?

Before
NETWORKCHAP.COM
Ashish

After making changes in port-profile, you will see that command is run immediately

7. How to change the Port-Profile Type?

Ans : You can not edit the “port-profile type”. You can delete the file and recreate it.

Lab 4 : Configuring FEX with Nexus 5k


NETWORKCHAP.COM
Ashish

1. What is the way to enable the FEX feature in Nexus?

2. How to verify whether FEX module is getting discovered or not in Parent Switch?

3. How to check the status of the Interface connected to FEX module?

4. How to configure FEX and Static Pinning?

5. Configure the Interfaces which are connected to FEX i.e. Fabric Extender?
NETWORKCHAP.COM
Ashish

6. Verify the FEX on Parent Switch?


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

7. Check the Interfaces of FEX i.e. the front panel ports.


NETWORKCHAP.COM
Ashish

8. Since the front panel ports are mapped with the Parent Switch's interfaces which connect to
FEX, so what will happen if that interface goes down.
Ans – Front Panel Ports of FEX will go down.
NETWORKCHAP.COM
Ashish

9. What is the way we can redistribute or re-map front panel port to other Interface of Parent Fex-
fabric?
NETWORKCHAP.COM
Ashish

Above would have transferred the ownership to the other port if it was configured. So, better
solution is that you use port channel with pinning as 1.

10. Now, use the port channel instead of individual interface

11. Verify whether FEX is working when we used Port channel?


NETWORKCHAP.COM
Ashish

12. Can we use max-pinning as more than one with Port-channel?

Ans – No, we can’t . See below


NETWORKCHAP.COM
Ashish

13. Does LACP work while forming Ether-channel with FEX?

Ans – No. See below.

14. What happens when one FEX is connected to two parent switches?

Ans - It will be managed from single parent unless we have advanced port channel configured i.e.
Virtual Port-Channel aka vPC.

See this. It is working from N5K-1

While it is struck in discovered phase on another parent switch 5K-2.


NETWORKCHAP.COM
Ashish

Lab 5 : Configuring vPC (Virtual Port Channel)

1. Enable vPC feature on Both Nexus 7K-1 and 7K-2 vPC peers.
NETWORKCHAP.COM
Ashish

2. Configuring VRF and management IP addresses on VPC Peers for Peer-Keepalive.

Switch N7K-1

Switch N7K-2
NETWORKCHAP.COM
Ashish

We configured 30.1.1.1 on Eth3/1 Switch N7K-1 and 30.1.1.2 on Eth3/9 Switch N7K-2

3. Test IP connectivity between vPC peer switches.


NETWORKCHAP.COM
Ashish

4. Setting up vPC domain and vPC Peer Keepalive.

In above, we had to define the destination and source IP Addresses with vrf “keepalive” which we
created in Step 2.
NETWORKCHAP.COM
Ashish

5. Verification of vPC Peer Keepalive Link i.e. the Layer 3 Link.


NETWORKCHAP.COM
Ashish

6. Configure vPC Peer-Link between Peers . Note it must be 10 G link.

Switch 7K-1
NETWORKCHAP.COM
Ashish

Switch 7K-2

Note : “vpc peer-link” command works only under Port-Channel. You can’t configure it on physical
interface

7. Moving Member Ports in to vPC on Peer Switches and Configure Port-Channel on Nexus 5K.
NETWORKCHAP.COM
Ashish

8. Verify the vPC operation on all three Nexus Switches.


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

Till now, you can see that vPC peer-link is up which is layer 2, vPC keepalive link is up which is a layer
3 link, vPC status is also reflecting as up which means our configuration is correct.

9. Check the Status of Port-Channel on Nexus 5K-1 which is a downstream switch.


NETWORKCHAP.COM
Ashish

10. Check Port-Channel status on vPC peer Switches i.e. Nexus 7K-1 and 2.
NETWORKCHAP.COM
Ashish

Above outputs of port-channels show that port status is P which means UP and working.

11. Verify the consistency parameters on vPC Peer Switches.


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

This above command is very helpful in order to match the configuration of your switch with vPC
peer switch. If there is inconsistency, you will not see vPC status as up.

12. Verify the vPC role on Peer Switches.


NETWORKCHAP.COM
Ashish

Though, you will see vPC Primary and Secondary roles, but vPC always work in Active-Active. These
roles come in picture when peer-link is down so that Switch with Secondary role can suspend
member ports to avoid vPC loops.

Lab 6 : Configuring multiple vPCs (Virtual Port Channel)


NETWORKCHAP.COM
Ashish

It is very similar to what we did in Lab 5. It is just that we have one additional switch i.e. 5K-2 in this
topology. We need not do any change w.r.t configuration of vpc domain, vpc peer keepalive, vpc
peer link. We simply need to configure the downstream ports of vpc peer switches connected to
new switch 5K-2 and move these in to vpc 2. Along with that we need to configure 5K-2 ports.

Here I will show you the additional configuration required for setting 5K-2. Rest of the configuration
is totally same as Lab 5.

1. Configuration of member ports of peer switches which are connected to switch Nexus 5K-2.
NETWORKCHAP.COM
Ashish

2. Configuration of ports on 5K-2 which are connecting to Peer Switches 7K-1 and 7K-2
NETWORKCHAP.COM
Ashish

3. Verifying port-channels on Nexus switches 7K-1, 7K-2, 5K-2.


NETWORKCHAP.COM
Ashish

4. Verifying vPC 2 i.e. the additional vPC. Here we have two vPCs 1 & 2
NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

Above output of Switches N7L-1 and 2 show two vPCs. It means that now, we have multiple vPCs
configured between Peer Switches.

Lab 7 : Case Study in vPCs (Virtual Port Channel)


NETWORKCHAP.COM
Ashish

1. What happens when vPC peer-link goes down but vPC keepalive is up?

In above snapshot, we shutdown the Peer-Link Interface at N7K-1 switch.


NETWORKCHAP.COM
Ashish

Above you can see that vPC peer-link status is showing as down while vPC status is up and
consistency is success.
NETWORKCHAP.COM
Ashish

In above output, you can see that member ports are suspended on N7K-2 as this is secondary switch.
This happened to make sure that there is no impact to vPC traffic and operation. In this scenario, we
kept the peer-keepalive link up while peer-link was shutdown.
NETWORKCHAP.COM
Ashish

2. What happens when peer keepalive is down, but peer link is up?

Here we shutdown the Interface Eth3/1 since it is keepalive link while Eth3/2 is peer-link which is up.
NETWORKCHAP.COM
Ashish

Above you can see that vPC Peer-link is up , Peer-Keepalive is shutdown and there is no impact to vPC
operations because vPC status is up and successful.

You need to wait for 30 seconds to see the correct vPC status after enabling the peer-link because it was
intentionally shutdown by us in previous case study.

So, there is no impact to operation at all when keepalive is down while peer-link is up because vPC
status is showing as up.

Lab 8 : FabricPath Configuration


NETWORKCHAP.COM
Ashish

1. Install and activate the feature-set of fabricpath.

Nexus 5K-1
NETWORKCHAP.COM
Ashish

Nexus-5k-2

Nexus 7K Default VDC– Here you need to make sure that Default VDC has this license installed. Only
then you will be able to initialize feature-set of fabricpath on other VDCs.

Nexus 7K-1
NETWORKCHAP.COM
Ashish

Nexus 7K-2

2. Enable fabricpath on Interfaces of all four nexus switches. Note that Only F Series Module Ports
can be used for enabling fabricpath.

Nexus 7K-1

Nexus 7K-2

Nexus 5K-1

Nexus 5K-2
NETWORKCHAP.COM
Ashish

3. Verify the status of Interfaces which are now in “fabricpath” mode.

You will note that the status of ports has changed to “f-path”.

4. Configure a vlan 222 and move it in fabricpath.

Nexus 5K-1
NETWORKCHAP.COM
Ashish

Nexus 5K-2

Nexus 7K-1

Nexus 7K-2

5. Verify the status of Spanning-Tree for Vlan 222 and mode of Vlan 222.
NETWORKCHAP.COM
Ashish

You will see spanning-tree status for vlan 222 on switch which will have both fabricpath domain and
classical ethernet domain. You will see more when you connect Hosts on Switches.

6. Verify the status of ISIS in Fabricpath.

ISIS is automatically enabled when we configure fabricpath on interfaces.


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

7. Check the status of fabricpath switch-id on each device.


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

8. Check the Fabricpath Routing Table.


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

9. Change the FabricPath Switch-ID.

Remember that Switch-ID is unique in the environment. Initially it is automatically assigned by Switch.
However, it can be changed.

Nexus 7K-1

Nexus 7K-2
NETWORKCHAP.COM
Ashish

Nexus 5K-1

Nexus 5K-2

10. Verify whether Nexus 7K-1 learnt new Switch-IDs or not.


NETWORKCHAP.COM
Ashish

Now, we can see that new Switch-IDs are visible. We can understand the fabricpath routing table with
ease due to change in switch-id.

11. Test the Host connectivity in FabricPath

Setup Hosts Server 1( 10.1.1.1/24) and Server 2(10.1.1.2/24)


NETWORKCHAP.COM
Ashish

Server 1 is connected to Nexus 5K-1 on Port Eth1/18. Configure it in Vlan 222 (Fabricpath Vlan)

Now, configure the host Server1 with the IP 10.1.1.1/24. Note that Switch 7K-3 is acting as Server 1
Host.

Server 2 Host is connected to Switch 7K-2 on port 3/11. Configure it in vlan 222 (Fabricpath Vlan)

Configure the IP 10.1.1.2/24 on Server 2 . Here 7K-4 Switch is acting as Server 2.


NETWORKCHAP.COM
Ashish

Here we need to make sure that both Leaf Switches act at Root Bridge for Vlan222. We should setup the
same priority on both Leaf switches.

Here Switch 5K-1 is one leaf and 7K-2 is second leaf switch. Setup the priority 8192 on both Leaf
switches and check the spanning-tree status for Vlan222.
NETWORKCHAP.COM
Ashish

Test the Ping connectivity


NETWORKCHAP.COM
Ashish

Traceroute from Server 1 to 2 and vice-versa.

Check the mac-address-table on all four switches.


NETWORKCHAP.COM
Ashish

You can see above that Switches N7K-1 and 5K-2 are not learning the mac addresses of Server 1 and
Server 2 due to conversational mac-address learning. However, other two switches will learn the mac
addresses which you can see below.

You can see above that Nexus 7K-2 is learning the mac-address of Server 1 from Switch with Switch-ID
51 which belongs to N5K-1.

You can see above that Nexus 5K-1 is learning the mac-address of Server 2 from Switch with Switch-ID
72 which belongs to N7K-2.

Also, In Fabricpath, all switches will be part of only area 0. No scope of multiple areas. Since Fabricpath
uses ISIS so it has AD 115.

Lab 9 : Configuring SPAN on Nexus 5K Switch


SPAN means Switched Port Analyzer . It is used for copying the Rx/Tx traffic of one port/Vlan and pasting
NETWORKCHAP.COM
Ashish

it on other interface where you have server connected which can capture it using Wireshark or Ethereal
software. Purpose is for analyzing and monitoring. In this both source and destination ports should be
part of same switch or VDC.

1. Verify the status of Source and Destination port before configuring it for SPAN.

2. Setup Destination port in “Monitor” mode.


NETWORKCHAP.COM
Ashish

3. Setup SPAN monitor session in Nexus 5K Switch.

4. Verify SPAN monitor session.


NETWORKCHAP.COM
Ashish

Above you can see that SPAN is correctly configured and showing as up.

5. Now, add one more source in SPAN. Add vlan 1 and 222 so that traffic of these two Vlans get
copied to same destination port.

6. Verify the SPAN session.


NETWORKCHAP.COM
Ashish

7. Limit the MTU of source frames to 200 Bytes instead of copying the complete frame.
NETWORKCHAP.COM
Ashish

Kindly note that You will see more options in SPAN when you configure in Nexus 7K such as filtering
bpdu traffic etc.

I did this test on Nexus 5K. Functionality is same and configuration is really simple.

Lab 10 : Configuring ERSPAN on Nexus 7K Switch


NETWORKCHAP.COM
Ashish

ERSPAN Stands for Encapsulated Remote Switched Port Analyzer. It means Your Source port and
destination port will be part of different switches and these switches will be separated by Layer 3. It is
advanced state of Remote SPAN. Purpose is to copy the traffic from source to destination server for
analyzing logs using Wireshark or Ethereal software.

ERSPAN uses GRE tunnel in background to transfer traffic from source switch to destination.

Kindy Note that If you are using Nexus 7K for ERSPAN then you need to configure one ERSPAN command
in Admin VDC. While It is not required in case you are using 5K switches for ERSPAN.

1. Configure ERSPAN configuration on Nexus 7K-1, Nexus 7K-2 and Admin VDC.

On Nexus 7K-1 - Source SPAN


NETWORKCHAP.COM
Ashish

On Nexus 7K ( Admin VDC)- Very Important step to know

On Nexus 7K-2 – Destination SPAN


NETWORKCHAP.COM
Ashish

2. Test the Ping connectivity between Nexus 7K-1 and 2.


NETWORKCHAP.COM
Ashish

3. Verify ERSPAN monitor session on Nexus 7K-1 and 2.


NETWORKCHAP.COM
Ashish

4. Verify whether the Traffic from Source Port at Nexus 7K-1 is being copied to Destination Port of
Nexus 7K-2?
NETWORKCHAP.COM
Ashish

You can notice above that Source Traffic gradually increased.


NETWORKCHAP.COM
Ashish

Now, in above snapshot you can clearly see that destination port started receiving the traffic which
increased proportionately . It means that ERSPAN was correctly configured.

Source Traffic include Rx and Tx. Therefore, Destination Port received double traffic .

Lab 11 : Configuring RSPAN on Nexus 7K Switch


NETWORKCHAP.COM
Ashish

RSPAN stands for Remote Switched Port Analyzer. It is used when our Source port
is on one switch and destination port is on another switch, provided both switches
are part of same LAN.
Here we need to use a vlan 55 aka remote-vlan, we need to make E3/1 as
destination monitoring port on and source port as E3/5 on switch 1.
We need to configure port 3/9 of switch 2 in vlan 55 and then need to make vlan
55 as remote-vlan with a command. Port e3/16 will be destination port.
You will notice that RSPAN configuration is bit different in Nexus as compared to
catalyst switches. In catalyst switches, we used to make remote vlan as destination
monitoring on switch 1 and then same remote vlan as source on switch 2. In nexus,
this is not the case, It will work as below.
1. Configure Nexus Switch 1 and 2 with RSPAN configuration.
Nexus 7K-1
NETWORKCHAP.COM
Ashish

Nexus 7K-2

2. Verify the monitor session 1 on both nexus 7k-1 and 7k-2

On Nexus 7K-1
NETWORKCHAP.COM
Ashish

On Nexus 7K-2

3. Now, generate traffic on Interface e3/5 of N7K-1 and see whether it is being copied to N7K-2
interface e3/16?

Source Port
NETWORKCHAP.COM
Ashish

Destination Port
NETWORKCHAP.COM
Ashish

Above you can see that traffic got copied.

Lab 12 : Setting Checkpoints in Nexus Switches


Whenever you do configuration change on nexus switches, it is recommended that you set up
checkpoint so that you can return to the last saved configuration if situation demands. It basically copies
the running config to temporary file . This file will be deleted when reload happens.

1. Create one checkpoint.


NETWORKCHAP.COM
Ashish

2. Verify the checkpoint.

3. Make some changes in the nexus switch now.

4. Now, find out what changes were made since the creation of previous checkpoint CP1
NETWORKCHAP.COM
Ashish

Above you can see the difference of configuration from last saved checkpoint CP1. Note that maximum
10 checkpoints can be created.

Global changes which are done at Admin VDC level can't be recovered using Checkpoint.

5. How to delete the checkpoint?

6. How to Rollback to the previously set checkpoint? Create one checkpoint CP1 and make some
changes and then verify the difference of config.
NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

now, let’s Rollback the configuration to checkpoint CP1.

Now, check if we have Vlan333 available as well as feature interface-vlan ?

Above, you can see that changes were reverted due to rollback command. Rollback command does not
delete the checkpoint file. It only deletes the content of the file. You can create multiple checkpoints
and compare these.

7. Create multiple checkpoints and compare the configuration changes in the checkpoint using
some comparison method.
NETWORKCHAP.COM
Ashish

Now, let’s check the difference using “show diff” command


NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish
NETWORKCHAP.COM
Ashish

Above, you can see the difference in configuration between checkpoints.

Lab 13 : Use Wireshark to Nexus Switches


1. Capture the control plane traffic on Nexus 7000.

Above command will capture the incoming and outgoing packets of CPU . By default, it captures 10
packets.

2. Capture only the incoming packets of CPU.

3. Capture the outbound CPU traffic ( only 4 packets). Command is "limit-captured-frames "
NETWORKCHAP.COM
Ashish

4. Filter the traffic of host 50.1.1.1 which is being sent and received by CPU , but only 13 packets.

5. Filter the traffic for Network 50.1.1.0/24.

Note, Above, you can use the keyword "mask 255.255.255.0" instead of /24

6. Now, filter using source ip 50.1.1.2


NETWORKCHAP.COM
Ashish

7. Filter using Destination ip 50.1.1.1.

8. Filter using port 1985

9. Filter using port range 20 till 23.


NETWORKCHAP.COM
Ashish

10. Filter using port tcp 443.

11. Open the detail of any packet you captured.


NETWORKCHAP.COM
Ashish

12. How to save this file?


NETWORKCHAP.COM
Ashish

13. How to read this file?

By default, it displays 10 packets

In above, you can use the keyword detail to open the detail of the packet

14. Filter the ip. 50.1.1.2 from the capture file “capture-ashish”
NETWORKCHAP.COM
Ashish

15. Display the conversation between the source ip 50.1.1.1 and destination ip 50.1.1.2 from the
capture file “capture-ashish”.

16. Display traffic from source 50.1.1.1 having tcp port 443 from the capture file “capture-ashish”

17. Copy the file “capture-ashish” to tftp server 50.1.1.2.

You might also like