10
!"##$%& () * +$,#-./ 0"1-2 !3$#45 6% 76-, 8.)#6) "# $%&' ()*+,- .%/ 0120 3&4 5%66%)7'8 79 8%7'8 ,% *66%) #%: ,% 4;<6%+4 ,&4 .4;:9 =%>>*'? 67'4 7',4+5*=4 5+%> #%:+ %)' @A %+ B*=C 3&79 <+%=499 )766 '%, =+4*,4 * 5:66# 5:'=,7%'7'8 .4;:9 9)7,=&C D%+ E4>%'9,+*,7%' <:+< %949F %:+ 4;*><649 )766 :94 GBH*+4 )%+I9,*,7%' *9 %:+ /7+,:*67-*,7%' 4'/7+%'>4',C J%: =%:6? :94 D:97%'F G7+,:*6 "%;F K(L7F %+ *'# %,&4+ /7+,:*6 4'/7+%'>4',C 3&4 /7+,:*6 >*=&7'4 )4 *+4 =+4*,7'8 )766 M4 +:''7'8 ,&4 A79=% .4;:9 2111/ 9%5,)*+4C 3&4 2111/ 79 * /7+,:*6 9)7,=& ,&*, )4 )766 ?79=:99 7' ?4,*76 *, * 6*,4+ <%7',C 3&4 57+9, ,&7'8 )4 '44? ,% ?% 79 ,% ?%)'6%*? ,&4 .4;:9 2111/ 5+%> A79=%C 3&79 +4N:7+49 * 5+44 A79=% 6%87 'C (4*+=& ,&4 )4M97,4 5%+ O' 4;:9 2111/ ?%)'6%*?O *'? '*/78*,4 ,&4 9%5,)*+4 9464=,7%' <+%=499C 3&4 57'*6 57 64 '*>4 )766 /*+# M*94? %' ,&4 /4+97%' ':>M4+C P'=4 ?%)'6%*?4?F :' -7< ,&4 *+=&7/4 7',% 7,9 %)' 5%6?4+C 3&4 5%6?4+ %5 7',4+49, 7 9 =*664? G(B QG7+,:*6 (:<4+/79%+ B%?: 64RC H&4' =+4*,7'8 ,&4 G7+,:*6 B*=&7'4 #%: )766 <%7', ,% ,&4 S(P 7'97?4 ,&4 G(BTS'9,*66 ?7+4=,%+#C D%+ K;*><64U .4;:92111/CVC0C2C(G0C2C2TG(BTS'9,*66T'4;:9W2111/CVC0C2C(G0C2C2C79%C

Setting Up a Virtual Nexus Switch on Your Laptop

Embed Size (px)

DESCRIPTION

Setting Up a Virtual Nexus Switch on Your Laptop

Citation preview

  • Setting Up A Virtual Nexus Switch on your Laptop By John Swartz Nov 2012 The following is going to allow you to explore the Nexus command line interface from your own PC or Mac. This process will not create a fully functioning Nexus switch. For Demonstration purposes, our examples will use VMWare workstation as our virtualization environment. You could use Fusion, Virtual Box, ESXi, or any other virtual environment. The virtual machine we are creating will be running the Cisco Nexus 1000v software. The 1000v is a virtual switch that we will discuss in detail at a later point. The first thing we need to do is to download the Nexus 1000v from Cisco. This requires a free Cisco login. Search the website for 'nexus 1000v download' and navigate the software selection process.

    The final file name will vary based on the version number. Once downloaded, unzip the archive into its own folder. The folder of interest is called VSM (Virtual Supervisor Module). When creating the Virtual Machine you will point to the ISO inside the VSM\Install directory. For Example: Nexus1000v.4.2.1.SV2.1.1\VSM\Install\nexus-1000v.4.2.1.SV2.1.1.iso.

  • Creating the Virtual Machine Launch VMWare workstation and create a new virtual machine with the following characteristics.

  • Select Other 64-Bit. Click Next. Give the Virtual machine a name and click Next. Accept the default Disk Capacity setting and click next.

  • Click Customize hardware, we must add two additional network adapters.

  • Click next and then click Finish. Make sure you select bridging as the mode for each adpater. Complete this process twice. The virtual machine should have a total of 3 Network adapters when you are done.

    Change the amount of memory to at least 1 GB.

  • Click Close and then Finish.

    You have now created a virtual machine with the needed properties to install the Nexus 1000v VSM. Select your virtual machine and power it on.

  • Installing Nexus 1000v VSM When the virtual machine launches select "Install Nexus1000V and bring up the new image".

    After awhile, it will Enter Setup mode. Please answer as below. Note: You will need to create a password for the Admin user. It must be complex (Contain mixed letters and numbers like: C1sco123) [#########################################] 100% ---- Basic System Configuration Dialog ---- This setup utility will guide you through the basic configuration of the system. Setup configures only enough connectivity for management of the system. *Note: setup is mainly used for configuring the system initially, when no configuration is present. So setup always assumes system defaults and not the current system configuration values. Press Enter at anytime to skip a dialog. Use ctrl-c at anytime to skip the remaining dialogs.

  • Would you like to enter the basic configuration dialog (yes/no): yes Enter HA role[standalone/primary/secondary]: standalone Enter the domain id: 1 [########################################] 100% switch(config)# Tada! You now have a Nexus switch to play with! Basic Switch Configuration In this next section, we are going to configure some basic parameters to make our Nexus Switch operational. But, before we do that we need to understand how the Nexus switch handles management traffic. On a typical IOS switch, we create a separate VLAN for management traffic and that traffic flows through one of data ports. This allows for the isolation of management traffic. The Nexus series took this one step farther. Instead of virtual isolation via a VLAN, they have physical isolation with a dedicated management port.

    MGMT0 or Management Port 0 is our primary method of configuring our Nexus remotely. It is separate from the data ports. It has its own IP address and IP routes. Nexus switches have the ability to create isolated instances of routing tables and more. We will see this when we discuss Virtual Device Contexts (VDC). A typical list of initial configuration tasks to enable basic management: Set the Host name Put an IP address n MGMT0 Enable MGMT0 Disable Telnet Enable SSH

  • Enable HTTP Server Some of these are default setting, but it is still good practice. When you first login into the switch you notice you are immediately place in privilege mode: login as: admin Nexus 1000v Switch Using keyboard-interactive authentication. Password: [...] switch# To enter configuration mode the command is "configure terminal" (Sound familiar?). So let's set the hostname in this "familiar" environment. Nexus# config t Enter configuration commands, one per line. End with CNTL/Z. Nexus(config)# hostname LilNexus LilNexus(config)# switchname LilNexus LilNexus(config)# end LilNexus# We see the familiar 'hostname' command, but also the much less familiar 'switchname' command, they both accomplish the same task. The 'hostname' command come from the Nexus IOS heritage, the 'switchname' command comes from SAN-OS. Let's look at the next part of the configuration to accomplish our tasks: switch(config)# Switchname n1000v n1000v(config)# interface Mgmt0 n1000v(config-if)# ip address 192.168.1.109 255.255.255.0 n1000v(config-if)# no shutdown n1000v(config-if)# exit After setting the hostname, we proceed to configure the Management0 interface. This is the interface we will be using to manage our switch remotely. The IP Address here should be one that is on the same subnet as your laptop, but not currently in use. The 'no shutdown' command enables the interface for use. VRF

  • Virtual Routing and Forwarding (VRF) allows IP routers to have multiple instances of a routing table on the same router in the same time. In our case, we want a route that will only be used by the management interface. This route is not available to other Ethernet interfaces. n1000v(config)# vrf context management n1000v(config-vrf)# ip route 0.0.0.0/0 192.168.1.1 n1000v(config-vrf)# exit Our MGMT0 interface now has a default route pointing to 192.168.1.1. Lastly, we will enable some protocols for remote management. Three popular management protocols are telnet, ssh, and http. However, we will disable telnet since all traffic is transmitted in plain text. n1000v(config)# no telnet server enable n1000v(config)# ssh key rsa 1024 force n1000v(config)# ssh server enable n1000v(config)# feature http-server The key command for ssh generate a 1024 bit encryption key that is used to protect the data. At this point we have a very basic configuration on our Nexus switch, that would enable us to disconnect the console cable and manage the device remotely.