Linux network command ifconfig

Source: Internet
Author: User
Linux network command ifconfig

InLinuxIn the environment, how can I use commands to view related network information?

IfconfigCommand: Used to view IP addresses and modify Network Interface Parameters

[Root @ Linux ~] # Ifconfig {interface} {up | down} <= observation and startup interface [root @ Linux ~] # Ifconfig interface {options }<== set and modify interface parameters: interface, Nic interface code, including options such as eth0, eth1, and ppp0. The following parameters are available: up or down, start (up) or close (down) the network interface (No parameter is involved) MTU, you can set different MTU values, such as MTU 1500 (unit: byte) netmask, that is, the sub-shield network broadcast, that is, the broadcast address

For example, if you want to check the IP address, subnet mask, and other information in Linux, you can enter ifconfig below the terminal:

Eth0 link encap: Ethernet hwaddr 00: 0f: Ea: A3: 06: A2
Inet ADDR: 192.168.10.100 bcast: 192.168.10.255
Mask: 255.255.255.0
Inet6 ADDR: fe80: 20f: eaff: fe73: 682/64 scope: Link
Up broadcast running Multicast MTU: 1500 Metric: 1
RX packets: 3439 errors: 0 dropped: 0 overruns: 0 frame.: 0
TX packets: 2735 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX Bytes: 646935 (631.7 kib) TX Bytes: 562313 (549.1 kib)
Interrupt: 209 memory: fb000000-0

Eth0: indicates the NIC. How to have multiple NICS is displayed in the form of eth1, eth2, and so on. This is different from the command for viewing IP addresses in the window.
Inet ADDR: displays the IP address of the local machine.
Bcast: displays the broadcast address.
Mask: displays the subnet mask.
Inet6: the IPv6 version address.
RX: indicates the situation where the network receives data from startup till now.
TX: indicates the data transfer from the network to the present.
Collisions: the number of network collisions in the table. The larger the number, the more unstable the current network is.
Txqueuelen: indicates the maximum length of the buffer for data transmission.
Interrupt: The hardware data of the NIC.
Memory: memory address.

If you have multiple NICs, you can run the following command to view the details of a NIC:

Ifconfig ethx X indicates a positive integer from 0.

To change the IP address of a network card, you can refer to the following format:

Ifconfig ethx IP Address

For example, we modify the IP address of Network Card 1: ifconfig eth0 192.168.1.102. In this way, the IP address is modified logically.

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.