networking - How to generate an unique ID for a given linux machine? -
my python application running daemon in variety of linux distributions trying register server using machine's ip address , fqdn hostname(given "hostname -f" command) primary key.
now facing problem when 2 machines having same hostname , ip address. eg in case of 2 vm's running on 2 seperate machines, hostname "localhost.localdomain" , ip address "192.168.0.2" both of them.
is there unique way differentitate 2 machines. (maybe other third parameter guarantee uniqueness across linux machine )
the mac address should unique per network interface. maybe can try combination of ip, mac , host name?
another option create uuid , save on machine.
Comments
Post a Comment