Good idea Andrew, I’ve had no luck getting everything to work. It’s not a very complicated setup. I’ll try to explain very clearly, do ask if I’m not doing so ![]()
I’ve got following devices:
- A correctly configured Cisco VLAN switch with a VLAN 10 (192.168.0.x) and a VLAN 20.
VLAN 20 is special because devices in that VLAN will not receive an internal IP, they will and must receive an IP directly from the cable modem. The ISP decides the IP based on the MAC-address of the device.
note: Normally, the ISP places a switch connected to their cable modem. They then connect their devices to the switch to assure they get an external IP. I’ll use VLAN 20 to serve the same purpose. - A Motorola cable modem
- A simple plain Netgear 5 port gigabit switch
- Mikrotik Routerboard 450G Ros v4.17
Cisco switch (port 1)-/-/-/-/-/-/- (ether5) Mikrotik (ether 1) --------- Cable modem
|(ether2)
Netgear switch
Extra useful information:
1)-/-/-/ is a trunk line. So the trunk is between port 1 on the Cisco and ether5 on the Mikrotik.
2) The Netgear swith is connected to ether2 on the Mikrotik. Ether2 is in VLAN 10.
3) The cable modem is connected to ether1 on the Mikrotik. It hands out DHCP to the Mikrotiks ether1 port.
What is working right now?:
- Everything attached to the Netgear (VLAN 10) can ping everything on the Cisco which is also in VLAN 10. VLAN 10 is thus working
- VLAN 20 is working also. I’ve added rules to the rule table to accomplish this. There is one device in VLAN 20 ATM, and that device has got internet access via a public IP. VLAN 20 is thus also working.
So what is not working then?:
- VLAN 10 devices cannot reach the routers internal IP. This internal IP (192.168.0.251) is assigned to the trunk port (=ether5).
So VLAN 10 does not have internet access. So no VLAN 10 device on the Cisco switch can ping the router and no VLAN 10 device attached to the Netgear switch attached to ether2 can reach the router.
So that is about the only thing that doesn’t work ATM. Here is my config:
/ip address> print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.251/24 192.168.0.0 192.168.0.255 ether5
1 192.168.1.254/24 192.168.1.0 192.168.1.255 ether2
/ip dhcp-client> print
Flags: X - disabled, I - invalid
# INTERFACE USE ADD STATUS ADDRESS
0 ether1 yes yes searching...
note: cable modem is not connected, retrieving an IP from the cable modem is no problem at all:).
/interface ethernet switch vlan> print
Flags: X - disabled, I - invalid
# SWITCH VLAN-ID PORTS
0 switch1 0 ether2
1 switch1 20 ether5
ether1
2 switch1 10 ether5
/interface ethernet switch port> print
Flags: I - invalid
# NAME SWITCH VLAN-MODE VLAN-HEADER
0 ether1 switch1 fallback always-strip
1 ether2 switch1 secure always-strip
2 ether3 switch1 secure always-strip
3 ether4 switch1 secure always-strip
4 ether5 switch1 secure add-if-missing
Not too sure of the above. Ether1 might be set wrongly but the way it is now, is the way that can cause the least trouble:).
/interface ethernet switch rule> print
Flags: X - disabled, I - invalid
0 switch=switch1 ports=ether5 vlan-header=present vlan-id=20 copy-to-cpu=no
redirect-to-cpu=no mirror=no new-dst-ports=ether1
1 switch=switch1 ports=ether1
dst-mac-address=00:03:xx:xx:xx:xx/00:03:xx:xx:xx:xx
vlan-header=not-present copy-to-cpu=no redirect-to-cpu=no mirror=no
new-dst-ports=ether5 new-vlan-id=20
2 switch=switch1 ports=ether2 vlan-header=not-present copy-to-cpu=yes
redirect-to-cpu=no mirror=no new-dst-ports=ether5 new-vlan-id=10
3 switch=switch1 ports=ether5 vlan-header=present vlan-id=10 copy-to-cpu=no
redirect-to-cpu=no mirror=no new-dst-ports=ether2
Rules 0 and 1 make sure the device in VLAN 20 gets a public IP. Those rules seem to work nicely.
Rules 2 and 3 are a failed attempt to for the devices on my Netgear switch (VLAN10) to reach the router (whose internal IP is on ether5).
That’s it:).
Thanks for helping me out!
Cheers,
Jeroen