Thursday, October 15, 2015

.::: How To Change eth1 to eth0 Permanent :::.


1. Check hardware address
[root@SAMprimer ~]# ifconfig -a
eth1      Link encap:Ethernet  HWaddr 00:0C:29:55:44:33 
          inet addr:192.168.1.10  Bcast:192.168.5.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe54:5242/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6757447 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3520232 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9595152162 (8.9 GiB)  TX bytes:298962001 (285.1 MiB)

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:1399303 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1399303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:886349100 (845.2 MiB)  TX bytes:886349100 (845.2 MiB)

[root@SAMprimer ~]#

2. Change 70-persistent-net base on hardware address

[root@SAMprimer ~]# 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 0x15ad:0x07b0 (vmxnet3)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:59:b4:50", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:55:44:33", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
[root@SAMprimer ~]#

3. Reboot machine
# init 6
or
# reboot

4. Check ifconfig -a
[root@SAMprimer ~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0C:29:55:54:33 
          inet addr:192.168.1.10  Bcast:192.168.5.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe54:5242/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6757447 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3520232 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9595152162 (8.9 GiB)  TX bytes:298962001 (285.1 MiB)

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:1399303 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1399303 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:886349100 (845.2 MiB)  TX bytes:886349100 (845.2 MiB)

No comments:

Post a Comment

Popular Posts