Hello all, I need help on the steps to configure OpenWRT.
I went to network > switch. I configured 4 VLANS, VLAN 1 untagged to port 1 (off the other ports). VLAN 2 untagged port 2 (off the others). etc...
Then I went to interfaces, I created device br-VLAN2, bridge port eth0.2. Afterwards interface with adress 192.168.2.2 (VLAN3 has a br-VLAN3 with adress 192.168.3.2).
I wish the openWRT to use addresses 192.168.X.2
Up to that point it seemed to work, I can connect a laptop to port 3 for example and it can see and ping openWRT. Now the laptop uses gateway 192.168.3.2 but no internet
The internet is on VLAN2 with adress 192.168.2.1
so considering I have 4 VLANs (one of each port) and 4 devices br-VLANx with interfaces 192.168.x.2 then how can I:
1 - All the Vlans should use 192.168.2.1 as internet gateway.
2 - All computers on one Vlan are isolated from the computers on a different vlan
3 - define a specific computer to access all computers on all vlans.
If you can answer just question 1 it will already be a good starting point.
I can probably help you get going... but we'll need more information.
Is this the main router, or is this just an AP/switch on your network?
if this is not the main router, does the main router support VLANs and are they configured there? Is that device running OpenWrt?
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
It's not the main router. I have a router offering internet access at address 192.168.2.1 but the router doesn't support vlans. The router is a Bell Home Hub 3000 so I can't install openWRT on it. I would set the openWRT at address 192.168.2.2 and coordinate the VLANs.
I have a L2 switch that supports VLANs and a bunch of dumb switches.
ubus call system board
{
"kernel": "5.10.176",
"hostname": "OpenWrt",
"system": "Broadcom BCM5357",
"model": "Unknown Board",
"board_name": "0xF550:42",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "22.03.4",
"revision": "r20123-38ccc47687",
"target": "bcm47xx/mips74k",
"description": "OpenWrt 22.03.4 r20123-38ccc47687"
}
}
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdc7:8b8**********e::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 5t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 5t'
config switch_vlan
option device 'switch0'
option ports '2 5t'
option vlan '3'
config switch_vlan
option device 'switch0'
option ports '3 5t'
option vlan '4'
config device
option name 'eth0.3'
option type '8021q' <--- should I config the devices like this (802.1q) or as a bridge ?
option ifname 'eth0'
option vid '3'
option mtu '1500'
option macaddr 'C0:C1:C0:**********'
config interface 'VLAN3'
option proto 'static'
option device 'eth0.3'
option netmask '255.255.255.0'
option ipaddr '192.168.3.2'
config device
option type 'bridge'
option name 'VLAN4'
list ports 'eth0.4'
option bridge_empty '1'
option mtu '1500'
option macaddr 'C0:C1:C0**************'
config interface 'VLAN4'
option proto 'static'
option device 'VLAN4'
option ipaddr '192.168.4.2'
option netmask '255.255.255.0'
list dns '8.8.8.8'
list dns '8.8.4.4'
config device
option type 'bridge'
option name 'br-VLAN2'
list ports 'eth0.2'
option bridge_empty '1'
option mtu '1500'
option macaddr 'C0:C1:C***********'
config interface 'lan2'
option proto 'static'
option device 'br-VLAN2'
option ipaddr '192.168.2.2'
option netmask '255.255.255.0'
option gateway '192.168.2.1'
root@OpenWrt:~# cat /etc/config/wireless
cat: can't open '/etc/config/wireless': No such file or directory
root@OpenWrt:~# cat /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
I have redacted the MAC adddress the rest I don't mind. The current configuration isn't good, I have been playing with the configs trying stuff Right now each vlan is configured in a different way. Also I haven touched the default lan. Pretty sure the network>switch config is good, one Vlan on each port serves me very well, I have several dumb switches and I will connect one onto each port and have physical separated vlans (no need to share ports). But the devices and interfaces not sure and I don't know how to make them use internet on Vlan2.
I haven't touched the firewall. Also didn't setup DHCP, no need as I use fixed ip
I installed it myself. It's a Linksys E2500 v1. I opened it and jtag it to be able to install openWRT. It seems to work pretty well up to date. The wireless is disabled, but it's okay for my needs. I just need a router to separate the 4 VLANs and route the communication between the VLANs (isolate all the Vlans, but they should be able to accès internet on vlan2, and 1 machine on Vlan2 should be able to access all the machines on all the vlans, this is my ideal configuration)
I'm good with electronics and computers on general, but I have a low/medium knowledge with networks. I have never configured Vlans, so I'm unsure what should I do to make it work. If you can simply write the general steps in an easy way I should be able to configure:
1 - in network> switch configure vlans
2 - in network > interfaces>devices create bridge devices
3 - in network >interfaces create the lans and set the ip adresses of each network
4 - ????
Strange... I wonder why the model information is missing.
Nevertheless, a few things:
You should upgrade to the latest (23.05.4) before we start configuring the device. During the upgrade, uncheck the 'keep settings' box (or if on the command line, use the -n argument) to reset the device to defaults during the upgrade process.
This device is not really suitable for wifi due to the Broadcomm 47xx chipset which is just barely supported within OpenWrt (due to the fact that the drivers were not opensourced by Broadcomm). As such, it's fine as a managed switch, but don't do anything with wifi (you'll be really unhappy).
It is an older device, so don't expect a ton in terms of bandwidth when routing (which is necessary for your configuration since the upstream router doesn't have VLAN support). It will work, but keep your expectations in check with respect to the actual routed speed of of the downstream networks.
Once the upgrade is complete, post the default config files and we'll go from there.
Of course the bandwitch of an old router will be poor. If's ok. I expect the computers on VLAN2 to directly access the internet, so they will not use openWRT. The devices on VLAN1 will be my Iot, so they just need to access home assistant instance on VLAN2. VLAN3 will use the bandwich, there are 10 asic miners on it, so even if the router is old I expect it will be enought to route those 10 asics and occassionally the iot devices who call home assistant.
The home assistant is on a NAS with plex, that will be accessed by all the computers on VLAN2, so I think it's best if the NAS stays on VLAN2. I have a big netgear L2 switch that is able to do port segmentation of the lans, so I will define 4 VLANS on the switch and assign specific ports of the switch to each VLAN. Then OpenWRT can use 4 wires from the 4 ports into the VLAN segments of the switch and basically route VLAN3 to use VLAN2 internet. If I managed to configure just VLAN2 and VLAN3 to separate the asics it will be a good enought starting point for me. So please guide for the bare minimum, no need for help with the netgear L2 switch, it's easy to configure the VLAN segmentation on it.
I need to do some segmentation of my home network because computers+ asics + iot devices = small network performance issues. just for information, currently there are 65 devices plugged at my house...
The info below is straight after the firmware upgrade. I just set the password of the unit and touched nothing at all. It's strange it says model E2500 v3, I have a v1 I'm pretty sure about it, but anyway it works so I don't mind.
Ok... things look better now, but it is odd that your device is apparently coming up as a v3 even though you said it is a v1. Did you flash the v1 imgae file (the one I linked earlier)?
Anyway, now we can start getting to work... just one more thing that we need to clarify... what should each port do, functionally. For example (making this up):
wan: vlan 2/upstream network connection
wan IP 192.168.10.2/24, upstream gateway 192.168.10.1