how should I set network sharing for a busybox Linux (no DHCP)?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how should I set network sharing for a busybox Linux (no DHCP)?
Hi. I connected a host PC with a raspberry Pi. An Ubuntu runs on the host PC and a busybox runs on the Pi without DHCP.
So I set the Ubuntu should share its own Ethernet connection. Cause the option "make available to other users" is set in default.
Then I set the static IP on the PI. And the gateway(The IP of the host PC).
So I can ping the host PC, but when I tried to ping google DNS: 8.8.8.8. It says:
12 packets transmitted, 0 packets received, 100% packet loss
Go to the Ubuntu network manager settings, and edit the Wired Connection. Go to IPv4 settings, and change the connection method to "Shared to other computers".
Then, on the Raspberry Pi, make sure to set a static IP in the range defined by the host PC's shared internet connection settings (if you don't know what these are, then set it to 10.42.0.2 - you can replace "2" with a number between 2 and 254). For the gateway, set it to the host PC's wired connection IP address, not the IP address it is using on its WiFi connection (or other ethernet device). If you don't know what this is, then it is 10.42.0.1
Basically, the "Shared to other computers" connection method turns your computer into a simple router. In older version of Network Manager, there was no configuration possible on this - it invariably used 10.42.0.1 as the local IP address with a subnet of 10.42.0.X. In current versions, you can optionally set a different IP address and subnet.
Go to the Ubuntu network manager settings, and edit the Wired Connection. Go to IPv4 settings, and change the connection method to "Shared to other computers".
Then, on the Raspberry Pi, make sure to set a static IP in the range defined by the host PC's shared internet connection settings (if you don't know what these are, then set it to 10.42.0.2 - you can replace "2" with a number between 2 and 254). For the gateway, set it to the host PC's wired connection IP address, not the IP address it is using on its WiFi connection (or other ethernet device). If you don't know what this is, then it is 10.42.0.1
Basically, the "Shared to other computers" connection method turns your computer into a simple router. In older version of Network Manager, there was no configuration possible on this - it invariably used 10.42.0.1 as the local IP address with a subnet of 10.42.0.X. In current versions, you can optionally set a different IP address and subnet.
hi Issac, I think I missed one thing. In my version of Ubuntu, there's no such option as "Shared to other computers"
Under iPc4 setting, there's only User this connection only for resources on its network. I do not know if it means the same?
Idk GUI, but does the Ubu box get to the internet by wifi (or other wired nic)?
If so, maybe you need the kernel setting of ip forwarding, to act as router.
(For more details, web-search fastest) tcpdump to debug
Idk GUI, but does the Ubu box get to the internet by wifi (or other wired nic)?
If so, maybe you need the kernel setting of ip forwarding, to act as router.
(For more details, web-search fastest) tcpdump to debug
oh. I am not ready for the kernel compilation. I mean I thought the PC version should have already enabled enough options for me....
While the applet is updated the settings as described in the link should still be the same.
So I assume that your host PC is wireless and that you want to share the internet via its ethernet connection.
Does the Pi have a defined route?
The PC is connected to the internet via Ethernet and the connection between Pi and PC is a USB-Ethernet.
The Pi does not have DHCP and I just set the static IP of the Pi and the IP of the USB-Ethernet of the PC under the same sub-net. So I can ping the Pi from the PC and vise versa.
But I cannot let the Pi share the internet of the PC.
When you edit the connection settings for the USB ethernet under IPV4 is there a method pull down menu like in the link I posted?
Nope. This is also the thing that confused me for long. Cause before I post this, I've already searched for it. But in my case, there's no such option...
Interesting. I ran standard Ubuntu 17.4 as a Virtual Machine with a USB ethernet adapter and it was just as described. My connection naming will be different then yours and I did not actually configure it for sharing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.