Hi All,
This is my second project involving a Mikrotik (CCR1009) and I’m glad I made the choice to use it. It’s been a bit of a learning curve, but I have a working solution for the client, which is nice.
However, clearing up the documentation I got a scare:
/interface ethernet
set [ find default-name=ether5 ] comment="Uplink [Native]" name=ether1
set [ find default-name=ether6 ] comment="OLT [Trunk 900,901,1000,2000]" l2mtu=2048 na
set [ find default-name=ether7 ] comment="Old Uplink [Trunk 900,1000]" disabled=yes l2mtu=2048 master-port=ether2 name=ether3
set [ find default-name=ether8 ] comment="OLT Mgmt [Access 901]" name=ether4 speed=10Mbps
set [ find default-name=ether1 ] comment="RPi Mgmt [Access 901]" name=ether5
set [ find default-name=ether2 ] name=ether6
set [ find default-name=ether3 ] disabled=yes name=ether7
set [ find default-name=ether4 ] disabled=yes name=ether8
set [ find default-name=sfp-sfpplus1 ] disabled=yes
set [ find default-name=sfp1 ] disabled=yes
My uplink interface (ether1) is working and passing traffic, but the default-name=ether5. The 4th entry is name=ether4, but default-name is ether8.
I don’t understand what default-name does. I tried restoring this config to my lab device all the default-names were in the correct order with name=.
I don’t want to break the working system, but this looks wrong. The fact that it works is great. The fact that it works by magic worries me. I prefer logic to magic. Any ideas if something strange is happening?
I did a little experimentation and reading and figured that one out (I think). First thing is remember that the name of a port can be anything. You can set it to anything you darn well please and it means nothing except to make it more understandable to us humans. However apparently the router also keeps tack of the original default name for the port and you can search for the port by that default name. I tested this on one of my RB750 routers with the following:
First I did an export to see what was there to start with:
[admin@RB750r2 #1] /interface ethernet> export
jun/10/2016 12:38:51 by RouterOS 6.25
/interface ethernet
set [ find default-name=ether1 ] name=E1-p1_Internet
set [ find default-name=ether2 ] name=E2-p3_131_&_205
set [ find default-name=ether3 ] name=E3-p5_201
set [ find default-name=ether4 ] name=E4-p7_204
set [ find default-name=ether5 ] name=E5-p9_211
Then changed the name for ethernet port 5 to Testing and then did another export:
[admin@RB750r2 #1] /interface ethernet> set [ find default-name=ether5 ] name=Testing
[admin@RB750r2 #1] /interface ethernet> export
jun/10/2016 12:50:21 by RouterOS 6.25
/interface ethernet
set [ find default-name=ether1 ] name=E1-p1_Internet
set [ find default-name=ether2 ] name=E2-p3_131_&_205
set [ find default-name=ether3 ] name=E3-p5_201
set [ find default-name=ether4 ] name=E4-p7_204
set [ find default-name=ether5 ] name=Testing
Then I changed it back, while also watching the interfaces on WinBox and saw the change take effect:
[admin@RB750r2 #1] /interface ethernet> set [ find default-name=ether5 ] name=E5-p9_211
Since the default name does not change, it gives a way to set parameters on a known physical port without knowing what it is currently named.
Thanks for the effort investigating (missed your response at the time), but I notice the default-name doesn’t change in your example. My example shows the interfaces in physical order, but the default-name is out of order and effectively wrong. Troubling, but it does still work and the project’s signed off, so