Hello to you all,
Over the years my network grew. It used to be one PC and a printer. Now even the dishwasher wants internet access, there are tablets from the kids and all kind of devices use the network I cant keep track. A while ago I did buy a OpenWrt capable router.
What I want
- one part with dirty PC's tablets and so on.
- Another part will be the part where my personal (hopefully) clean PC's will be running.
- On the clean network there needs to be a MasterPC to config the router, access points, switch and printer (on the dirty network)
- The IP camera's may only access a SBC (Single Board Computer, something like a Pi). On the SBC there is some software controlling the camera's. All PC's may access the SBC, but may not access the camera's.
Well at least that's the idea. I'll try to achieve this one step a time, and testable, I hope not to stop /kill the network for days. I did buy a new managed switch. I hope to connect some old Raspberry Pi SBC's (Pi-A and Pi-B) to the managed switch and test If I can ping, login to them with SSH, SSH to Pi-A and ping PI-B, SSH from the Master-PC to Pi-A to Pi-B etc. Or ssh to Pi-B and see I cannot ssh / ping to Pi-A.
Here is a picture I made:
Nope
Below is what I did read and what I did try. However I get a rollback because some settings are wrong. I started with the managed switch connected, The Master-PC on the managed switch. For Now I have the Master-PC on the un-managed switch. As I want to start with a VLan on Lan1. I thought maybe only Lan1 is not accessible anymore when the IP range goes from 192.168.0.x to 192.168.10.x
What I did
I did read this Mini tutorial:
In the end there is part 4 which looks like the best starting point for me:
Device
I did manage to add a device using LuCi Network>>Interfaces>>Device
I did see a youtube, (need to find the link can get back on this one) in the video 802.1q was chosen, however there are more options:
- 802.1ad
- MAC Vlan
- Virtual Ethernet
is 802.1q okay?
Interface
I did add an interface Network>>Interface
Here I get to choose the: gateway and the firewall zone. I could argue that if the switch in the router is named br-lan and VLan10 is named br-lan.10, they both can use the same firewall. But I must not define a separate gateway for VLan10 (now the gateway points to the modem). But I am not sure. LuCi tell's me Vlan10 is Up and running. I did not add a separate VLan for the 'old dirty network'. Do I need to add a new interface for VLan ID 1?
Rollback
When I eddit the bridge vlan filtering save and apply then I get the rollback openwrt tell's askes me if I want to put back the latest settings which did work.
I can ssh into the router and do cat network:
root@GL-MT6000:/etc/config# cat 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 'fd3e:4d9b:5272::/48'
config device
option name 'br-lan'
option type 'bridge'
option macaddr '94:83:c4:a7:60:d0'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'lan5'
config device
option name 'lan1'
option macaddr '94:83:c4:a7:60:d0'
config device
option name 'lan2'
option macaddr '94:83:c4:a7:60:d0'
config device
option name 'lan3'
option macaddr '94:83:c4:a7:60:d0'
config device
option name 'lan4'
option macaddr '94:83:c4:a7:60:d0'
config device
option name 'lan5'
option macaddr '94:83:c4:a7:60:d0'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.0.2'
option netmask '255.255.255.0'
option ip6assign '60'
option isolate '0'
config device
option name 'eth1'
option macaddr '94:83:c4:a7:60:ce'
config interface 'wan'
option device 'eth1'
option proto 'dhcp'
option force_link '0'
option ipv6 '0'
option classlessroute '0'
option metric '10'
option vlanid '0'
option peerdns '1'
config interface 'wan6'
option proto 'dhcpv6'
option device '@wan'
option disabled '1'
config interface 'tethering6'
option device '@tethering'
option proto 'dhcpv6'
option disabled '1'
config interface 'wwan6'
option device '@wwan'
option proto 'dhcpv6'
option disabled '1'
config interface 'guest'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.9.1'
option netmask '255.255.255.0'
option ip6assign '60'
option multicast_querier '1'
option igmp_snooping '0'
option isolate '0'
option bridge_empty '1'
option disabled '1'
config interface 'wwan'
option proto 'dhcp'
option classlessroute '0'
option metric '20'
config interface 'secondwan'
option ipv6 '0'
option proto 'dhcp'
option metric '15'
option force_link '0'
option classlessroute '0'
config interface 'secondwan6'
option proto 'dhcpv6'
option device '@secondwan'
option disabled '1'
option metric '15'
config interface 'modem_1_1_2_6'
option proto 'dhcpv6'
option disabled '1'
option device '@modem_1_1_2'
config rule 'policy_direct_rt'
option lookup 'main'
option suppress_prefixlength '0'
option priority '1100'
config rule 'policy_default_rt_vpn'
option mark '0x8000/0xc000'
option lookup '8000'
option priority '1101'
option invert '1'
config rule6 'policy_direct_rt6'
option lookup 'main'
option suppress_prefixlength '0'
option priority '1100'
config rule6 'policy_default_rt_vpn6'
option mark '0x8000/0xc000'
option lookup '8000'
option priority '1101'
option invert '1'
config rule 'policy_default_rt_vpn_ts'
option lookup 'main'
option priority '1099'
option mark '0x80000/0xc0000'
option invert '0'
config interface 'Vlan10'
option proto 'static'
option device 'br-lan.10'
option ipaddr '192.168.10.1'
option broadcast '192.168.10.255'
config device
option type '8021q'
option ifname 'br-lan'
option vid '10'
option name 'br-lan.10'
option macaddr '94:83:C4:A7:60:D3'
option mtu '1500'
cat dhcp
root@GL-MT6000:/etc/config# cat dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '0'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
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'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'disabled'
option ra 'disabled'
option ra_slaac '1'
option force '1'
option ignore '0'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config domain
option name 'console.gl-inet.com'
option ip '192.168.0.2'
config domain
option name 'console.gl-inet.com'
option ip '::ffff:192.168.0.2'
config dhcp 'guest'
option interface 'guest'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'disabled'
option ra 'disabled'
config dhcp 'secondwan'
option interface 'secondwan'
option ignore '1'
config dhcp 'Vlan10'
option interface 'Vlan10'
option start '100'
option limit '150'
option leasetime '12h'
cat firewall
root@GL-MT6000:/etc/config# cat dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '0'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
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'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'disabled'
option ra 'disabled'
option ra_slaac '1'
option force '1'
option ignore '0'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config domain
option name 'console.gl-inet.com'
option ip '192.168.0.2'
config domain
option name 'console.gl-inet.com'
option ip '::ffff:192.168.0.2'
config dhcp 'guest'
option interface 'guest'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'disabled'
option ra 'disabled'
config dhcp 'secondwan'
option interface 'secondwan'
option ignore '1'
config dhcp 'Vlan10'
option interface 'Vlan10'
option start '100'
option limit '150'
option leasetime '12h'
I hope you can help, thanx!