DopW
September 3, 2019, 7:10am
1
Hi all,
I'm not an expert on networking and OpenWRT settings
I was wondering if it is possible to configure Ethernet interface and WiFi interface and keep them "divided".
I mean, i.e. se the WiFi as client, and get IP,Sub e Gateway from a Wireless access point and manually set the Ethernet interface with different IP, Sub and different Gateway.
Hope the question in clear enough.
Thanks
slh
September 3, 2019, 8:42am
2
Yes, option network "lan"
in /etc/config/wireless
doesn't need to be assigned (bridged) to your lan
network.
1 Like
DopW
September 3, 2019, 9:13am
3
Thanks for your reply
This is the /etc/config/network file:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option proto 'static'
option _orig_ifname 'eth0'
option _orig_bridge 'false'
option ifname 'eth0'
option netmask '255.255.255.0'
option enabled '1'
option ipaddr 'aaa.bbb.ccc.ddd'
option gateway 'aaa.bbb.ccc.eee'
config interface 'wifi'
option proto 'dhcp'
option ifname 'wlan0'
And this the /etc/config/wireless
config wifi-iface
option device 'radio0'
option mode 'sta'
option encryption 'psk2'
option key 'MyPass'
option ssid 'MySSID'
option network 'wifi'
And how to set eth1 interface?
The same as eth0? ( with different IP, sub and gateway as well )
Thanks
Your wifi interface should be static, and have no ifname defined.
1 Like
ulmwind
September 3, 2019, 1:12pm
5
stangri
September 3, 2019, 1:20pm
6
DopW:
option mode 'sta'
If you're using your WiFi as the upstream connection, look up how to configure wwan.
1 Like