How to generate UUID for network interface on RHEL/CentOS

UUIDs (Universal Unique Identifier) for network interface card can be generated using the following command (CommandShell):

uuidgen [device]

Example ( CommandShell ):

uuidgen eth0

Then you can add it to your NIC config file (assuming your interface is eth0) :

/etc/sysconfig/network-scripts/ifcfg-eth0

Add/modify the following (NIC configuration file):

UUID=[uuid]

Done.