Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • O OpenStack-Cloud
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Requirements
    • Requirements
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Christopher Hauser
  • OpenStack-Cloud
  • Wiki
  • eth if names

Last edited by Christopher Hauser Jan 15, 2016
Page history

eth if names

Ethernet Interface names

  1. The Grub Bootloader needs a flag, to forget about the actual IF names.

1.1 for diskless nodes, add in file pxelinux.cfg/default to the append line net.ifnames=0

1.2 on disk installations, update all files vim /etc/sysconfig/network-scripts/ifcfg-*, update grub config /etc/default/grub and add to the line GRUB_CMDLINE_LINUX at the end net.ifnames=0, rebuild grub afterwards with grub2-mkconfig -o /boot/grub2/grub.cfg

# change computenode network interface names
cd /etc/sysconfig/network-scripts/
mv ifcfg-eth0 ifcfg-ethctrl
sed -i 's/eth0/ethctrl/' ifcfg-ethctrl
mv ifcfg-eth1 ifcfg-ethdata
sed -i 's/eth1/ethdata/' ifcfg-ethdata

# change grub
line=$(cat /etc/default/grub | grep "GRUB_CMDLINE_LINUX")
linenew=$(echo ${line::-1}" net.ifnames=0\"")
echo "please change if not correct:"
echo $linenew
linenew=$(echo $linenew | sed 's/\//\\\//g')
sed -i 's/GRUB_CMDLINE_LINUX.*$/'"${linenew}"'/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
  1. Tell udev to rewrite. Create /etc/udev/rules.d/70-persistent-net.rules with:
MAC_CTRL=$(cat ifcfg-ethctrl  | grep HWADDR | cut -d'=' -f2)
MAC_DATA=$(cat ifcfg-ethdata  | grep HWADDR | cut -d'=' -f2)

echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'${MAC_CTRL}'", ATTR{type}=="1", KERNEL=="eth*", NAME="ethctrl"' > /etc/udev/rules.d/70-persistent-net.rules

echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'${MAC_DATA}'", ATTR{type}=="1", KERNEL=="eth*", NAME="ethdata"' >> /etc/udev/rules.d/70-persistent-net.rules

Change the MAC address to the right ones ...

Clone repository
  • Add Computenode to Beta cluster
  • disk partitioning
  • eth if names
  • ganglia
  • Home
  • ipmitool
  • kickstart
  • networking
  • neutron external
  • nova migration
  • omi clusterlab addnode
  • omi clusterlab index
  • omi clusterlab nodes
  • opendaylight
  • openstack export image
View All Pages