Virtual Machine Linux added new NIC restarts, no notes for its profile eth1 found!

Source: Internet
Author: User

1. View Vi/etc/udev/rules.d/70-persistent-net.rules
Here can see your network card information, find your corresponding network card name
For example (this is the virtual machine where I add a new NIC that does not show its profile)

# PCI Device 0x8086:0x100f (e1000)

subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:5c:06", attr{type}== "1", kernel== "eth*" , name= "Eth0"


# PCI Device 0x8086:0x100f (e1000)

subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:52:5c:10", attr{type}== "1", kernel== "eth*" , name= "Eth1"


2. Manually create its own profile

cd/etc/sysconfig/network-scripts/

CP Ifcfg-eth0 Ifcfg-eth1

[email protected] network-scripts]# cat Ifcfg-eth1

Device=eth1

Hwaddr=00:0c:29:52:5c:10

Type=ethernet

Uuid=32b82029-c99b-46fd-8afd-091e15a44bbd

Onboot=yes

Nm_controlled=yes

Bootproto=static

ipaddr=192.168.1.223

netmask=255.255.255.0

gateway=192.168.1.1

dns1=202.106.0.20

#########################################

#USERCTL =no

#PEERDNS =yes

Networking=yes

Networking_ipv6=yes

Ipv6init=yes

Ipv6_autoconfig=yes

#IPV6ADDR =2001:da8:8003:801:202:120:1:1

#GATEWAY =192.168.1.1

[Email protected] network-scripts]#


3. Start the network card

[Email protected] network-scripts]# ifup eth1


Note, remember not to use [[email protected] ~]#/etc/init.d/network restart. Many people like restart, but if they are remote, server accidents, such as configuration errors. May cause some problems.


4. View Configuration Results

[Email protected] ~]# ifconfig

Eth0 Link encap:ethernet HWaddr 00:0c:29:52:5c:06

inet addr:192.168.1.221 bcast:192.168.1.255 mask:255.255.255.0

Inet6 ADDR:2001:DA8:2004:1000:202:116:160:41/64 Scope:global

Inet6 ADDR:FE80::20C:29FF:FE52:5C06/64 Scope:link

Up broadcast RUNNING multicast mtu:1500 metric:1

RX packets:53697 errors:0 dropped:0 overruns:0 frame:0

TX packets:1067 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:4117916 (3.9 MiB) TX bytes:103788 (101.3 KiB)


eth1 Link encap:ethernet HWaddr 00:0c:29:52:5c:10

inet addr:192.168.1.223 bcast:192.168.1.255 mask:255.255.255.0

Inet6 ADDR:FE80::20C:29FF:FE52:5C10/64 Scope:link

Up broadcast RUNNING multicast mtu:1500 metric:1

RX packets:52502 errors:0 dropped:0 overruns:0 frame:0

TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:4012579 (3.8 MiB) TX bytes:636 (636.0 b)


Lo Link encap:local Loopback

inet addr:127.0.0.1 mask:255.0.0.0

Inet6 addr::: 1/128 scope:host

Up LOOPBACK RUNNING mtu:65536 metric:1

RX packets:7 errors:0 dropped:0 overruns:0 frame:0

TX packets:7 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:1064 (1.0 KiB) TX bytes:1064 (1.0 KiB)


[Email protected] ~]#




This article is from the "Ningzhiyuan @it notes" blog, so be sure to keep this source http://renzhiyuan.blog.51cto.com/10433137/1841150

Virtual Machine Linux added new NIC restarts, no notes for its profile eth1 found!

Related Article

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.