skanc.com Linux, Microsoft, Raspberry Pi, Python, Android

29Mar/140

Centos – Tips & Tricks 02 – Copied or Cloned Centos VM’s Network Configuration

1. Network connection name to find out which PCI device is controlling it.

# ls /sys/class/net/

eth0 lo

 

2. Copying/moving which the name of the network adapter changes (from eth0 to eth1).

# cat /etc/udev/rules.d/70-persistent-net.rules

Remove eth0 whole line.

# PCI device 0x8086:0x100f (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:48:95:77", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Rename eth1 to eth0

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4d:fd:91", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

 

3. Insert MAC address ifcfg-eth0 file.

#/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=00:0C:29:4D:FD:91
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.12.10
GATEWAY=192.168.12.2
DNS1=192.168.12.2
DNS2=195.175.39.39

 

Centos_MAC_Address_01

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.