OpenWrt Forum Archive

Topic: changing wan ip and subnet mask

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi
I am sharing my android phone internet to openwrt
wan port is dhcp client and also has 192.168.42.60/24
I am looking some way to change this ip (for exampel IPv4: 192.168.2.60/24 even virtually)
because wan port is dhcp client and gateway is 192.168.42.1 i want to change this gateway
i know there is some way to add interface for wifi (for example or vlan) with ip 192.168.2.60 and wifi use that ip range
is there any way to set wifi (or vlan) with that ip (that i want to be change) act as wan for lan interface?
i mean wifi get internet from wan and give it to lan!
with this method wan ip range of lan will be 192.168.2.x/24
is there any way?
or maybe a simpler way?
i want change wan ip range
please help

Best Regards?

If the WAN interface is configured as DHCP client, then you must change the configuration in the DHPC server (your android phone, if I understood your post correctly). You could change to a fixed configuration and set those parameters yourself, but then you will lose all internet connection.

On the other hand, I think you should have a look to the "client mode wireless" at: https://wiki.openwrt.org/doc/howto/clientmode

thanks for your reply
you say i can change my android hotspot ip range? how?
I need someway different abound client mode
because i want to use for 4 wans and wifi does not support 4 clients!
please help

Regards

eduperez wrote:

If the WAN interface is configured as DHCP client, then you must change the configuration in the DHPC server (your android phone, if I understood your post correctly). You could change to a fixed configuration and set those parameters yourself, but then you will lose all internet connection.

On the other hand, I think you should have a look to the "client mode wireless" at: https://wiki.openwrt.org/doc/howto/clientmode

Why do you need to change the IP range? I don't think there is a settings for that in Android anyway.

I do not know how to configure your android device, perhaps you should ask in the android forums.
Anyway, perhaps you should give us more details about what you are trying to achieve.

thanks again for your reply
I wana make loadbalancing by mwan3
I have 3 android phone and want to connect theme by usb and make loadbalancing for bonding bandwidth
I configuraed mwan3 but because android usb tethering has ip 192.168.42.x all of wan connections have same subnet and gateway and mwan3 can't work!
but for example when I use one phone by wifi (witch has 192.168.43.x ip range) and one phone with usb (witch have 192.168.42.x) I get the bonding bandwidth
so i am looking for some way to make mwan3 works for all phone by usb tethering
please help!

Regards!

eduperez wrote:

I do not know how to configure your android device, perhaps you should ask in the android forums.
Anyway, perhaps you should give us more details about what you are trying to achieve.

Unless you can change the configuration from the android devices, I do not see how to make that work.

Thanks alot for your reply
but I can do it manually!
for example creating vlan for usb wan connection and untag it to one physical lan
connectint it to another access point's wan port witch has lan ip range for example with 192.168.2.x/24
after that connect lan port to wan port of openwrt
with this method wan port ip address change!
I believe I can do it with openwrt
but how!? i don't know!
please help

Best Regards!

eduperez wrote:

Unless you can change the configuration from the android devices, I do not see how to make that work.

The discussion might have continued from here.