Community discussions

MikroTik App
 
tafkamax
newbie
Topic Author
Posts: 40
Joined: Tue Sep 19, 2023 1:04 pm

CAP AX make ether2 "standalone" mgmt port

Fri Sep 22, 2023 2:02 pm

I am trying to make ether2 on my CAP AX a standalone mgmt port, so I can work on my bridge and ether1 as it will all become VLAN-ed. But I don't have access to any of these vlans as I am doing the configuring from home, but the L3 router is at work, with all the switches and vlans.

Currently dumping out the default conf of CAP AX:
/interface bridge
add admin-mac=48:A9:8A:E0:8F:25 auto-mac=no comment=defconf name=bridge
/interface wifiwave2
set [ find default-name=wifi1 ] channel.skip-dfs-channels=10min-cac configuration.mode=ap .ssid=MikroTik-E08F26 disabled=no security.authentication-types=wpa2-psk,wpa3-psk
set [ find default-name=wifi2 ] channel.skip-dfs-channels=10min-cac configuration.mode=ap .ssid=MikroTik-E08F27 disabled=no security.authentication-types=wpa2-psk,wpa3-psk
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge lease-time=10m name=defconf
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=wifi1
add bridge=bridge comment=defconf interface=wifi2
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0
/ip dhcp-client
add comment=defconf interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related hw-offload=yes
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/ip ssh
set always-allow-password-login=yes
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=33434-33534 protocol=udp
add action=accept chain=input comment="defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=input comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=ipsec-esp
add action=accept chain=forward comment="defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment="defconf: drop everything else not coming from LAN" in-interface-list=!LAN
/system note
set show-at-login=no
/system routerboard mode-button
set enabled=yes on-event=dark-mode
/system script
add comment=defconf dont-require-permissions=no name=dark-mode owner=*sys policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="\r\
    \n   :if ([system leds settings get all-leds-off] = \"never\") do={\r\
    \n     /system leds settings set all-leds-off=immediate \r\
    \n   } else={\r\
    \n     /system leds settings set all-leds-off=never \r\
    \n   }\r\
    \n " 
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
I tried to change some things already:
/ip/address
add address=192.168.88.2/24 comment="mgmt" interface=ether2 network=192.168.88.0
/interface/bridge/port
# remove ether2 from bridge, because that will get vlaned.
remove 0
# I also saw that interface list is being used for rules so I added ether2 as a wan port
/interface list member
add comment=defconf interface=ether2 list=WAN
But being connected via usb <-> eth to ether2 port on my capax i can't seem to get the routing correct or something is not working. I can't ping neither 192.168.88.1 nor 192.168.88.2
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11647
Joined: Thu Mar 03, 2016 10:23 pm

Re: CAP AX make ether2 "standalone" mgmt port

Fri Sep 22, 2023 2:24 pm

You can't use IP address for management interface from the same subnet as any other interfaces on router have ... the address space then overlaps. So use e.g. 192.168.188.1/24 on ether2.

Since this is going to become an out-of-band management port, you'll either have to use static settings on management workstation (matching network address etc.) or you have to add DHCP server setup on ether2 so that router will provide correct IP setup to management workstation.
 
tafkamax
newbie
Topic Author
Posts: 40
Joined: Tue Sep 19, 2023 1:04 pm

Re: CAP AX make ether2 "standalone" mgmt port

Fri Sep 22, 2023 2:34 pm

You can't use IP address for management interface from the same subnet as any other interfaces on router have ... the address space then overlaps. So use e.g. 192.168.188.1/24 on ether2.

Since this is going to become an out-of-band management port, you'll either have to use static settings on management workstation (matching network address etc.) or you have to add DHCP server setup on ether2 so that router will provide correct IP setup to management workstation.
Ah yes that makes sense. I will try to use a different subnet. I will use static settings, because this is only for intial configuration / worst case scenario confs. As the AP mgmt subnet will be on a vlan in the final version and the wifi clients will be on another vlan and the ether1/bridge will act as the trunk.
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 767
Joined: Mon May 27, 2013 2:05 am

Re: CAP AX make ether2 "standalone" mgmt port

Fri Sep 22, 2023 2:56 pm

You can't use IP address for management interface from the same subnet as any other interfaces on router have ... the address space then overlaps. So use e.g. 192.168.188.1/24 on ether2.

Since this is going to become an out-of-band management port, you'll either have to use static settings on management workstation (matching network address etc.) or you have to add DHCP server setup on ether2 so that router will provide correct IP setup to management workstation.
Well as with most OOB stuff - can always run it in a different VRF (can come with its own hassles though) then you can have overlapping subnets - but if its the same actual broadcast domain its best to separate them.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19407
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: CAP AX make ether2 "standalone" mgmt port

Fri Sep 22, 2023 3:46 pm

Your idea is solid, the execution is flawed.
The Managment vlan or trusted vlan should be sent via ethernet on ether1 to the capax.
The capax should get its static IP address on this vlan

method --> viewtopic.php?t=182276

Now you should also setup ether2 as an off bridge access or emerg acces, for me its the smart place to config the router and not worry so much about getting kicked out.
That means either the capax is readily accessible, easy to attache a laptop connected ethernet cable to ether2 and if not ensure when installing capax, that a second wire is run from ether2 to a location that you can access later with the laptop.

viewtopic.php?t=181718
 
tafkamax
newbie
Topic Author
Posts: 40
Joined: Tue Sep 19, 2023 1:04 pm

Re: CAP AX make ether2 "standalone" mgmt port

Fri Sep 22, 2023 4:12 pm

Your idea is solid, the execution is flawed.
The Managment vlan or trusted vlan should be sent via ethernet on ether1 to the capax.
The capax should get its static IP address on this vlan

method --> viewtopic.php?t=182276

Now you should also setup ether2 as an off bridge access or emerg acces, for me its the smart place to config the router and not worry so much about getting kicked out.
That means either the capax is readily accessible, easy to attache a laptop connected ethernet cable to ether2 and if not ensure when installing capax, that a second wire is run from ether2 to a location that you can access later with the laptop.

viewtopic.php?t=181718
Hmm thanks for the links. I did read over them. Regarding the ether2 port as mgmt port. I removed it from the bridge. And I just set 192.168.188.1/24 on it as the ip address and manually set my USB<->ETH adapter ip to be 192.168.188.2. Later when the AP is connected to the network it has its own separate vlan that is over the bridge, so I can access it over that. When I can access it over the management VLAN later, I will remove the static ip-address so ether2 should be a dummy port (when the address is removed). I have already set the VLAN mgmt address statically aswell:
/ip/address> add address=192.168.X.X interface=l3vlanXX network=192.168.X.0
The clients are on a totally different VLAN and the L3 is actually done by a Juniper Router.

We used to have a double NAT situtation where the RouterOS used to do NAT for all of our wifi clients and every client came from the same IP in the view of the Juniper. And then the Juniper was routing the clients to open world and also doing filtering and NAT-ing, but now we have removed the NAT part and moved all of the logic to vlans aswell, so the Juniper is doing L3. Or well we are trying to.

Who is online

Users browsing this forum: Airiasas, Fogga, jvanhambelgium, Pilo2710 and 14 guests