Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out the uuid for eth0?

 
Sreer
Valued Contributor

How to find out the uuid for eth0?

Hello Gurus,

 

it may be a funny querry... How to get the uuid for a lancard? Google is not giving correct answer!! and it is bit urgent....So I need your help...

 

My server is

[root@dl36-373 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)
[root@dl36-373 ~]#
[root@dl36-373 ~]#
[root@dl36-373 ~]# uname -a
Linux dl36-373 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@dl36-373 ~]#

 

 

Rgds

Sree

 

3 REPLIES 3
Matti_Kurkela
Honored Contributor

Re: How to find out the uuid for eth0?

What do you need the UUID for?

 

I don't think a LAN card is guaranteed to have an UUID at all. 


However, the system as a whole often has an UUID, and when you are booting from a network, the firmware PXE boot code may announce the system UUID to the DHCP server when it requests network parameters for booting. Then the DHCP server may use the UUID when deciding which parameters to give to the system that is booting from the network.

 

If the system UUID is what you're looking for, you can see it with this command:

# dmidecode -s system-uuid

 

If the system does not yet have an OS installed, check the BIOS settings screens: sometimes the system UUID is listed in one of those screens.

MK
Sreer
Valued Contributor

Re: How to find out the uuid for eth0?

Hi  Matti,

 

Thanks for reply.

 

It seems there is even UUID for lan cards!

 

I installed RHEL6 from a iso image.

it was preconfigured with uuid!  but not with system uuid..

 

[root@dl36-373 network-scripts]# cat ifcfg-eth1
DEVICE="eth1"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"
UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04
HWADDR=00:23:7D:32:4E:6E
IPADDR=192.168.60.14
PREFIX=24
GATEWAY=192.168.60.1
[root@dl36-373 network-scripts]#
[root@dl36-373 network-scripts]# dmidecode | grep -i uuid
        UUID: 34353939-3539-4D58-5138-343541315433
[root@dl36-373 network-scripts]# dmesg | grep -i 9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04
[root@dl36-373 network-scripts]# dmidecode | grep -i 9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04
[root@dl36-373 network-scripts]#

 

[root@dl36-373 network-scripts]# dmidecode -s system-uuid
34353939-3539-4D58-5138-343541315433
[root@dl36-373 network-scripts]#

 

Rgds Sree

 

Highlighted
UDRR
Occasional Visitor

Re: How to find out the uuid for eth0?

UUID is generated using uuidgen <interfacename>

# uuidgen ifcfg-eth0

Everytime it will generate a unique id for the interface in the local system, using random number generator or time based.

You will not get the same id generated once again