A network parameter setting command
1.ifconfig: Query, set the network card and IP network segment and other related parameters
1.1 Man Manual definition
DESCRIPTION Ifconfig is used to configure the kernel-resident network interfaces. Time To set up interfaces as necessary. After that, it was usually only needed if debugging or when the system tuning is needed. If ifconfig Displays the status of the currently active interfaces. If a singleif a single-a argument is given, it displays the status of All interfaces, even those is down. Otherwise, it configures an interface.
Ifconfig is used to configure the Kernel-resident network interface, generally set the necessary interfaces at startup. Also used for debug and system debugging.
If there are no parameters, the network interface that is currently active (up status) is listed
If a network interface parameter (ifconfig eth0) is connected, the configuration of the interface is output
If the subsequent parameter is-a, all network interfaces (up and down Staus network interfaces) are output
1.2 Overview of command output
[[Email Protected]_1 net]#ifconfigeth0 Link encap:ethernet HWaddr -: 2b:2b:94: f7:7d inet Addr:192.168.2.241Bcast:192.168.2.255Mask:255.255.255.0Inet6 addr:fe80::862b:2bff:fe94:f77d/ -scope:link up broadcast RUNNING multicast MTU: theMetric:1RX Packets:1546524Errors0Dropped0Overruns:0Frame0TX Packets:1652650Errors0Dropped0Overruns:0Carrier0Collisions:0Txqueuelen: +RX Bytes:754067360(719.1MiB) TX Bytes:1474728958(1.3GiB) Interrupt: -eth0:1Link encap:ethernet HWaddr -: 2b:2b:94: f7:7d inet Addr:192.168.2.242Bcast:192.168.2.255Mask:255.255.255.0Up broadcast RUNNING multicast MTU: theMetric:1Interrupt: -eth0:2Link encap:ethernet HWaddr -: 2b:2b:94: f7:7d inet Addr:192.168.2.243Bcast:192.168.2.255Mask:255.255.255.0Up broadcast RUNNING multicast MTU: theMetric:1Interrupt: -lo Link encap:local Loopback inet addr:127.0.0.1Mask:255.0.0.0Inet6 Addr: ::1/ -scope:host up LOOPBACK RUNNING MTU:16436Metric:1RX Packets:594Errors0Dropped0Overruns:0Frame0TX Packets:594Errors0Dropped0Overruns:0Carrier0Collisions:0Txqueuelen:0RX Bytes:51885(50.6KiB) TX Bytes:51885(50.6KiB)
。 Eth0: The name of the network card, also has lo this loopback.
· HWADDR: The hardware address of the network card, used to be called Mac.
· inet Addr:ipv4 IP Address, the subsequent bcase, mask respectively represents the broadcast and netmask.
· Inet6 Addr: Is the IPV6 version of the IP that we did not use, so skip over.
· RX: That line represents the data packet received by the network so far, packets represents the number of packets, errors represents the number of errors in the packet, and dropped represents the number of packets discarded due to a problem.
· TX: In contrast to RX, the transmission condition is initiated so far by the network.
· Collisions: Represents the case of a packet collision, if it happens too many times, it means your network is not in good condition.
· Txqueuelen: Represents the storage length of the buffer used to transmit data.
· RX Bytes, TX Bytes: Total transmit, Bytes received.
· Interrupt, Memory: Network card hardware data, IRQ bifurcation with the address.
By observing the above information, it is generally possible to understand your network situation, especially the number of error in Rx, TX, and whether there is a serious collision situation, it is necessary to pay attention to.
Common Linux Commands-network-related