Linux-solve the problem that the added Nic cannot be identified. linux-Recognition

Source: Internet
Author: User

Linux-solve the problem that the added Nic cannot be identified. linux-Recognition

After an Eni is added, it cannot be correctly identified and used.
Troubleshooting Method
View the content of/etc/udev/rules. d/70-persistent-net.rules. the MAC address of the newly added Nic can be viewed in this file.
Change the MAC address of the NIC for/etc/sysconfig/network-scripts/ifcfg-eth0 to the correct MAC address
Use the system-config-network command to create a configuration file for other NICs and set the IP address
#/Etc/rc. d/init. d/network restart

Nic configuration file
/Etc/sysconfig/network-scripts/ifcfg-eth0 content
DEVICE = eth0 DEVICE name
HWADDR = 00: 0c: 29: ac: 95: 0c physical address of the device
NM_CONTROLLED = no whether to use NetworkManager to manage network interfaces. The default value is yes.
ONBOOT = yes whether to enable the network interface when the system or network service is started. The default value is no.
IPADDR = 192.168.1.1 defines the IP address
NETMASK = 255.255.255.0 defines the subnet mask
TYPE = Ethernet network TYPE: Ethernet
BOOTPROTO = noneIP Acquisition Method
None does not use any startup Protocol
Dhcp uses the dhcp protocol as the startup protocol and obtains the IP address through the dhcp server.
Use static IP addresses
IPV6INIT = no: whether IPv6 Configuration is supported
USERCTL = no whether normal users are allowed to control the network interface
GATEWAY = 192.168.1.254 default GATEWAY address
DNS1 = 222.222.222.222
DNS2 = 202.99.166.4
DNS3 = 202.99.160.68

# Ifconfig:
Ifconfig [option] ethN [IP/MASK] [ACTION] ACTION: up down
1. View IP address information: ifconfig [-a] [ethN]
2. Configure the IP Address: ifconfig ethN IP/MASK
3. Manage Network Interfaces: ifconfig ethN {up | down}
If the configuration file is not directly modified, the command execution result is directly put into the kernel, so the configuration parameters take effect immediately, but will take effect after the system is restarted or the network service is restarted.

# System-config-network
Create a NIC configuration file
The configuration file is modified directly, so it is valid permanently, but does not take effect immediately. It takes effect only after the system is restarted or the network service is restarted.

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.