Đôi khi việc quản lý máy chủ ESXi cần việc kiểm tra các nguyên nhân tại sao mạng (network) không thông ? Một trong những bước cơ bản đó chính là kiểm tra thông tin ARP trên ESXi tại đường truyền mạng mà máy chủ ESXi đang kết nối. Điều đó giúp ta xác định các vấn đề liên quan đến lớp 2 (TCP/IP) có đang phát sinh lỗi hay không ?
Vậy làm thế nào để liệt kê thông tin bảng ARP trên ESXi
Chúng ta sẽ liệt kê thông tin bảng ARP trên môi trường shell của ESXi. Nếu bạn nghĩ lệnh “arp” trên Unix hoạt động thì tiếc thay điều đó không xảy ra. Thay vào đó ESXi có công cụ riêng mang tên “esxcli” giúp hỗ trợ kiểm tra, thống kê và cấu hình rất nhiều chức năng trên môi trường shell máy chủ ESXi.
# esxcli Usage: esxcli [options] {namespace}+ {cmd} [cmd options] Options: --formatter=FORMATTER Override the formatter to use for a given command. Available formatter: xml, csv, keyvalue --debug Enable debug or internal use options --version Display version information for the script -?, --help Display usage information for the script Available Namespaces: device Device manager commands elxnet elxnet esxcli functionality esxcli Commands that operate on the esxcli system itself allowing users to get additional information. fcoe VMware FCOE commands. graphics VMware graphics commands. hardware VMKernel hardware properties and commands for configuring hardware. hpbootcfg HP Boot Configuration Utility hptestevent HP Test Event Utility iscsi VMware iSCSI commands. network Operations that pertain to the maintenance of networking on an ESX host. This includes a wide variety of commands to manipulate virtual networking components ....
Chúng ta sẽ chỉ chú trọng vào chức năng hỗ trợ “network” của lệnh “esxcli“.
# 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
Chính xác thì câu lệnh sau sẽ giúp liệt kê bảng địa chỉ ARP trên ESXi môi trường shell.
# esxcli network ip neighbor list Neighbor Mac Address Vmknic Expiry State Type ------------- ----------------- ------ -------- ----- ------- 192.168.1.102 00:0c:29:be:aa:cc vmk0 1092 sec Unknown 192.168.1.1 00:10:db:ff:bb:00 vmk0 531 sec Unknown 192.168.1.250 00:50:56:80:cc:f7 vmk0 1149 sec Unknown
Cực kì đơn giản phải không nào. Hy vọng qua bài viết này, cuongquach.com đã giúp bạn xem thông tin bảng ARP trên ESXi.