Community discussions

MikroTik App
 
bosandzeros
just joined
Topic Author
Posts: 4
Joined: Tue Nov 08, 2022 12:45 pm

Router configuration

Tue Nov 08, 2022 1:14 pm

Hello,

I am trying to make the configuration as in the attached image.
On the WAN side cable from the main router is coming to Eth 1, and the same cable should continue to other devices through Eth 10. This is a switch on the WAN side (I guess).
Devices from LAN1 and LAN2 should be able to access the internet through WAN1. Devices from LAN1 and LAN2 should be able to communicate to each other.

I am completely new to the router setup. Few years ago I did a similar setup using some tutorial found on the internet, but now I can't find that tutorial anymore. I am using the WinBox GUI for router setup. Is there some tutorial that explains how to do this ? I would like to know step by step what I am doing and why.

Or could you advise on how to do this with terminal commands ?

Best regards.
You do not have the required permissions to view the files attached to this post.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 14520
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Router configuration

Tue Nov 08, 2022 10:00 pm

What is coming in on ether1, a block of public IPs? One public WANIP , OR a private IP (from the LAN on the ISP router)???

Did you want the 2011 to act as a switch for the main router or be a fully independent router??
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 9595
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: Router configuration

Wed Nov 09, 2022 11:03 am

[…] I would like to know step by step what I am doing and why. […]
If you are not clear about what you want to do first, and you explain it to us, how can we advise you on how to do it?
You don't have to ask how to switch ports 1 and 10, for example, but you have to explain what you want to achieve in the end, without explaining how you want to configure the inside of the device, otherwise you risk doing things for nothing and making people waste time.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 25408
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Router configuration

Wed Nov 09, 2022 11:06 am

Unless your ISP is freely giving you public IP addresses, the Port10 plan will not work. More info is needed, like the above posters said.
 
bosandzeros
just joined
Topic Author
Posts: 4
Joined: Tue Nov 08, 2022 12:45 pm

Re: Router configuration

Thu Nov 10, 2022 11:05 am

Hi everybody,

Thank you for all the answers. I gave my best to be explicit, sorry for not making it.

This router (my router) will be installed inside the existing network. Eth 1 will be connected to some existing router (factory router) which is connected to the internet. And it will provide an IP address to my router on Eth 1 (DHCP enabled on factory router). My router will not be connected to the ISP directly.  From Eth 10 I would like to "extend" cable coming to Eth 1 to another nearby device. So when that nearby device connects to Eth 10 it should get dynamic IP (DHCP service) from the same factory router that provides DHCP services to Eth 1 of my router. Idea is to avoid laying two ethernet cables from the existing router,  one for Eth 1 and other for the nearby device. The factory router will provide IP addresses (DHCP service) to Eth 1 and to nearby device also.  Both nearby device and eth1 will have IP addresses from the same IP range.

Hope I am clear now.

Best regards. 
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 9595
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: Router configuration

Thu Nov 10, 2022 12:38 pm

Is like you like Double NAT for nothing.
Why you do not use the MikroTik device simply as a switch?
You do not write any reason for why you want use the RouterBOARD as another router.
 
bosandzeros
just joined
Topic Author
Posts: 4
Joined: Tue Nov 08, 2022 12:45 pm

Re: Router configuration

Thu Nov 10, 2022 1:29 pm

It is not that easy to get customer to set up their router (factory router) to work with our system, and I don't know how many IP addresses are already occupied in the LAN of the factory router. In LAN 1 of the subject router we will have multiple devices with fixed IP's (industrial devices, it is much easier to have fixer IP's). And one device from LAN1 will have to communicate to one device in LAN2. And we need NAT here because we can't set device in LAN2 to use the gateway. We are using this as a replacement for Siemens PN/PN coupler, since delivery times reach in "afterlife".
As for Eth 10. In our electrical cabinet we have some device for remote access (no routing capabilities) which needs an internet access path on its WAN port to enable remote access to the devices on its LAN side. This is why I need Eth 10.

All in all, this way customer have to allocate 2 IP addresses to our system, otherwise customer would need  to allocate 10 or more IP's for our system.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 9595
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: Router configuration

Thu Nov 10, 2022 1:52 pm

NOW is clear. (thanks)

The device iis the model without wifi?

Wait some minutes.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 9595
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: Router configuration  [SOLVED]

Thu Nov 10, 2022 2:13 pm

The script is for the model RB2011UiAS (-IN)

First netsinstall, or at least upgrade to 6.48.6 (long-term).
Check if you are able or not to manage device with winbox by MAC address.
If yes, go to system / reset configuration and select only "no default configuration" and "do not backup" then reset configuration
When is rebooted and is "blank", open winbox by MAC and paste this on new terminal:
/interface bridge
add name=bri-wan protocol-mode=none
add name=bri-lan protocol-mode=none
/ip pool
add name=dhcp-pool ranges=192.168.30.101-192.168.30.199
/ip dhcp-server
add address-pool=dhcp-pool disabled=no interface=bri-lan lease-time=1w name=dhcp
/snmp community
set [ find default=yes ] addresses=0.0.0.0/0
/interface bridge port
add bridge=bri-wan interface=ether1
add bridge=bri-wan interface=ether10
add bridge=bri-lan interface=ether2
add bridge=bri-lan interface=ether3
add bridge=bri-lan interface=ether4
add bridge=bri-lan interface=ether5
add bridge=bri-lan interface=ether6
add bridge=bri-lan interface=ether7
add bridge=bri-lan interface=ether8
/ip address
add address=192.168.30.1/24 comment=BRI-LAN interface=bri-lan network=192.168.30.0
add address=192.168.50.254/24 comment=LAN2 interface=ether9 network=192.168.50.0
/ip dhcp-client
add disabled=no interface=bri-wan
/ip dhcp-server network
add address=192.168.30.0/24 dns-server=192.168.30.1,192.168.50.254 gateway=192.168.30.1 netmask=24
/ip dns
set allow-remote-requests=yes
/ip firewall nat
add action=masquerade chain=srcnat comment="NAT BRI-LAN" out-interface=bri-wan src-address=192.168.30.0/24
add action=masquerade chain=srcnat comment="NAT LAN2" out-interface=bri-wan src-address=192.168.50.0/24
/ip firewall service-port
set irc disabled=yes
set h323 disabled=yes
/ip ipsec policy
set 0 dst-address=0.0.0.0/0 src-address=0.0.0.0/0
/ip proxy
set parent-proxy=0.0.0.0 src-address=0.0.0.0
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system package update
set channel=long-term
/system routerboard settings
set auto-upgrade=yes
 
bosandzeros
just joined
Topic Author
Posts: 4
Joined: Tue Nov 08, 2022 12:45 pm

Re: Router configuration

Thu Nov 10, 2022 4:08 pm

Thank you rextended

I have RB2011iLS version 6.48.6. I should have mentioned this earlier, sorry.

In general this is working. I had to add one more thing I am guessing due to my inocrrect explanation what I need.
I have added one more masquerade NAT with source IP : 192.168.30.0/24, dest IP: 192.168.50.0/24, out interface Eth 9. Since I have full control of devices in LAN 1 (can set gateway), and devices in LAN 2 are not under my control.

Best regards.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 9595
Joined: Tue Feb 25, 2014 12:49 pm
Location: 🇮🇹, my 💔 is in 🇺🇦

Re: Router configuration

Thu Nov 10, 2022 4:59 pm

I have RB2011iLS version 6.48.6
No problem, only wireless model need different settings ;)

Who is online

Users browsing this forum: No registered users and 13 guests