Community discussions

MikroTik App
 
Vard0
just joined
Topic Author
Posts: 7
Joined: Thu Jan 19, 2012 9:20 am

created VLAN but cannot route through to internet from it.

Sat Feb 13, 2021 8:40 am

Hey everone.

I'm quite a noob with Mikrotiks so any help would be much appreciated.

I need to add a VLAN to my network. I have managed to add the VLAN and am getting IP addresses from the Mikrotik on it.

I can also ping the DG (VLAN interface IP address) of the VLAN from the clients. However I cannot ping through to the internet from it.

I have tried adding a prerouting mangle with a routing mark on the traffic and a masquerade rule under NAT but I must still be missing something.

Can anyone give some pointers where I'm going wrong?

Thanks
 
erlinden
Forum Guru
Forum Guru
Posts: 1961
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: created VLAN but cannot route through to internet from it.

Sat Feb 13, 2021 8:48 am

Please read this tutorial very carefully, it is the best resource (in my opinion) on VLAN and RouterOS:
viewtopic.php?t=143620
 
Vard0
just joined
Topic Author
Posts: 7
Joined: Thu Jan 19, 2012 9:20 am

Re: created VLAN but cannot route through to internet from it.

Sat Feb 13, 2021 9:11 am

Thanks for that link. I did see it but a lot of it goes over my head and actually just adds to the confusion.

Below are the relevant seetings I have made so far on the router.
/interface vlan
add interface=LAN name=STAFF vlan-id=3

/ip pool
add name=dhcp_pool3 ranges=10.3.3.2-10.3.3.10

/ip address
add address=10.3.3.1/24 interface=STAFF network=10.3.3.0

/ip dhcp-server network
add address=10.3.3.0/24 dns-server=8.8.8.8 gateway=10.3.3.1 netmask=24

/ip firewall mangle
add action=mark-routing chain=prerouting log=yes new-routing-mark=use-staffgw \
passthrough=yes src-address=10.3.3.0/24

/ip firewall nat
add action=masquerade chain=srcnat dst-address=0.0.0.0/0 log=yes src-address=\
10.3.3.0/24
 
Vard0
just joined
Topic Author
Posts: 7
Joined: Thu Jan 19, 2012 9:20 am

Re: created VLAN but cannot route through to internet from it.

Sat Feb 13, 2021 10:13 am

I think I manged to resolve it. I needed to add some routing rules.

I got the idea from this post:-

viewtopic.php?t=133209
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19352
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: created VLAN but cannot route through to internet from it.

Sat Feb 13, 2021 5:18 pm

if you post your config it will be clearer what you are attempting to do.
The requirements are not well stated thus far.
/export hide-sensitive file=anynameyouwish.

It is not clear to me if you simply want one subnet (vlan) to use a specific WAN interface (assuming you have more than one) or something else..............

Who is online

Users browsing this forum: Bing [Bot], iaming, jajo10, johnson73, KpuCko, patrikg, pepe262 and 123 guests