@ jspool Well, not quite the IoT device - it’s a data collector for IoT sensors we have been asked to design and produce. The default TCP/IP settings need to be tested before packaging and shipping.
We need to test hundreds of devices per day - while every device has the same (static) IP address 192.168.0.100/24 and 192.168.0.1 as GW.
@ Sob Can you please take another look at this /Your own/ code and try to figure a way to access internet. The methods and priciples used here are the base of my chemistry.
/ip address
add address=192.168.1.11/24 interface=ether1 network=192.168.1.0
add address=192.168.1.12/24 interface=ether1 network=192.168.1.0
add address=192.168.0.1 interface=ether2 network=192.168.0.1
add address=192.168.0.1 interface=ether3 network=192.168.0.1
/ip firewall mangle
add action=mark-connection chain=prerouting dst-address=192.168.1.11 new-connection-mark=port1
add action=mark-connection chain=prerouting dst-address=192.168.1.12 new-connection-mark=port2
add action=mark-routing chain=prerouting connection-mark=port1 new-routing-mark=port1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=port2 new-routing-mark=port2 passthrough=no
/ip firewall nat
add action=dst-nat chain=dstnat dst-address=192.168.1.11 dst-port=80 protocol=tcp to-addresses=192.168.0.2
add action=dst-nat chain=dstnat dst-address=192.168.1.12 dst-port=80 protocol=tcp to-addresses=192.168.0.2
add action=masquerade chain=srcnat out-interface=ether2
add action=masquerade chain=srcnat out-interface=ether3
/ip route
add distance=1 dst-address=192.168.0.0/24 gateway=ether2 routing-mark=port1
add distance=1 dst-address=192.168.0.0/24 gateway=ether3 routing-mark=port2
http://forum.mikrotik.com/t/port-to-interfacing/97096/1
I took your advice and used it in my setup but traffic initiated form the device itself has problems accessing the default gateway (because we have the same IP (192.168.0.1) on every ether* interface)
http://forum.mikrotik.com/t/port-to-interfacing/97096/1
Please do understand that i am aware that this is not “by the network design” - but we need to be able to get some data from the cliens and clients need to be able to access cloud services (testing the device after production and assembly).