Static ip

  • Hi,

    i have orangepi lite and i'm running latest libreelec 9.1 update. i'm using a cheap usb-lan and it hasn't a preset mac address so at each boot there is a new mac.

    i solved this using this post procedure adapted to lan interface :

    Code
    (
    sleep 10
    /usr/sbin/ip link set dev eth0 down
    /usr/sbin/ip link set dev eth0 address 11:22:33:44:55:66
    /usr/sbin/ip link set dev eth0 up
    )&

    after that the mac is unchanged and appears with ifconfig but with ip still no success from both command line or gui , so i tried with fixed mac from u-boot with these commands

    Code
    setenv -f ethaddr 11:22:33:44:55:66
    
    saveenv

    the command is successfull and at u-boot prompt if i type

    Code
    printenv
    .....
    ethaddr 11:22:33:44:55:66
    .....

    the correct mac is displayed. but the fixed ip still doesn't work. am i missing something? is there something else that should be done with connman ?

  • Does your router (or whatever is running as your DHCP server) definitely always give the same DHCP leased IP address to the same MAC address? Not all routers do.

  • I don't think so, and i can't configure static ip based on mac from router or i still haven't found it yet. The problem seems related to kodi. here are two reboots :

    1st one :

    snd reboot :

    and in Kody interface, in system info i have another MAC address : 52:03:B0:93:41:AA, but sometimes it is the correct assigned MAC.

  • Sorry for replying so late,

    the problem is solved , but from outside both kodi and Libreelec. Since the chip used in my usb dongle is a well-known RTL8153 i used the flashtool from realtek and assigned a mac address (which was marked 00:00:00:00:00:00 before flash) now i have have a normal static ip without the need for the autostart.sh, but i did not change the u-boot assignment.

    May be the problem was related to kodi.