You are on page 1of 32

VMWARE VSPHERE 6.

7: OPTIMIZE AND SCALE

Lab 11: Monitoring Network Performance


Document Version: 2020-01-02

Copyright © 2020 Network Development Group, Inc.


www.netdevgroup.com

NETLAB Academy Edition, NETLAB Professional Edition, and NETLAB+ are registered trademarks of Network Development Group, Inc.

VMware is a registered trademark of VMware, Inc.


Lab 11: Monitoring Network Performance

Contents
Introduction ........................................................................................................................ 3
Objectives............................................................................................................................ 3
Lab Topology....................................................................................................................... 4
Lab Settings ......................................................................................................................... 5
1 Prepare to Monitor Network Performance ................................................................ 6
2 Prepare the Client and the Server Virtual Machines ................................................ 13
3 Measure Network Activity on an ESXi Physical Network Interface .......................... 20
4 Use Traffic Shaping to Simulate Network Congestion.............................................. 23
5 Position the Client and the Server on the Same Port Group .................................... 27
6 Restart the Test and Measure Network Activity ...................................................... 32

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 2


Lab 11: Monitoring Network Performance

Introduction

In this lab, you will monitor network performance.

Objectives

 Prepare to Monitor Network Performance


 Prepare the Client and the Server Virtual Machines
 Measure Network Activity on an ESXi Physical Network Interface
 Use Traffic Shaping to Simulate Network Congestion
 Position the Client and the Server on the Same Port Group
 Restart the Test and Measure Network Activity
 Stop the Test and Analyze Results

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 3


Lab 11: Monitoring Network Performance

Lab Topology

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 4


Lab 11: Monitoring Network Performance

Lab Settings

The information in the table below will be needed in order to complete the lab. The
task sections below provide details on the use of this information.

Virtual Machine IP Address Account Password

sa-esxi-01 eth0: 172.20.10.51 root Train1ng$

sa-esxi-02 eth0: 172.20.10.52 root Train1ng$

sa-esxi-03 eth0: 172.20.10.53 root Train1ng$

sa-aio eth0: 172.20.10.10 sysadmin vmware123

sa-student eth0: 172.20.10.80 sysadmin vmware123

sa-vcsa eth0: 172.20.10.94 sysadmin@vclass.local vmware123

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 5


Lab 11: Monitoring Network Performance

1 Prepare to Monitor Network Performance

In this task, you will start the test program to generate database activity.

1. Launch the sa-student virtual machine to access the graphical login screen.
2. Log in as sysadmin using the password vmware123.

3. Launch the Mozilla Firefox web browser by either clicking on the icon shortcut
found on the bottom toolbar or by navigating to Start Menu > Internet > Firefox
Web Browser.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 6


Lab 11: Monitoring Network Performance

4. Notice the homepage is automatically configured to load the URL address of the
VMware vCenter Server Appliance (sa-vcsa virtual machine). Click on the Launch
vSphere Client (HTML5) button to launch the HTML5-based vSphere client.

If you cannot successfully load the VMware Getting Started webpage,


then please wait an additional 3-4 minutes and refresh the page to
continue. During this time, the vCSA is still booting up and requires
extra time to initialize.

5. In the User name text field, type sysadmin@vclass.local and in the Password text
field, type vmware123. Click on Login.

You may ignore the “browser-OS combination” warning message


presented on the VMware vCenter Single Sign-On page and continue
moving forward with the lab.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 7


Lab 11: Monitoring Network Performance

6. In the left pane, click on Hosts and Clusters and expand the Datacenter inventory
object.

7. In the left pane, select sa-esxi-01.vclass.local and click on the Configure tab.

8. Scroll down and select Services.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 8


Lab 11: Monitoring Network Performance

9. Select SSH and click the Start button.

10. Start an SSH session to sa-esxi-01.vclass.local.


a. On the student desktop taskbar, open a terminal.

b. In the terminal window, type ssh root@sa-esxi-01.vclass.local and press


Enter, when prompted for a password, use Train1ng$.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 9


Lab 11: Monitoring Network Performance

11. Start esxtop by typing esxtop and press Enter. (By default, esxtop starts with the
CPU screen)

12. Change the update delay from the default (5 seconds) to 10 seconds.
a. Enter s.
b. Enter 10 and press Enter.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 10


Lab 11: Monitoring Network Performance

13. Enter n to switch to the network statistics screen.

14. Remove unused counters to make the esxtop network screen easier to monitor.
a. Click the right of the terminal and drag it to the right to make the terminal wider.

b. Enter f to display the current field order table.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 11


Lab 11: Monitoring Network Performance

c. In the current field order table, enter g and j to remove PKTRX/s and PKTTX/s
from the esxtop display. Notice the * will be removed from the field you typed.

d. Press Enter to return to the network statistics screen.

8. Leave vSphere Client open to continue with the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 12


Lab 11: Monitoring Network Performance

2 Prepare the Client and the Server Virtual Machines

In this task, you will use scripts on the Linux01 and Linux02 virtual machines to generate
network traffic so that network performance can be measured.

1. Switch back to the vSphere Client.

2. In the left pane, expand sa-esxi-01.vclass.local and click on Linux01.

3. Right-click on Linux01 and select Power > Power On.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 13


Lab 11: Monitoring Network Performance

4. In the left pane, select the Networking tab.

5. In the Networking tab, expand the Datacenter object, then expand the dvs-Lab
distributed switch.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 14


Lab 11: Monitoring Network Performance

6. Right-click the pg-Production port group and select Migrate VMs to Another
Network.

7. In the Migrate VMs to Another Network window, make sure pg-Production is the
source network. In the destination network, click the Browse link.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 15


Lab 11: Monitoring Network Performance

8. In the Select Network window, select VM Network and click OK.

9. Click Next.

10. On the Select VMs to migrate step, select Linux02 and click Next.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 16


Lab 11: Monitoring Network Performance

11. On the Ready to complete step, click Finish.

12. In the left pane, click on Hosts and Clusters and expand the Datacenter inventory
object.

13. In the left pane, right-click Linux02 and select Power > Power On.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 17


Lab 11: Monitoring Network Performance

14. With Linux02 selected, make sure the Summary tab is selected and wait until the
machine has completely booted. Record the IP address __________ (The IP address
should be 172.20.10.xxx)

15. Start the server on Linux02.


a. Right-click Linux02 and select Open Remote Console.

It is strongly advised to only utilize the remote console option and not
the web console as problems may arise when attempting to open a
virtual machine’s console through the web console.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 18


Lab 11: Monitoring Network Performance

b. Login to Linux02 with the username root and password VMware1!.

c. Start the server program by typing netperf/netserver and press Enter.

d. Verify the server program is running by typing ps -ef | grep netserver and
press Enter.

16. Leave vSphere Client open to continue with the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 19


Lab 11: Monitoring Network Performance

3 Measure Network Activity on an ESXi Physical Network Interface

In this task, you will run measure the network performance of the ESXi host network
interface with the Linux01 and Linux02.

1. Switch back to the vSphere Client tab.

You will need to press Ctrl + Alt to release your mouse from the VM
Remote Console.

2. Right-click Linux01 and select Open Remote Console.

It is strongly advised to only utilize the remote console option and not
the web console as problems may arise when attempting to open a
virtual machine’s console through the web console.

3. Click on the Linux01 console and log in as the root user with the VMware1! password.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 20


Lab 11: Monitoring Network Performance

4. Start the client on Linux01.


a. Navigate to the network scripts folder by typing cd netperf and pressing Enter.

b. Type ./nptest1.sh server_IP_address (this is the IP address recorded earlier for


Linux02).

5. Monitor network activity and record your findings.


a. Switch to the terminal you left open with esxtop running.

You will need to press Ctrl + Alt to release your mouse from the VM
Remote Console.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 21


Lab 11: Monitoring Network Performance

b. In esxtop, find the vmnic0 physical adapter.

c. After 30 seconds of statistics collection, record the following values for vmnic0
associated with Linux01.

 MbTX/s
 MbRX/s

6. Leave vSphere Client open to continue with the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 22


Lab 11: Monitoring Network Performance

4 Use Traffic Shaping to Simulate Network Congestion

In this task, you will use traffic shaping to control the network speed to simulate
congestion.

1. Switch back to the vSphere Client tab.

2. In the left pane, select the Networking tab.

3. In the left pane, right-click the pg-Production port group and select Edit Settings.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 23


Lab 11: Monitoring Network Performance

4. In the Edit Settings window, on the left, click on Traffic Shaping.

5. In the Traffic shaping step, select Enabled for Ingress and Egress traffic shaping and
give all the values 10000 and click OK.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 24


Lab 11: Monitoring Network Performance

6. Switch back to the terminal running esxtop.

7. After 30 seconds, record the following for vmnic0 associated with Linux01.

8. Disable the traffic shaping policy.


a. In the left pane, select the Networking tab.

b. In the left pane, right-click the pg-Production port group and select Edit Settings.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 25


Lab 11: Monitoring Network Performance

c. In the Edit Settings window, on the left, click on Traffic Shaping.

d. Select Disabled for Ingress and Egress traffic shaping and click OK.

9. Leave the vSphere Client open and continue to the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 26


Lab 11: Monitoring Network Performance

5 Position the Client and the Server on the Same Port Group

In this task, you will migrate the Linux02 virtual machine back to the VM Network port
group to show how fast machines on the same ESXi host and virtual switch port group
can communicate.

1. In the left pane, right-click the VM Network port group and click Migrate VMs to
Another Network.

2. In the Migrate VMs to Another Network window, make sure VM Network is the
Source network and click Browse under Destination Network.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 27


Lab 11: Monitoring Network Performance

3. In the Select Network window, select pg-Production and click OK.

4. Click Next.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 28


Lab 11: Monitoring Network Performance

5. In the Select VMs to migrate step, select Linux02 and click Next.

6. In the Ready to complete step, click Finish.

7. In the left pane, click the Hosts and Clusters tab.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 29


Lab 11: Monitoring Network Performance

8. Right-click Linux02 and select Power > Restart Guest OS.

9. Click Yes to confirm the restart.

10. Switch to the Linux02 console and wait for it to boot completely.

11. When Linux02 boots, log in as root with the VMware1! password.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 30


Lab 11: Monitoring Network Performance

12. Type ifconfig and press Enter. Look for the IP address (inet addr). (The IP address
for Linux02 should now be in the 172.20.11.xxx range). Record the IP address for
later use.

13. Leave the vSphere Client open and continue to the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 31


Lab 11: Monitoring Network Performance

6 Restart the Test and Measure Network Activity

In this task, you will measure network activity between the client and server
communicating across a virtual network on the same ESXi host and port group.

1. In the Linux02 console, type netperf/netserver and press Enter.

2. Switch to the Linux01 console.

You will need to press Ctrl + Alt to release your mouse from the VM
Remote Console.

3. Click inside the Linux01 console, if a script is still running, press Ctrl+C to end it.
Type ./nptest1.sh server_IP_address, where server_IP_address is the Linux02 IP
address recorded earlier.

4. Switch to the terminal running esxtop.

5. After 30 seconds of collection, record the values for vmnic0 associated with Linux01.

 MbTX/s
 MbRX/s

6. The lab is now complete; you may end the reservation.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 32

You might also like