Linux ifconfig see card information

View all card information 
ifconfig (not including the card down state)
Copy the code
[root@mysql ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.111  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::8c18:4c0c:35b:f89c  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:bf:7a:4b  txqueuelen 1000  (Ethernet)
        RX packets 396  bytes 43132 (42.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 189  bytes 25028 (24.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
# Eth0: Name card 
# Link encap: NIC interface type, here is the Ethernet 
# HWaddr: the hardware address of the network card, commonly known as the MAC address 
# inet addr: IPv4 addresses, IPv6 will be written if addr inet6 
# Bcast: broadcast address 
# Mask: Subnet Mask 
# UP: ON state is represented by NIC 
# bROADCAST: expressed NICs broadcast 
# RUNNING: indicates card has been connected to the network cable 
# mULTICAST: multicast expressed NICs 
# MTU: maximum transmission unit network 
# Metric: metric reaches the gateway, reference: HTTP: //m.chinabyte.com/network/191/12287691_gfh.shtml 
# the RX packets: packet size to the network so far received from the start, in bytes, error occurs error packets, dropped packets dropped 
# TX packets: a network from the packet size of the transmission start until now, in bytes, error packet error occurs, the packet is discarded dropped 
# collisions: data collision occurs package, if occurs too many times, indicating that the network situation is not good 
# txqueuelen: storing the buffer length of the transmission data 
# RX bytes: total received word Total 
# TX bytes: total bytes sent total 
# Memory: Memory card hardware address
Copy the code
 

 


Copy the code
[root @ mysql ~] # ifconfig -a // View all card information (including the card down state 

[root @ mysql ~] # ifconfig eth0 // check the specified card information 

[root @ mysql ~] # ifconfig eth0 up / / enable the specified network card is equivalent to: ifup eth0 

[MySQL root @ ~] # ifconfig eth0 Down // close the specified network card is equivalent to: ifdown eth0 

[MySQL root @ ~] # ifconfig eth0 arp // enable ARP protocol network card 
[root @ mysql ~] # ifconfig eth0 -arp // disable ARP protocol network card 


[root @ mysql ~] # ifconfig eth0 192.168.0.100 // set / modify the NIC IP address (provisional entry into force) 
[root @ MySQL ~] # ifconfig eth0 192.168.0.100/24 // settings / IP address and subnet mask to modify the network card (provisional entry into force) 
[root @ MySQL ~] # ifconfig eth0 192.168.0.100 Netmask 255.255.255.0 // IP address and sub-set / modify card network mask (provisional entry into force) 
[root @ MySQL ~] # ifconfig eth0 hw ether 192.168.0.100 04: 64-: 03: 00: 12: 51 / / set / modify the IP address and MAC address of the network card (provisional entry into force), ether (Ethernet) interface that represents the type of card
Maximum Transmission Unit [root @ mysql ~] # ifconfig eth0 mtu 1500 // set / modify NIC (temporarily applied) 

[the root MySQL @ ~] # the ifconfig eth0: // 0 192.168.0.50/24 NIC configuration to the virtual interface, rather to re-configure the network card to an IP address (provisional entry into force) 
[root @ MySQL ~] # ifconfig eth0: 1 192.168.0.51/24 // to configure virtual interface card, which is equivalent to re-configure a network card IP address (provisional entry into force) 
[ root @ mysql ~] # ifconfig eth0 : 2 192.168.0.52/24 // to configure virtual interface card, which is equivalent to re-configure a network card IP address (provisional entry into force
Copy the code

 

Guess you like

Origin www.cnblogs.com/gengyufei/p/12575561.html