Common linux commands and linux commands

Source: Internet
Author: User

Common linux commands and linux commands

1. Network Parameter Setting command

1. ifconfig: Query and SET network card and IP network segment parameters

1.1 man manual Definition

DESCRIPTION       Ifconfig  is used to configure the kernel-resident network interfaces.  It is used at boot time to set up       interfaces as necessary.  After that, it is usually only needed when debugging or when system  tuning  is       needed.       If  no arguments are given, ifconfig displays the status of the currently active interfaces.  If a single       interface argument is given, it displays the status of the given interface only; if a single -a  argument       is  given,  it displays the status of all interfaces, even those that are down.  Otherwise, it configures       an interface.

Ifconfig is used to configure the kernel-resident network interface. It is generally used to set the necessary interfaces at startup. It is also used for debugging and system debugging.

If no parameters exist, the network interfaces currently activated (up status) are listed.

If you connect to a network interface parameter (ifconfig eth0), the configuration of this interface is output.

If the following parameter is-a, all network interfaces (up and down staus network interfaces) will be output)

 

1.2 command output

[root@test_1 net]# ifconfigeth0      Link encap:Ethernet  HWaddr 84:2B:2B:94:F7:7D            inet addr:192.168.2.241  Bcast:192.168.2.255  Mask:255.255.255.0          inet6 addr: fe80::862b:2bff:fe94:f77d/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:1546524 errors:0 dropped:0 overruns:0 frame:0          TX packets:1652650 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000           RX bytes:754067360 (719.1 MiB)  TX bytes:1474728958 (1.3 GiB)          Interrupt:18 eth0:1    Link encap:Ethernet  HWaddr 84:2B:2B:94:F7:7D            inet addr:192.168.2.242  Bcast:192.168.2.255  Mask:255.255.255.0          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          Interrupt:18 eth0:2    Link encap:Ethernet  HWaddr 84:2B:2B:94:F7:7D            inet addr:192.168.2.243  Bcast:192.168.2.255  Mask:255.255.255.0          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          Interrupt:18 lo        Link encap:Local Loopback            inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:16436  Metric:1          RX packets:594 errors:0 dropped:0 overruns:0 frame:0          TX packets:594 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0           RX bytes:51885 (50.6 KiB)  TX bytes:51885 (50.6 KiB)

. Eth0: The NIC code and loopback.

· HWaddr: The hardware address of the NIC, which is often called MAC.

· Inet addr: IPv4 IP address. Subsequent Bcase and Mask represent Broadcast and Netmask respectively.

· Inet6 addr: the IP address of the IPv6 version. It is not used, so it is skipped.

· RX: the row represents the packet receipt status from the network startup till now, packets indicates the number of data packets, errors indicates the number of data packets with errors, and dropped indicates the number of data packets discarded due to problems.

· TX: In contrast to RX, This is the transfer from the network to the present.

· Collisions: Indicates data packet collision. If it occurs too many times, it indicates that your network condition is not good.

· Txqueuelen: indicates the storage length of the buffer used to transmit data.

· RX Bytes and TX Bytes: Total number of transmitted and received Bytes.

· Interrupt and Memory: network card hardware data, IRQ Interrupt and Memory address.

By observing the above information, you can learn about your network situation, especially the number of errors in RX and TX, and whether serious collision occurs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.