Community discussions

MikroTik App
 
Urajmal
just joined
Topic Author
Posts: 13
Joined: Thu Jul 26, 2018 6:23 pm

2 vlans with NAT

Wed Jan 13, 2021 11:48 pm

Hi guys! After few years learning ROS I am facing a task that I am unable to realize. I am fairly new with VLANs. So basicaly the work is something like:

Server with trunk signal with VLAN 22 and VLAN 32 connected with one cable to Mikrotik (Hex lite) Eth1 - then, this is the part that I do not understand - both VLANs should be NATed, then leave Mikrotik through ETH5 with both VLANs, 22 and 32.

My questions are:
How and should I recognize VLANs 22 and 32 on Eth1?
How should I configure NAT?
How can I make leave route trough ETH5 and tagg it with VLAN 22, 32? If those were not tagged (somehow) on Eth1 input?

I would be very glad if someone can help me with a little explanation in parallel with solution?
 
mkx
Forum Guru
Forum Guru
Posts: 5244
Joined: Thu Mar 03, 2016 10:23 pm

Re: 2 vlans with NAT

Thu Jan 14, 2021 9:39 am

How and should I recognize VLANs 22 and 32 on Eth1?
How should I configure NAT?
How can I make leave route trough ETH5 and tagg it with VLAN 22, 32? If those were not tagged (somehow) on Eth1 input?
When using VLANs in RouterOS, you have to start using vlan interfaces, these allow ROS to work with individual VLANs. Have a look at this manual page. And look for other manual documents, explaining VLANs, e.g. this nice tutorial. You may want to study some resources dealing with VLANs in general if the concept is not entirely clear to you.

After you properly use vlan interfaces to set up L3 (IP) configuration on router, the rest of functions (routing, NAT, firewalling) are set up in manner, similar to using "plain" interfaces.
BR,
Metod
 
Urajmal
just joined
Topic Author
Posts: 13
Joined: Thu Jul 26, 2018 6:23 pm

Re: 2 vlans with NAT

Thu Jan 14, 2021 10:48 am

mkx, thanks a lot!

I have been studying VLANs, and I am still considering myself a beginner with VLANs. However I am learning on examples and study them, it does really make me more productive and overall it makes me more interesant into the problem.

I am not saying you shuld type the syntax code for me, but it helps to give some idea where to start, what to set, etc.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 5925
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: 2 vlans with NAT

Thu Jan 14, 2021 8:02 pm

The tutorial he suggested has all the syntax one needs.
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
MTUNA Certified, by the Ascerbic Llama!
 
Urajmal
just joined
Topic Author
Posts: 13
Joined: Thu Jul 26, 2018 6:23 pm

Re: 2 vlans with NAT

Mon Jan 18, 2021 12:46 am

Thank you! Will give it a shot and report back!

Who is online

Users browsing this forum: Baidu [Spider] and 66 guests