Posts Tagged ‘scheme’

Fix eth changing network interface names from new Linux naming scheme ens, eno, em1 to legacy eth0, eth1, eth2 on CentOS Linux

Thursday, January 16th, 2020

Change-systemd-Linux-servers-network-interface-name-ensxx-to-eth0-copy

On CentOS / RHEL 7 / Fedora 19+ and other Linux distributions, the default network eth0, eth1 .. interface naming scheme has been changed and in newer Linux kernels OS-es to names such as – ens3 , eno1, enp5s2, em1 etc.,  well known old scheme for eth* is now considered a legacy.
This new Network card naming in Linux OS is due to changes made in Kernel / modules and udev  rules which resembles how Ethernet ifaces are named on other UNIX like systems.
The weird name is taken depending on the Hardware Network card vendor name and is a standard for years in FreeBSD and Mac OSX, however this was not so over the years,
so for old school sysadmins that's pretty annoying as, we're much used to the eth0 / eth1 / eth2 / eth3 naming standard which brought some clearness on the network card naming.

Also for systems which are upgraded from old Linux OS distro releases to a newer ones, that includes this great new "cool" feature, that fits so well the New age-of computing Cloud craziness.
That behaviour could create a number of problems, especially if the already Production working servers due to failure to bring up some of the network devices after the upgrade or, even if you fix that by editting the /etc/network* / etc/sysconfig/networking/* by hand still there is even more stuff that won't work properly, such as any custom made iptables / ipset firewalls rules, or any kind of custom used third party Shell / Perl scripts that depend on the old-school conventional and (convenient easy to remember!!!) eth0, eth2 etc. naming


For sysadmins who are using some kind of Application Clustering with something like corosync / pacemaker this new fuzzy improvement makes things even worse as having a changed interface name of the card will break the cluster …

 

1. Get list of the LAN Card Server hardware

 

To get a better view on the server installed and recognized LAN Cards use lspci / dmidecode commands:

 lspci |grep -i Ether -A1 -B1
01:00.4 USB controller: Hewlett-Packard Company Integrated Lights-Out Standard Virtual USB Controller (r                                                                                                           ev 03)
02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
02:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
02:00.2 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
02:00.3 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
03:00.0 RAID bus controller: Hewlett-Packard Company Smart Array Gen9 Controllers (rev 01)
05:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
05:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
05:00.2 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
05:00.3 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5719 Gigabit Ethernet PCIe (rev                                                                                                            01)
7f:08.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 QPI Link 0 (rev 02)

 

lspci reports all attached LAN Cards to server which are plugged in on the Motherbord, since that specific server has a Motherboard integrated LAN Adapters too, we can see this one
via dmidecode.

# dmidecode |grep -i Ether -A 5 -B 5

Handle 0x00C5, DMI type 41, 11 bytes
Onboard Device
        Reference Designation: Embedded LOM 1 Port 3
        Type: Ethernet
        Status: Enabled
        Type Instance: 3
        Bus Address: 0000:XX:00.X

Handle 0x00C6, DMI type 41, 11 bytes
Onboard Device
        Reference Designation: Embedded LOM 1 Port 4
        Type: Ethernet
        Status: Enabled
        Type Instance: 4
        Bus Address: 0000:0X:00.X

Handle 0x00C7, DMI type 41, 11 bytes


       Strings:
                PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)
                NIC.Slot.2.1
                HP Ethernet 1Gb 4-port 331T Adapter – NIC
                Slot 2

Handle 0x00E3, DMI type 203, 34 bytes
OEM-specific Type
        Header and Data:

 

The illustrate the eth0 changing name issue, here is example taken from server on how eth1 interface is named on a new CentOS install:
 

# ip addr show

…..
eno1: [BROADCAST,MULTICAST,UP,LOWER_UP] mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 6c:0b:84:6c:48:1c brd ff:ff:ff:ff:ff:ff
inet 10.10.9.5/24 brd 10.10.9.255 scope global eno1
inet6 2606:b400:c00:48:6e0b:84ff:fe6c:481c/128 scope global dynamic
valid_lft 2326384sec preferred_lft 339184sec
inet6 fe80::6e0b:84ff:fe6c:481c/64 scope link
valid_lft forever preferred_lft forever

 

 

2. Disable Network Manager on the server


To prevent potential problems for future with randomly changing Network card names order on reboots and other mess,
it is generally a good idea to disable Network Manager.

 

# systemctl disable NetworkManager
rm '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service'

 

3. Check and correct network configuration if necessery in  /etc/sysconfig/network-scripts/ifcfg-*


Either fix the naming across all files ifcfg-* to match eth0 / eth1 / ethXX or even better both change the NAME and DEVICE in files and completely rename the files ifcfg-eno1 to ifcfg-eth1 ..
ifcfg-enoXX to ifcfg-ethXX
 

server:~# cat /etc/sysconfig/network-scripts/ifcfg-eno1
……
NAME=eth0
DEVICE=eth0
……

 

4. Fix the interface scheme naming through passing a GRUB boot parameter to Kernel

 

a. Create backup of /etc/default/grub
 

cp -rpf /etc/default/grub /etc/default/grub_bak_date +"%Y_%m_%Y"


b. Edit /etc/default/grub

c. Find config parameter GRUB_CMDLINE_LINUX

d. Add net.ifnames=0 biosdevname=0 to the line

 

net.ifnames=0 biosdevname=0


After the change the line should look like

GRUB_CMDLINE_LINUX=" crashkernel=auto net.ifnames=0 biosdevname=0 rhgb quiet"

 

e. Regenerate GRUB loader to have included the new config

server:~# grub2-mkconfig -o /boot/grub2/grub.cfg

f. Reboot the sytem
 

server:~# shutdown -r now

 

5. Fix auto-generated inconvenient naming by modifying udev rules

The Mellanox Ehternet server card vendor's workaround to the ever changing eth names is modify udev rules to be able to have the ordinary eth0 / eth1 / eth2 … Lan card name scheme.
In short this is recommended for Mellanox but should work on any other Lan card device attached on a Linux powered server.
 

# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
BOOTPROTO="static"
HWADDR="7c:fe:90:cb:76:02"
IPADDR=10.10.9.2
NETMASK=255.255.255.0
ONBOOT="yes"

 

# cat /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE="eth1"
BOOTPROTO="static"
HWADDR="7c:fe:90:cb:76:02"
IPADDR=10.10.99.99
NETMASK=255.255.255.0
ONBOOT="yes"

 

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

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="7c:fe:90:cb:76:02", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="7c:fe:90:cb:76:03", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

 

Next step is to reboot.
 

# /sbin/reboot


After a while when the server boots check with ip or ifconfig the configuration to make sure the ethXX ordering is proper again.

interface-list-eth1-eth2-screenshot

# /sbin/ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.99.99 netmask 255.255.255.0 broadcast 10.10.9.255
inet6 fe80::7efe:90ff:fecb:7602 prefixlen 64 scopeid 0x20<link>
ether 7c:fe:90:cb:76:02 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 23 bytes 3208 (3.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 7c:fe:90:cb:76:03 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

On some Linux distributions, if it happens this udev extra configuration is not venerated, use net.ifnames=0 biosdevname=0 grub configuration.

6. Verify eth interfaces are present    

# ip addr show

…..

eth0: [BROADCAST,MULTICAST,UP,LOWER_UP] mtu 1500 qdisc pfifo_fast state UP qlen 1000

link/ether 6c:0b:84:6c:48:1c brd ff:ff:ff:ff:ff:ff

inet 10.10.9.5/24 brd 10.10.9.255 scope global eno1

inet6 2606:b400:c00:48:6e0b:84ff:fe6c:481c/128 scope global dynamic

valid_lft 2326384sec preferred_lft 339184sec

inet6 fe80::6e0b:84ff:fe6c:481c/64 scope link

valid_lft forever preferred_lft forever

That's all this should put an end to the annoying auto generated naming lan device naming.

 

Summary

 

So what was explained up was how to resolve problems caused by autogenerated ethernet interface cards by a new functionality in the Linux kernel, so Network cards are again visible via ip address show / ifconfig again in a proper order eth0 / eth1 / eth2 / eth3 etc. instead of a vendor generated cryptic names as ens / eno / em etc. This is possible via either by editing udev rules or grub configuration. Doing so saves nerves and makes sysadmin life better, at least it did mine.
That's all this should put an end to the annoying auto generated naming.
 

Color Trick Microsoft and Google use to keep their users loyal and happy unwalfully

Tuesday, June 12th, 2012

Color mind influence has been longly researched. It is researched and there are some findingings on how we people react on colors. This researches are not much known and most of them are not put on the internet (??) One model claiming to have explained how colors influence is called HBDIHerrmann Brain Dominance Instruments.

In the picture beginning of this post, I have presented a quick "Personal Profile" of HBDI on how one think in order to determine in "which colors" one tends to think more ___

In short HBDI model claims to explain how people think in another model.
My personal view of it is it is like most science nowdays more based on faith than on a clearly conducted scientific research and facts. We know pretty well many people tried to explain how brain operates and many people give models to explain it however none of the models could grasp in completeness the complexity of human brain. Hence Businessman people who use this model in their daily life and they push it to us has put the model in action not that they know it is working but rather they believe it does .., Saying this few words as introduction I will contninue onwards to explain you about HBDI as in the business world it is considered as a "Strategic Asset" for a company success. Hence the use of richest companies of the model has a serious impact on us the common people and unknowing (uninformed) computer users.

Some of the companies who integrated the HBDI to their models we all know are of course not strangely Microsoft and Google
;;;

Below I present you a picture showing the HBDI The Whole Brain Model |||

HBDI The whole brain model

Next I show you Microsoft Windows OS worldly "infamous" flag |||

Microsoft Windows OS Flag

You can see for yourself the basic color from HBDI WHOLE brain model are integrated in the Microsoft flag, only the order of colors present and the color gamma is different;;;;

The basic colors in HBDI model to explain how human brain works is separated in 4 segments as you can see from above screenshot. There are a number of tests one can do to determine what is his exact HBDI profile, and in abstract terms in which kind of colors he prefers to think.

There are a whole "army" of people involved into this sect like philosophy (I call it philosophy as surely every model that tries to explain everything is doomed to fail it is the nature in which God created the universe so complex and he put us be part of it and not controllers of it that any Universal model trying to explain it has never succeeded so far. The HBDI has some fruits for the only reason it is believed to work well by the people with money.

As you see in the colors HBDI claims there are 4 segments corresponding to four basic colors

  • BLUE
  • YELLOW
  • GREEN
  • RED

Each of the colors is an indicator on how the person tends to think the BLUE people as HBDI practicioners (believers) calls them are —

Analytical, Fact Based, Logal, Quantitative

The YELLOW oriented people are claimed to be —

Holistic, Intuitive, Integrating, Synthesizing

The GREEN ones in model terms are interested in —

Organizing, Sequentiality, Planning, Detailizing facts

Finally the RED Ones are said to be —

Interpersonal, Feeling based, Kinesthetic, Emotional

Now as you can understand this model though it looks like promising is based on a philosophy which rejects the existing of spirit realm God Angels or good or evil. It claims everything we're are or we want to be can be achieved following the HBDI to develop your own brain.

This model as every human made model however does reject the fact that besides internal factors and brains we're put into external environment most of which we cannot control and therefore even if we try our best to have certain goals and complete them the external uncontrolled facts can be a reason to stop us to complete our goals.

Now back to my point, that Google, Microsoft and probably many other products and physical goods are heavily using the HBDI color scheme ;;;
Here is the Google Inc. Logo the color trait of HBDI is there:

Google Search Engine Logo and HBDI 4 colors embedded

For those doubting that Google Inc. and Microsoft Inc. are along the false believers of HBDI color scheme brain ideology I present below the Logo of Google Web Browser =- Google Chrome

Google Web Chrome Browser Logo 4 colors HBDI microsoft flag

It is evident 4 colors used as a main ones in the HBDI tool are present in Google Chrome just like in Microsoft Windows logo flag, the only difference is in the order of colors.
Also it is interesting the name Chrome that Google Chrome took is most likely taken from Aldous Huxley's – Brave New World (A book depicting a short future highly conditioned society) , the book story line goes around a society programmed to do the things they do.

I assume it is very likely that Google's founders Sergey Brin or some of their subordinate working for Google are very much into the idea of conditioning people just like in the book and this is most likely the reason they choose the Chrome as a title for Google's browser ,,,

The 4 Colors from HBDI yellow, green, blue, red are embedded also in the google .ico file (the little icon showing in browser URL bar), below is a screenshot of a tab where google is opened showing the .ico image:

Google Icon 4 colors Linux Debian Epiphany Browser tab screenshot

Do you remember the good old Windows XP start button, have you noticed the Windows flag embedded in it, if not let me show you;;;

Microsoft Windows XP Start Button and HBDI 4 colors scheme

But wait the Windows flag placed on the left bottom of Ms Windows-es is not only on XP it is also on Windows 3.11 cover, Winblows 98, Vista, Windows 2003, Windows 2007 and actually all the M$ operating systems ever produced since the very early days M$ become a top OS producer :::

Windows 3.11 Operating system logo flag

Microsoft Windows 95 4 colors flag and blue sky

Here is also the 4 colored (a bit like Nazi like looking) flag on M$ Win-doze 7 |||

MS Windows 7 start Menu m$ windows well known flag

Also the Microsoft Flag is positioned on the bottom left screen on purpose. It is well known fact that most of the world (except Arabic) are used to read the text from Left to Right

, therefore it is natural for our eyesight to look for the text on the left side. I just wonder why they placed the START on the bottom and not on top. It is natural we read text and books from the most top to the most bottom ,,,.,

Even Apple Computers nowdays Macs has most likely used the HBDI as the main 4 colors and some gamma from rainbow colors are present on their Classical Apple Computer logo

Old Apple Computer/s logo colors of rainbow 4 hbdi colors are there

Makes me wonder if Jobs employed the HBDI model in his company. Well what is the reason for people loving so much this rainbow colors combination. If we think for a second outside of HBDI's brainwashing ideology for what each color would stand for. Well it is simple is comes from our young years most of the people between age 2 and 50 years has been more or less exposed to the so colorful Kids Cartoons, which are all so colorfully painted. Since our very early age we've placed in us a love for colorfulness outlook (well again not all of us for example I prefer less colors, I'm sure there are plenty of people who don't like the heavy colors we see in almost everywhere around us).

The problem with this 4 colors use on purpose and all this unnatural color placing everywhere is that it is unnatural and not in good synergy with our surrounding natural environment. Therefore I personally think using a colorful color paintings on everywhere in both computer programs and the physical world plays us a bad joke and is one of the reasons so many people are on the virge to get crazy nowdays and many have already had already cracked out.

It is my firm believe more and more people should be educated on the harm of HBDI and the fact that, we're forced to 'live it' unwilfully every day by using even as "simple things" as computers and daily technology or buying food in the super market ,,,