====== Display interfaces ====== ===== Synopsis ===== ifstat [] [...] ===== Examples ===== === Display all interfaces === ifstat === Display the interface "net0" === ifstat net0 ===== Description ===== Display the state of the specified network interfaces. If no network interfaces are explicitly specified, iPXE will display the state of all available network interfaces. The output will show key information about each network interface. For example: iPXE> ifstat net0: 52:54:00:12:34:56 using rtl8139 on PCI00:03.0 (Ethernet) [open] [Link:up, TX:5 TXE:0 RX:10 RXE:3] [RXE: 1 x "The socket is not connected (http://ipxe.org/380f6001)"] In this example you can see that there is a single network interface ''net0'', using the ''rtl8139'' driver on PCI device ''00:03.0''. The interface has been opened using ''[[:cmd:ifopen]]''. The more detailed information shows that the link is up, and shows the number of packets transmitted and received.((Key: ^ TX | Packets transmitted | ^ TXE | Transmit errors | ^ RX | Packets received | ^ RXE | Receive errors | )) It also shows a detailed breakdown of any transmit or receive errors. In this example, you can see that there has been a single receive error, which is described at [[http://ipxe.org/380f6001]] as being a harmless error indicating that a UDP packet was received for a port on which iPXE was not listening. ===== See also ===== * ''[[:cmd:ifopen]]'' * ''[[:cmd:ifclose]]'' * ''[[:cmd:route]]'' * ''[[:cmd:ipstat]]'' * [[:cmd|List of all iPXE commands]] ===== Notes ===== ''ifstat'' displays information about the physical network interface. To view information about the IP addresses assigned to the network interface, you can use the ''[[:cmd:route]]'' command. To view statistics about IP traffic, you can use the ''[[:cmd:ipstat]]'' command. You can access some information about network devices from within an iPXE [[:scripting|script]] using the ''[[:cfg:mac]]'', ''[[:cfg:bustype]]'', ''[[:cfg:busloc]]'', and ''[[:cfg:chip]]'' settings. For example: echo Interface net0 (${net0/mac}) is at PCI${net0/busloc:busdevfn} using driver ${net0/chip}