# Changing ehernet link level address and uuidgen command



## hishnik (Feb 24, 2022)

Hello.

```
> ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether 1c:87:2c:77:f4:c7
    inet 192.168.34.24 netmask 0xffffff00 broadcast 192.168.34.255
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```

If I change link level address on ethernet interface, for example:
`ifconfig re0 link 1c:87:2c:aa:bb:cc`
then i get:

```
> ifconfig re0                       
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether 1c:87:2c:aa:bb:cc
    hwaddr 1c:87:2c:77:f4:c7
    inet 192.168.34.24 netmask 0xffffff00 broadcast 192.168.34.255
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
```
, but when i run:

```
> uuidgen                  
276dc33f-9553-11ec-94e7-1c872c77f4c7
```
.

It uses hardware address attribute "hwaddr" for UUID generation, not link level "ether".

Can we change this behaviour?
Is it possible to change hwaddr?


----------



## covacat (Feb 24, 2022)

kernel uuidgen data is supplied by the network device driver when it is attached
so even if you can change hwaddr would have no effect


----------



## hishnik (Feb 24, 2022)

Thank you for paying attention to my question.


covacat said:


> kernel uuidgen data is supplied by the network device driver when it is attached


So, is it possible to change this data value (which uuidgen uses for generating UUID), for example with `sysctl` or somehow?


covacat said:


> so even if you can change hwaddr would have no effect


Can I instruct network card driver to forcibly change value of hwaddr attribute, `ifconfig` shows?


----------

