Community discussions

MikroTik App
 
oxtan
newbie
Topic Author
Posts: 25
Joined: Fri Oct 28, 2016 9:30 am

confused about vlans

Tue Jan 17, 2023 12:22 pm

hi,
I have a RouterBOARD 962UiGS-5HacT2HnT running 6.49.7 and I am testing some things with a netgear GS108Ev3

On the mikrotik side I have this:
/interface bridge add igmp-snooping=yes name=bridge-iptv protocol-mode=none
/interface bridge add arp=proxy-arp name=bridge-local
/interface ethernet set [ find default-name=ether1 ] arp=proxy-arp loop-protect=off
/interface vlan add interface=ether1 name=ether1.4 vlan-id=4
/interface vlan add interface=ether1 mtu=1594 name=ether1.6 vlan-id=6
/interface vlan add interface=ether5 name=ether5.2 vlan-id=2
/interface vlan add interface=ether5 name=ether5.4 vlan-id=4
/interface vlan add interface=ether5 name=ether5.6 vlan-id=6
/ip pool add name=ether5.2 ranges=10.0.2.2-10.0.2.254
/ip pool add name=bridge-local ranges=192.168.88.2-192.168.88.254
/ip pool add name=ether5.4 ranges=10.0.4.2-10.0.4.254
/ip dhcp-server add address-pool=bridge-local disabled=no interface=bridge-local name=bridge-local
/ip dhcp-server add address-pool=ether5.2 disabled=no interface=bridge-iptv name=bridge-iptv
/interface bridge port add bridge=bridge-local interface=ether3
/interface bridge port add bridge=bridge-iptv interface=ether5
/interface bridge port add bridge=bridge-local interface=ether5.6
/interface bridge port add bridge=bridge-iptv interface=ether1.4
/interface bridge port add bridge=bridge-iptv interface=ether5.4
/interface bridge port add bridge=bridge-iptv interface=ether5.2
/interface bridge port add bridge=bridge-local interface=ether2
/ip firewall connection tracking set enabled=yes
/ip address add address=192.168.88.1/24 interface=bridge-local network=192.168.88.0
/ip address add address=10.0.2.1/24 interface=ether5.2 network=10.0.2.0
/ip address add address=10.0.4.1 interface=bridge-iptv network=10.0.4.1
/ip dhcp-server config set store-leases-disk=15m
/ip dhcp-server network add address=10.0.2.0/24 gateway=10.0.2.1 netmask=24
/ip dhcp-server network add address=10.0.4.0/24 gateway=10.0.4.1
/ip dhcp-server network add address=192.168.88.0/24 gateway=192.168.88.1
/ip dns set allow-remote-requests=yes cache-max-ttl=1d servers=8.8.8.8,8.8.4.4
/ip upnp set show-dummy-rule=no
/ip upnp interfaces add interface=bridge-local type=internal
And on the netgear side I have interface 1 with a trunk of vlans 2, 4 and 6 (tagged) and the pvid of port 1 is vlan 2. With this configuration, the switch boots and gets an ip addres from the right pool ether5.2 So this works.

But if I set this configuration:
/interface bridge add name=br-vlan2
/interface bridge add name=br-vlan4
/interface bridge add name=bridge-local
/interface wireless set [ find default-name=wlan1 ] ssid=MikroTik
/interface wireless set [ find default-name=wlan2 ] ssid=MikroTik
/interface vlan add interface=ether5 name=ether5.2 vlan-id=2
/interface vlan add interface=ether5 name=ether5.4 vlan-id=4
/ip pool add name=dhcp_pool0 ranges=192.168.88.2-192.168.88.254
/ip pool add name=dhcp_pool1 ranges=10.0.2.2-10.0.2.254
/ip pool add name=dhcp_pool2 ranges=10.0.4.2-10.0.4.254
/ip dhcp-server add address-pool=dhcp_pool0 disabled=no interface=bridge-local name=dhcp1
/ip dhcp-server add address-pool=dhcp_pool1 disabled=no interface=br-vlan2 name=dhcp2
/ip dhcp-server add address-pool=dhcp_pool2 disabled=no interface=br-vlan4 name=dhcp3
/interface bridge port add bridge=bridge-local interface=ether3
/interface bridge port add bridge=br-vlan2 interface=ether5.2
/interface bridge port add bridge=br-vlan4 interface=ether5.4
/ip address add address=192.168.88.1/24 interface=bridge-local network=192.168.88.0
/ip address add address=10.0.2.1/24 interface=br-vlan2 network=10.0.2.0
/ip address add address=10.0.4.1/24 interface=br-vlan4 network=10.0.4.0
/ip dhcp-server network add address=10.0.2.0/24 gateway=10.0.2.1
/ip dhcp-server network add address=10.0.4.0/24 gateway=10.0.4.1
/ip dhcp-server network add address=192.168.88.0/24 dns-server=8.8.8.8 gateway=192.168.88.1
and turn the switch off and on (yank the power cable and put it back on), nothing happens and I do not even see message on the log that the ether5 link has gone down and up again. Puzzling. I am doing something wrong, but cannot see exactly what ;). Any help greatly appreciated.
 
erlinden
Forum Guru
Forum Guru
Posts: 1920
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: confused about vlans

Tue Jan 17, 2023 12:39 pm

The answer to VLAN everything:
viewtopic.php?f=23&t=143620
 
oxtan
newbie
Topic Author
Posts: 25
Joined: Fri Oct 28, 2016 9:30 am

Re: confused about vlans  [SOLVED]

Tue Jan 17, 2023 12:46 pm

it seems that if I add the ether5 interface to one of the bridges (I added it to the br-vlan2), then it works.

Still do not understand it though, but anyway, it does work.

Who is online

Users browsing this forum: 4l4R1, bizarrity, esj, Guntis, h1ghrise, robertkjonesjr, Yahoo [Bot] and 76 guests