zeefengleo

使用命令(cli)查看ESXi虚拟交换机配置
查看物理网卡的状态~ # esxcli network nic list Name PCI Device ...
扫描右侧二维码阅读全文
28
2019/05

使用命令(cli)查看ESXi虚拟交换机配置

查看物理网卡的状态

~ # esxcli network nic list
Name    PCI Device     Driver  Link  Speed  Duplex  MAC Address         MTU  Description
------  -------------  ------  ----  -----  ------  -----------------  ----  -------------------------------------------------------
vmnic0  0000:003:00.0  tg3     Up     1000  Full    74:46:a0:fe:43:74  1500  Broadcom Corporation NetXtreme BCM5717 Gigabit Ethernet
vmnic1  0000:003:00.1  tg3     Up     1000  Full    74:46:a0:fe:43:75  1500  Broadcom Corporation NetXtreme BCM5717 Gigabit Ethernet

显示标准交换机配置情况

~ # esxcli network vswitch standard list
vSwitch0
   Name: vSwitch0
   Class: etherswitch
   Num Ports: 128
   Used Ports: 5
   Configured Ports: 128
   MTU: 1500
   CDP Status: both
   Beacon Enabled: false
   Beacon Interval: 1
   Beacon Threshold: 3
   Beacon Required By:
   Uplinks: vmnic1, vmnic0
   Portgroups: vMotion, Management Network

查看虚拟交换机的冗余

~ # esxcli network vswitch standard  policy failover get -v vSwitch0
   Load Balancing: srcport
   Network Failure Detection: link
   Notify Switches: true
   Failback: true
   Active Adapters: vmnic0, vmnic1
   Standby Adapters:
   Unused Adapters:

查看 vmk0 ip

~ # esxcli network ip interface list vmk0
   Name: vmk0
   MAC Address: 00:0c:29:3c:c3:4e
   Enabled: true
   Portset: vSwitch0
   Portgroup: Management Network
   VDS Name: N/A
   VDS UUID: N/A
   VDS Port: N/A
   VDS Connection: -1
   MTU: 1500
   TSO MSS: 65535
   Port ID: 33554438

查看每个vmkernek ip

~ # esxcli network ip interface ipv4 get
Name  IPv4 Address   IPv4 Netmask   IPv4 Broadcast  Address Type  DHCP DNS
----  -------------  -------------  --------------  ------------  --------
vmk0  192.168.0.240  255.255.255.0  192.168.0.255   STATIC           false
vmk1  10.10.0.10     255.255.255.0  10.10.0.255     STATIC           false
vmk2  172.16.0.251   255.255.255.0  172.16.0.255    STATIC           false
vmk3  10.10.0.12     255.255.255.0  10.10.0.255     STATIC           false
vmk4  10.20.20.1     255.255.255.0  10.20.20.255    STATIC           false

查看vmk的路由

~ # esxcli network ip route ipv4 list
Network      Netmask        Gateway        Interface  Source
-----------  -------------  -------------  ---------  ------
default      0.0.0.0        192.168.0.239  vmk0       MANUAL
10.10.0.0    255.255.255.0  0.0.0.0        vmk1       MANUAL
10.20.20.0   255.255.255.0  0.0.0.0        vmk4       MANUAL
172.16.0.0   255.255.255.0  0.0.0.0        vmk2       MANUAL
184.45.34.0  255.255.255.0  192.168.0.1    vmk0       MANUAL
192.168.0.0  255.255.255.0  0.0.0.0        vmk0       MANUAL

查看vmk端口的详细信息

~ # esxcli network nic stats get -n vmnic0
NIC statistics for vmnic0
   Packets received: 28718
   Packets sent: 20288
   Bytes received: 4159681
   Bytes sent: 4810909
   Receive packets dropped: 42
   Transmit packets dropped: 0
   Total receive errors: 0
   Receive length errors: 0
   Receive over errors: 0
   Receive CRC errors: 0
   Receive frame errors: 0
   Receive FIFO errors: 0
   Receive missed errors: 0
   Total transmit errors: 0
   Transmit aborted errors: 0
   Transmit carrier errors: 0
   Transmit FIFO errors: 0
   Transmit heartbeat errors: 0
   Transmit window errors: 0
Last modification:May 28th, 2019 at 07:26 pm
如果觉得我的文章对你有用,请随意赞赏

Leave a Comment