garywill / linux-router

Set Linux as router in one command. Support Internet sharing, redsocks, Wifi hotspot, IPv6. Can also be used for routing VM/containers 🛰️ (也欢迎关注B站 https://space.bilibili.com/2123686105 )
GNU Lesser General Public License v2.1
1.71k stars 152 forks source link

Make DHCP Range Configureable [Feature Request] #5

Open diveyez opened 5 years ago

diveyez commented 5 years ago

Perhaps to utilize this more efficiently across all systems, we should enhance this to allow configuration inside of the command to launch lnxrouter as to provide DHCP range configuration, due to problems with some networks, the default will not work for me. I feel some others will also have the same problem.

I think --dhcp-range should work, allowing a /24 of xxx.xxx.xxx.xxx , this provide ability to layer as subnet next to the providing iface's (eth0) base range. Allowing microsoft to be have with this. iOS and MacOS seem fine but microsoft gets major packet loss and delays on connecting from time to time due to address assignments being abnormal for their shitty networking code in windows 10.

Just an idea, I will fork and modify myself, if you say yes to this, I will code in the functions for it happily.

Respect, R.N.

garywill commented 5 years ago

Hi there, Thank you for feedback. I didn't quite understand your problem. Could you be more clear?

allowing a /24 of xxx.xxx.xxx.xxx

Now lnxrouter reads the -g a.b.c.x to set the subnet as a.b.c.0/24. DHCP server follows that setting and assign range a.b.c.10-250 to clients. Without -g it uses 192.168.(random).0/24 as subnet (will automatically detect and avoid conflict). Is that -g what you mean "DHCP range"?