The content originates from the people's post and Telecommunications press "Linux command Application big dictionary"
tell 729 commands, 1935 examples
Learn about the Linux system's reference books, desk book, encountered the command or command not understand the options can be found
Strive to publish content every day
Ifconfig command
use the ifconfig command to display and configure network interfaces, such as setting an IP address,MAC address, activating or shutting down a network interface.
Command syntax:
ifconfig [ interface ] [ Options | IP Address ]
The meanings of the options in the command are as shown in the table.
table ifconfig command options meaning
Options |
Meaning |
-A |
Show status of all network interfaces |
Add < address > |
set the network device's IPV6 Address |
del < address > |
Remove the network device IPV6 Address |
Media< '; |
set media type for network devices |
Metric < number > |
Specifies the number of packets to be added when calculating the forwarding times of a packet |
MTU < > |
set the maximum transmission unit of the network device ( mtu) |
Netmask < Subnet mask > |
Set the subnet mask for a network device |
Up |
Activates the specified network device |
down |
|
HW < > < hardware address ; |
set the hardware address for this interface ( mac ethernet ( ampr ax.25 arcnet< Span style= "font-family: ' The song Body '; > and netrom ( ampr net/rom |
Txqueuelen < length ; |
Set the length of the device send queue |
tunnel< Address > |
Create the tunnel communication address between IPv4 and IPv6 |
Example: Configure the IP address of the NIC Eth0 and activate the device at the same time.
[[Email protected] ~] #ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up
Example: Configure the IP address of the alias device eth0:1 for the NIC Eth0 .
[Email protected] ~]# ifconfig eth0:1 192.168.0.3
Example: Activating the NIC eth0:1 device.
[Email protected] ~]# ifconfig eth0:1 up
Example: Check The configuration of the NIC eth0 settings.
[Email protected]~]# ifconfig eth0
Eth0 Link encap:ethernet HWaddr 00:0c:29:fc:2f:e5
inet addr:192.168.0.2 bcast:192.168.0.255 mask:255.255.255.0
Inet6 Addr:fe80::20c:29ff:fefc:2fe5/64scope:link
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:11833 errors:0 dropped:0overruns:0 frame:0
TX packets:14789 errors:0 dropped:0overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:953120 (930.7 KiB) TX bytes:12258316 (11.6 MiB)
The IP address of the Eth0 network card is 192.168.0.2, andthe MAC address is 00:0c:29:fc:2f:e5
Example: View all the network card devices.
[[Email protected]~]# ifconfig-a
Example: Turn off the NIC eth0:1 device.
[Email protected] ~]# ifconfig eth0:1 down
Example: Change the NIC eth0 hardware MAC address to 00:0c:29:18:2e:3d.
[Email protected] ~]# ifconfig eth0 hw ether 00:0c:29:18:2e:3d
This article is from the "airfish2000" blog, make sure to keep this source http://airfish2000.blog.51cto.com/10829608/1872272
ifconfig Command--linux command application of large dictionary 729 commands interpretation