Last login: Fri Aug 5 21:13:54 2016 from 192.168.3.103
[root@cdh1 ~]# find / -name *net.rules
/etc/udev/rules.d/70-persistent-net.rules
^C
[root@cdh1 ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:a8:1f:63", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:63:ca:f0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
[root@cdh1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:A8:1F:63"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.3.104
NETMASK=255.255.255.0
GATEWAY=192.168.3.1
DNS2=114.114.114.114
DNS1=8.8.8.8
[root@cdh1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:A8:1F:63"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.3.104
NETMASK=255.255.255.0
GATEWAY=192.168.3.1
DNS2=114.114.114.114
DNS1=8.8.8.8
[root@cdh1 ~]# service network restart
Shutting down interface eth1: Device state: 3 (disconnected)
[ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'.
[FAILED]
Bringing up interface eth1: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
[ OK ]
[root@cdh1 ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:63:CA:F0
inet addr:192.168.3.104 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe63:caf0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13463 errors:0 dropped:0 overruns:0 frame:0
TX packets:10909 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18151976 (17.3 MiB) TX bytes:729852 (712.7 KiB)
Interrupt:19 Base address:0x2000
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:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:960 (960.0 b) TX bytes:960 (960.0 b)
virbr0 Link encap:Ethernet HWaddr CA:AD:18:86:5D:D8
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:4073 (3.9 KiB)
[root@cdh1 ~]# vim /etc/udev/rules.d/70-persistent-net.rules
[root@cdh1 ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:a8:1f:63", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:63:ca:f0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
[root@cdh1 ~]#
[root@cdh1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:0C:29:A8:1F:63"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.3.104
NETMASK=255.255.255.0
GATEWAY=192.168.3.1
DNS2=114.114.114.114
DNS1=8.8.8.8
[root@cdh1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
#HWADDR="00:0C:29:A8:1F:63"
HWADDR="00:0C:29:63:CA:F0"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.3.104
NETMASK=255.255.255.0
GATEWAY=192.168.3.1
DNS2=114.114.114.114
DNS1=8.8.8.8
[root@cdh1 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1
[root@cdh1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth0"
#HWADDR="00:0C:29:A8:1F:63"
HWADDR="00:0C:29:63:CA:F0"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.3.104
NETMASK=255.255.255.0
GATEWAY=192.168.3.1
DNS2=114.114.114.114
DNS1=8.8.8.8
[root@cdh1 ~]# cd /etc/sysconfig/network-scripts/ifcfg-eth1
-bash: cd: /etc/sysconfig/network-scripts/ifcfg-eth1: Not a directory
[root@cdh1 ~]# cd /etc/sysconfig/network-scripts/
[root@cdh1 network-scripts]# ls
ifcfg-eth0 ifdown-bnep ifdown-isdn ifdown-sit ifup-bnep ifup-isdn ifup-ppp ifup-wireless network-functions-ipv6
ifcfg-eth1 ifdown-eth ifdown-post ifdown-tunnel ifup-eth ifup-plip ifup-routes init.ipv6-global
ifcfg-lo ifdown-ippp ifdown-ppp ifup ifup-ippp ifup-plusb ifup-sit net.hotplug
ifdown ifdown-ipv6 ifdown-routes ifup-aliases ifup-ipv6 ifup-post ifup-tunnel network-functions
[root@cdh1 network-scripts]# mv *eth0 ifcfg-eth0.bak
[root@cdh1 network-scripts]# ll
total 204
-rw-r--r--. 1 root root 188 Aug 5 21:06 ifcfg-eth0.bak
-rw-r--r--. 1 root root 216 Aug 5 21:20 ifcfg-eth1
-rw-r--r--. 1 root root 254 Sep 1 2010 ifcfg-lo
lrwxrwxrwx. 1 root root 20 Jul 19 05:45 ifdown -> ../../../sbin/ifdown
-rwxr-xr-x. 1 root root 627 Sep 1 2010 ifdown-bnep
-rwxr-xr-x. 1 root root 5059 Sep 1 2010 ifdown-eth
-rwxr-xr-x. 1 root root 781 Sep 1 2010 ifdown-ippp
-rwxr-xr-x. 1 root root 4246 Sep 1 2010 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Jul 19 05:45 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1481 Sep 1 2010 ifdown-post
-rwxr-xr-x. 1 root root 1064 Sep 1 2010 ifdown-ppp
-rwxr-xr-x. 1 root root 651 Sep 1 2010 ifdown-routes
-rwxr-xr-x. 1 root root 1367 Sep 1 2010 ifdown-sit
-rwxr-xr-x. 1 root root 1431 Sep 1 2010 ifdown-tunnel
lrwxrwxrwx. 1 root root 18 Jul 19 05:45 ifup -> ../../../sbin/ifup
-rwxr-xr-x. 1 root root 13454 Sep 1 2010 ifup-aliases
-rwxr-xr-x. 1 root root 859 Sep 1 2010 ifup-bnep
-rwxr-xr-x. 1 root root 9944 Sep 1 2010 ifup-eth
-rwxr-xr-x. 1 root root 11971 Sep 1 2010 ifup-ippp
-rwxr-xr-x. 1 root root 10679 Sep 1 2010 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Jul 19 05:45 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 727 Sep 1 2010 ifup-plip
-rwxr-xr-x. 1 root root 954 Sep 1 2010 ifup-plusb
-rwxr-xr-x. 1 root root 2364 Sep 1 2010 ifup-post
-rwxr-xr-x. 1 root root 4154 Sep 1 2010 ifup-ppp
-rwxr-xr-x. 1 root root 1712 Sep 1 2010 ifup-routes
-rwxr-xr-x. 1 root root 3490 Sep 1 2010 ifup-sit
-rwxr-xr-x. 1 root root 2482 Sep 1 2010 ifup-tunnel
-rwxr-xr-x. 1 root root 3770 Sep 1 2010 ifup-wireless
-rwxr-xr-x. 1 root root 4508 Sep 1 2010 init.ipv6-global
-rwxr-xr-x. 1 root root 1125 Sep 1 2010 net.hotplug
-rw-r--r--. 1 root root 9966 Sep 1 2010 network-functions
-rw-r--r--. 1 root root 29835 Sep 1 2010 network-functions-ipv6
[root@cdh1 network-scripts]# ls -ltr
total 204
-rw-r--r--. 1 root root 29835 Sep 1 2010 network-functions-ipv6
-rw-r--r--. 1 root root 9966 Sep 1 2010 network-functions
-rwxr-xr-x. 1 root root 1125 Sep 1 2010 net.hotplug
-rwxr-xr-x. 1 root root 4508 Sep 1 2010 init.ipv6-global
-rwxr-xr-x. 1 root root 3770 Sep 1 2010 ifup-wireless
-rwxr-xr-x. 1 root root 2482 Sep 1 2010 ifup-tunnel
-rwxr-xr-x. 1 root root 3490 Sep 1 2010 ifup-sit
-rwxr-xr-x. 1 root root 1712 Sep 1 2010 ifup-routes
-rwxr-xr-x. 1 root root 4154 Sep 1 2010 ifup-ppp
-rwxr-xr-x. 1 root root 2364 Sep 1 2010 ifup-post
-rwxr-xr-x. 1 root root 954 Sep 1 2010 ifup-plusb
-rwxr-xr-x. 1 root root 727 Sep 1 2010 ifup-plip
-rwxr-xr-x. 1 root root 10679 Sep 1 2010 ifup-ipv6
-rwxr-xr-x. 1 root root 11971 Sep 1 2010 ifup-ippp
-rwxr-xr-x. 1 root root 9944 Sep 1 2010 ifup-eth
-rwxr-xr-x. 1 root root 859 Sep 1 2010 ifup-bnep
-rwxr-xr-x. 1 root root 13454 Sep 1 2010 ifup-aliases
-rwxr-xr-x. 1 root root 1431 Sep 1 2010 ifdown-tunnel
-rwxr-xr-x. 1 root root 1367 Sep 1 2010 ifdown-sit
-rwxr-xr-x. 1 root root 651 Sep 1 2010 ifdown-routes
-rwxr-xr-x. 1 root root 1064 Sep 1 2010 ifdown-ppp
-rwxr-xr-x. 1 root root 1481 Sep 1 2010 ifdown-post
-rwxr-xr-x. 1 root root 4246 Sep 1 2010 ifdown-ipv6
-rwxr-xr-x. 1 root root 781 Sep 1 2010 ifdown-ippp
-rwxr-xr-x. 1 root root 5059 Sep 1 2010 ifdown-eth
-rwxr-xr-x. 1 root root 627 Sep 1 2010 ifdown-bnep
-rw-r--r--. 1 root root 254 Sep 1 2010 ifcfg-lo
lrwxrwxrwx. 1 root root 9 Jul 19 05:45 ifup-isdn -> ifup-ippp
lrwxrwxrwx. 1 root root 18 Jul 19 05:45 ifup -> ../../../sbin/ifup
lrwxrwxrwx. 1 root root 11 Jul 19 05:45 ifdown-isdn -> ifdown-ippp
lrwxrwxrwx. 1 root root 20 Jul 19 05:45 ifdown -> ../../../sbin/ifdown
-rw-r--r--. 1 root root 188 Aug 5 21:06 ifcfg-eth0.bak
-rw-r--r--. 1 root root 216 Aug 5 21:20 ifcfg-eth1
[root@cdh1 network-scripts]# mv *eth1 ifcfg-eth0
[root@cdh1 network-scripts]# ls -ltr
total 204
-rw-r--r--. 1 root root 29835 Sep 1 2010 network-functions-ipv6
-rw-r--r--. 1 root root 9966 Sep 1 2010 network-functions
-rwxr-xr-x. 1 root root 1125 Sep 1 2010 net.hotplug
-rwxr-xr-x. 1 root root 4508 Sep 1 2010 init.ipv6-global
-rwxr-xr-x. 1 root root 3770 Sep 1 2010 ifup-wireless
-rwxr-xr-x. 1 root root 2482 Sep 1 2010 ifup-tunnel
-rwxr-xr-x. 1 root root 3490 Sep 1 2010 ifup-sit
-rwxr-xr-x. 1 root root 1712 Sep 1 2010 ifup-routes
-rwxr-xr-x. 1 root root 4154 Sep 1 2010 ifup-ppp
-rwxr-xr-x. 1 root root 2364 Sep 1 2010 ifup-post
-rwxr-xr-x. 1 root root 954 Sep 1 2010 ifup-plusb
-rwxr-xr-x. 1 root root 727 Sep 1 2010 ifup-plip
-rwxr-xr-x. 1 root root 10679 Sep 1 2010 ifup-ipv6
-rwxr-xr-x. 1 root root 11971 Sep 1 2010 ifup-ippp
-rwxr-xr-x. 1 root root 9944 Sep 1 2010 ifup-eth
-rwxr-xr-x. 1 root root 859 Sep 1 2010 ifup-bnep
-rwxr-xr-x. 1 root root 13454 Sep 1 2010 ifup-aliases
-rwxr-xr-x. 1 root root 1431 Sep 1 2010 ifdown-tunnel
-rwxr-xr-x. 1 root root 1367 Sep 1 2010 ifdown-sit
-rwxr-xr-x. 1 root root 651 Sep 1 2010 ifdown-routes
-rwxr-xr-x. 1 root root 1064 Sep 1 2010 ifdown-ppp
-rwxr-xr-x. 1 root root 1481 Sep 1 2010 ifdown-post
-rwxr-xr-x. 1 root root 4246 Sep 1 2010 ifdown-ipv6
-rwxr-xr-x. 1 root root 781 Sep 1 2010 ifdown-ippp
-rwxr-xr-x. 1 root root 5059 Sep 1 2010 ifdown-eth
-rwxr-xr-x. 1 root root 627 Sep 1 2010 ifdown-bnep
-rw-r--r--. 1 root root 254 Sep 1 2010 ifcfg-lo
lrwxrwxrwx. 1 root root 9 Jul 19 05:45 ifup-isdn -> ifup-ippp
lrwxrwxrwx. 1 root root 18 Jul 19 05:45 ifup -> ../../../sbin/ifup
lrwxrwxrwx. 1 root root 11 Jul 19 05:45 ifdown-isdn -> ifdown-ippp
lrwxrwxrwx. 1 root root 20 Jul 19 05:45 ifdown -> ../../../sbin/ifdown
-rw-r--r--. 1 root root 188 Aug 5 21:06 ifcfg-eth0.bak
-rw-r--r--. 1 root root 216 Aug 5 21:20 ifcfg-eth0
[root@cdh1 network-scripts]# service network restart
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/5
[ OK ]
[root@cdh1 network-scripts]#
[root@cdh1 network-scripts]#
[root@cdh1 network-scripts]#
Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'.
Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'.
http://blog.itpub.net/27099995/viewspace-1393157/
http://blog.itpub.net/27099995/viewspace-1393157/