Configure MAC addresses and IP addresses

  • Configuring a MAC Address
vim /etc/udev/rules.d/70-persistent-net.rules
Copy the code

00:0C:29:06:91:E1

  • The configuration address
vim /etc/sysconfig/network-scripts/ifcfg-eth0
Copy the code

  • Example Change HWADDR to a MAC address
  • Modify the ONBOOT
    • If the value is changed from no to yes, the NIC is enabled upon startup
  • Modify BOOTPROTO
    • If DHCP is changed to static, the DYNAMIC IP address is changed to static
  • Add IPADDR, GATEWAY, NETMASK, and DNS1
  • Restart after the configuration is complete
    reboot
    Copy the code