Use of the Ifconfig command

Source: Internet
Author: User

Configure and view network interface conditions using the Ifconfig command

Example 1: Configure eth0 IP and activate the device at the same time:

# ifconfig eth0 192.168.4.1 netmask 255.255.255.0 up

Example 2: Configure IP for the eth0 alias device eth0:1 and add routes

# ifconfig Eth0:1 192.168.4.2

# route add–host 192.168.4.2 Dev eth0:1

Example 3: Activating (disabling) a device

# ifconfig eth0:1 up (down)

Example 4: View all (specified) network interface configurations

# ifconfig (eth0)

==================================================================================

Function Description: Displays or sets the network device.

Syntax: ifconfig [network device][down up-allmulti-arp-promisc][add< address >][del< address >][
Supplemental Note: Ifconfig can set the status of a network device, or display the current settings.

Parameters

add< address > Set the IP address of the network device IPV6.

del< address > Remove the IP address of the network device IPV6.

Down closes the specified network device.


IO_ADDR&LT;I/O address > Set the I/O address of the network device.

IRQ&LT;IRQ address > Set IRQ for network devices.

media< network Media type > Set the media type of the network device.

mem_start< memory address > Set the starting address that the network device occupies in the main memory.

Number of metric< > Specifies the number to be added when calculating the number of packets transferred.

mtu< bytes > Sets the MTU of the network device.

netmask< Subnet mask > Set subnet mask for network devices.

tunnel< address > Establish a tunnel communication address between IPV4 and IPV6.

Up starts the specified network device.

-broadcast< address > Packets that will be sent to the specified address are treated as broadcast packets.

-pointopoint< address > establishes a direct connection with the network device at the specified address, which has a confidential function.

-promisc to turn off or start the promiscuous mode for the specified network device.

[IP Address] Specifies the IP address of the network device.

[Network Device] Specifies the name of the network device.

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.