


VMware ESXi 6のesxcliコマンドでネットワーク情報の取得です。
- インターフェイスの確認
- IPアドレス情報
- DNS情報
- 経路情報
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | [root@vmware:~] esxcli network ip interface list vmk0    Name: vmk0    MAC Address: 00:xx:xx:xx:xx:xx    Enabled: true    Portset: vSwitch0    Portgroup: Management Network    Netstack Instance: defaultTcpipStack    VDS Name: N/A    VDS UUID: N/A    VDS Port: N/A    VDS Connection: -1    Opaque Network ID: N/A    Opaque Network Type: N/A    External ID: N/A    MTU: 1500    TSO MSS: 65535    Port ID: 33554440 | 
IPv4
| 1 2 3 4 | [root@vmware:~] esxcli network ip interface ipv4 get -i vmk0 Name  IPv4 Address  IPv4 Netmask   IPv4 Broadcast  Address Type  DHCP DNS ----  ------------  -------------  --------------  ------------  -------- vmk0  192.168.1.1  255.255.255.0  192.168.1.255  STATIC           false | 
IPv6
| 1 2 3 4 | [root@vmware:~] esxcli network ip interface ipv6 get -n vmk0 Name  DHCPv6 Enabled  Router Adv Enabled  DHCP DNS ----  --------------  ------------------  -------- vmk0           false               false     false | 
| 1 2 3 4 5 | [root@vmware:~] esxcli network ip dns server list    DNSServers: 192.168.1.2, 192.168.1.3 [root@vmware:~] esxcli network ip dns search list    DNSSearch Domains: rootlinks.net | 
| 1 2 3 4 5 | [root@vmware:~] esxcli network ip route ipv4 list Network       Netmask        Gateway       Interface  Source ------------  -------------  ------------  ---------  ------ default       0.0.0.0        192.168.1.4  vmk0       MANUAL 192.168.1.0  255.255.255.0  0.0.0.0       vmk0       MANUAL | 
esxcli network
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | [root@vmware:~] esxcli network Usage: esxcli network {cmd} [cmd options] Available Namespaces:   firewall              A set of commands for firewall related operations   ip                    Operations that can be performed on vmknics   nic                   Operations having to do with the configuration of Network Interface Card and getting and updating the                         NIC settings.   port                  Commands to get information about a port   sriovnic              Operations having to do with the configuration of SRIOV enabled Network Interface Card and getting                         and updating the NIC settings.   vm                    A set of commands for VM related operations   vswitch               Commands to list and manipulate Virtual Switches on an ESX host.   diag                  Operations pertaining to network diagnostics |