wiki:mfel_misnamed_ip_ports
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
wiki:mfel_misnamed_ip_ports [2017/01/20 12:16] – walkeradmin | wiki:mfel_misnamed_ip_ports [2017/03/09 19:57] – walkeradmin | ||
---|---|---|---|
Line 3: | Line 3: | ||
\\ | \\ | ||
\\ | \\ | ||
+ | \\ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <color purple>I initially thought this was a bug, but now realise this is normal operation, please see [[wiki: | ||
+ | |||
+ | ---- | ||
\\ | \\ | ||
After installing CentOS on to a server (software or appliance) you may have some IP ports that are incorrectly named. I have only seen this in CentOS v7.x and it mostly happens on SW only or appliance installs where the wrong CentOS .img file has been used (if you put the G7 CentOS7 build on a G6 for example). | After installing CentOS on to a server (software or appliance) you may have some IP ports that are incorrectly named. I have only seen this in CentOS v7.x and it mostly happens on SW only or appliance installs where the wrong CentOS .img file has been used (if you put the G7 CentOS7 build on a G6 for example). | ||
Line 48: | Line 55: | ||
\\ | \\ | ||
The configuration files need to match the interface names so that it is easy to identify which file belongs to which interface. Here is an example of the interface files before renaming (this server has 6 interfaces). | The configuration files need to match the interface names so that it is easy to identify which file belongs to which interface. Here is an example of the interface files before renaming (this server has 6 interfaces). | ||
+ | \\ | ||
+ | \\ | ||
+ | Navigate to / | ||
\\ | \\ | ||
* -rw-r--r--. 1 root root 282 Jan 20 00:37 ifcfg-enp4s0f0 | * -rw-r--r--. 1 root root 282 Jan 20 00:37 ifcfg-enp4s0f0 | ||
Line 56: | Line 66: | ||
* -rw-r--r--. 1 root root 281 Jan 20 00:37 ifcfg-ens513f3 | * -rw-r--r--. 1 root root 281 Jan 20 00:37 ifcfg-ens513f3 | ||
* -rw-r--r--. 1 root root 254 Sep 16 2015 ifcfg-lo | * -rw-r--r--. 1 root root 254 Sep 16 2015 ifcfg-lo | ||
+ | \\ | ||
+ | Once you have identified which file belongs to which interface, then you can rename the files using the mv command. | ||
+ | \\ | ||
+ | mv sourcefile destination file | ||
+ | | ||
+ | mv ifcfg-enp4s0f0 ifcfg-eth0 | ||
+ | \\ | ||
+ | Repeat this process until all of the files have been renamed. <color red> | ||
\\ | \\ | ||
\\ | \\ | ||
+ | ---- | ||
+ | ==== Edit the ifcfg-xxxxx files ==== | ||
+ | \\ | ||
+ | \\ | ||
+ | The files will now need to be edited, and a few changes made to **each** file. Open the file ifcfg-eth0 | ||
+ | \\ | ||
+ | \\ | ||
+ | < | ||
+ | TYPE=Ethernet | ||
+ | BOOTPROTO=dhcp | ||
+ | DEFROUTE=yes | ||
+ | IPV4_FAILURE_FATAL=no | ||
+ | IPV6INIT=yes | ||
+ | IPV6_AUTOCONF=yes | ||
+ | IPV6_DEFROUTE=yes | ||
+ | IPV6_FAILURE_FATAL=no | ||
+ | NAME=enp4s0f0 | ||
+ | UUID=1c31d575-3a80-41c0-ad24-92be3d9b7b9e | ||
+ | DEVICE=enp4s0f0 | ||
+ | ONBOOT=yes | ||
+ | PEERDNS=yes | ||
+ | PEERROUTES=yes | ||
+ | IPV6_PEERDNS=yes | ||
+ | IPV6_PEERROUTES=yes | ||
+ | </ | ||
+ | \\ | ||
+ | Add or Edit the following lines: | ||
+ | \\ | ||
+ | \\ | ||
+ | DEVICE=eth0 <color red>This should be the actual interface name, you don't have to change the DEVICE name</ | ||
+ | HWADDR=00: | ||
+ | ONBOOT=yes <color red>If this is no, change it to yes</ | ||
+ | \\ | ||
+ | Make these changes for all of the files. | ||
+ | \\ | ||
+ | \\ | ||
+ | ---- | ||
+ | ==== Reboot and Check ==== | ||
+ | \\ | ||
+ | Reboot the server, once logged back in, navigate to the folder with the Interface configuration files. | ||
+ | \\ | ||
+ | cd / | ||
+ | \\ | ||
+ | Use <color red>ip a</ | ||
+ | \\ | ||
+ | * 2: eth2: < | ||
+ | * 3: eth3: < | ||
+ | * 4: eth4: < | ||
+ | * 5: eth5: < | ||
+ | * 6: eth0: < | ||
+ | * 7: eth1: < | ||
+ | \\ | ||
+ | If all is well you should now have eth0, eth1 etc for interface names. | ||
+ | \\ | ||
+ | \\ |
wiki/mfel_misnamed_ip_ports.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1