Can anyone please comment why the ROS7 default-config of CRS326-24G-2S+ contains the lines below? Please notice the renaming of the interfaces.
After a reset with “no default-configuration” there are no such lines and if I attach a cable to port 2 it shows ether2 correctly as active (the same with default-configuration).
What is going on here?
/interface ethernet
set [ find default-name=ether19 ] name=ether1
set [ find default-name=ether20 ] name=ether2
set [ find default-name=ether21 ] name=ether3
set [ find default-name=ether22 ] name=ether4
set [ find default-name=ether23 ] name=ether5
set [ find default-name=ether24 ] name=ether6
set [ find default-name=ether1 ] name=ether7
set [ find default-name=ether2 ] name=ether8
set [ find default-name=ether3 ] name=ether9
set [ find default-name=ether4 ] name=ether10
set [ find default-name=ether5 ] name=ether11
set [ find default-name=ether6 ] name=ether12
set [ find default-name=ether7 ] name=ether13
set [ find default-name=ether8 ] name=ether14
set [ find default-name=ether9 ] name=ether15
set [ find default-name=ether10 ] name=ether16
set [ find default-name=ether11 ] name=ether17
set [ find default-name=ether12 ] name=ether18
set [ find default-name=ether13 ] name=ether19
set [ find default-name=ether14 ] name=ether20
set [ find default-name=ether15 ] name=ether21
set [ find default-name=ether16 ] name=ether22
set [ find default-name=ether17 ] name=ether23
set [ find default-name=ether18 ] name=ether24
Where do you see this ? Exactly how did you get this output ?
What ROS version ?
I have 2 CRS326-24G-2S+ and none show this in the default script.
# 2024-09-05 20:00:46 by RouterOS 7.15.1
# software id = J8K8-GJG5
#
script: #| Welcome to RouterOS!
#| 1) Set a strong router password in the System > Users menu
#| 2) Upgrade the software in the System > Packages menu
#| 3) Enable firewall on untrusted networks
#| -----------------------------------------------------------------------------
#| Switch mode:
#| * all interfaces switched;
#| LAN Configuration:
#| Login
#| admin user protected by password
:global defconfMode;
:log info "Starting defconf script";
#-------------------------------------------------------------------------------
# Apply configuration.
# these commands are executed after installation or configuration reset
#-------------------------------------------------------------------------------
:if ($action = "apply") do={
# wait for interfaces
:local count 0;
:while ([/interface ethernet find] = "") do={
:if ($count = 30) do={
:log warning "DefConf: Unable to find ethernet interfaces";
/quit;
}
:delay 1s; :set count ($count +1);
};
/interface bridge
add name=bridge disabled=no auto-mac=yes protocol-mode=rstp comment=defconf;
:local bMACIsSet 0;
:foreach k in=[/interface find where !(slave=yes || passthrough=yes || type=loopback || name~"bridge")] do={
:local tmpPortName [/interface get $k name];
:if ($bMACIsSet = 0) do={
:if ([/interface get $k type] = "ether") do={
/interface bridge set "bridge" auto-mac=no admin-mac=[/interface get $tmpPortName mac-address];
:set bMACIsSet 1;
}
}
:if (([/interface get $k type] != "ppp-out") && ([/interface get $k type] != "lte")) do={
/interface bridge port
add bridge=bridge interface=$tmpPortName comment=defconf;
}
}
/ip address add address=192.168.88.1/24 interface=bridge comment="defconf";
:if (!($keepUsers = "yes")) do={
:if (!($defconfPassword = "" || $defconfPassword = nil)) do={
/user set admin password=$defconfPassword
:delay 0.5
/user expire-password admin
}
}
}
#-------------------------------------------------------------------------------
# Revert configuration.
# these commands are executed if user requests to remove default configuration
#-------------------------------------------------------------------------------
:if ($action = "revert") do={
:if (!($keepUsers = "yes")) do={
/user set admin password=""
:delay 0.5
/user expire-password admin
}
/ip firewall filter remove [find comment~"defconf"]
/ipv6 firewall filter remove [find comment~"defconf"]
/ipv6 firewall address-list remove [find comment~"defconf"]
/ip firewall nat remove [find comment~"defconf"]
/interface list member remove [find comment~"defconf"]
/interface detect-internet set detect-interface-list=none
/interface detect-internet set lan-interface-list=none
/interface detect-internet set wan-interface-list=none
/interface detect-internet set internet-interface-list=none
/interface list remove [find comment~"defconf"]
/tool mac-server set allowed-interface-list=all
/tool mac-server mac-winbox set allowed-interface-list=all
/ip neighbor discovery-settings set discover-interface-list=!dynamic
:local o [/ip dhcp-server network find comment="defconf"]
:if ([:len $o] != 0) do={ /ip dhcp-server network remove $o }
:local o [/ip dhcp-server find name="defconf" !disabled]
:if ([:len $o] != 0) do={ /ip dhcp-server remove $o }
/ip pool {
:local o [find name="default-dhcp" ranges=192.168.88.10-192.168.88.254]
:if ([:len $o] != 0) do={ remove $o }
}
:local o [/ip dhcp-client find comment="defconf"]
:if ([:len $o] != 0) do={ /ip dhcp-client remove $o }
/ip dns {
set allow-remote-requests=no
:local o [static find comment="defconf"]
:if ([:len $o] != 0) do={ static remove $o }
}
/ip address {
:local o [find comment="defconf"]
:if ([:len $o] != 0) do={ remove $o }
}
:foreach iface in=[/interface ethernet find] do={
/interface ethernet set $iface name=[get $iface default-name]
}
/interface bridge port remove [find comment="defconf"]
/interface bridge remove [find comment="defconf"]
/interface bonding remove [find comment="defconf"]
}
:log info Defconf_script_finished;
:set defconfMode;