Setting Static IP address and DNS on Luckfox Pico Pro Max

  • Hello, you can add the startup script S99usb0staticip in /etc/init.d
    add

    Code: Select all

    ifconfig usb0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
    route add default gw xxx.xxx.xxx.xxxd
    echo "nameserver 114.114.114.114" > /etc/resolv.conf
    
    usb0 ip is already set up in the S50usbdevice and S90usb0config, and you need to make sure that the new scripts run after them.
    50 and 90 indicate the execution sequence.
    Note: The S99usbstaticip requires the use of chmod a+x to add executable permissions.

    To ensure that you can use the network properly, share the network to Remote NDIS based Internet Sharing Device.
    share net.jpg
  • Thank you. I will try that.

    With regards to the Static IP on Eth0, do I need to modify the init.d file S40network or create a new file for the Eth0 interface the same as you have described?
  • torchris4 wrote: 2024-02-23 2:37 Thank you. I will try that.

    With regards to the Static IP on Eth0, do I need to modify the init.d file S40network or create a new file for the Eth0 interface the same as you have described?
    You don't need to modify S40network. You can create a new file S99eth0staticip with the eth0 configuration.
    add

    Code: Select all

    ifconfig eth0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
    route add default gw xxx.xxx.xxx.xxx
    echo "nameserver 114.114.114.114" > /etc/resolv.conf
    
    Since I'm in China, I use 114.114.114.114 as my DNS address. You can try changing it to 8.8.8.8.
  • Yes, I just figured it out! Thanks!