Code: Select all
https://help.mikrotik.com/docs/display/ROS/IP+Routing
I find I'm not clear on some aspects of the Address List. For example, in a subnet between the routers (176.16.1.0) router 2 farther from the Internet is given 176.16.1.2 and that is used in router 1 as the gateway to the LAN on router 2. Adding an address to the Address List creates a dynamic entry in Route List in which the gateway is filled in with the interface specified for Address List and can't be changed to an IP. The example specifies the IP from a terminal, not the interface. In Winbox the configuration for IP/Route offers a pull-down list of interfaces in the field where an IP for a gateway is accepted. Is there a difference in function between choosing an interface (eth3) or an IP address?
This example uses a static route between the router on the 176 subnet. I assume that means there is no reachability information exchanged and that the IP/Address or Address List in router 1 needs to specify every subnet on the network for router 2. Correct?
Minor point: what does blue type mean for an item in the route list?
Here's the config from router 1:
Code: Select all
# feb/22/2024 11:50:45 by RouterOS 6.49.10
# software id = 52AR-8NVD
#
# model = RouterBOARD 952Ui-5ac2nD
# serial number = 7xxx
set [ find default-name=ether3 ] advertise=10M-full,100M-full,1000M-full
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
disabled=no distance=indoors frequency=auto installation=indoor mode=\
ap-bridge ssid=
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=\
20/40/80mhz-XXXX disabled=no distance=indoors frequency=auto \
installation=indoor
add admin-mac=B8:69:F4:1D:6B:C0 auto-mac=no comment=defconf name=bridge
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ]
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=pool1055 ranges=10.10.55.40-10.10.55.50
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
add address-pool=pool1055 disabled=no interface=ether3 name=server1055
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf disabled=yes interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/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
add address=192.168.2.1/24 interface=ether3 network=192.168.2.0
add address=192.168.55.0/24 interface=ether3 network=192.168.55.0
add address=10.10.55.1/24 disabled=yes interface=ether3 network=10.10.55.0
add address=10.10.55.1/24 interface=ether3 network=10.10.55.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server lease
add address=192.168.88.248 client-id=
add address=192.168.88.253 mac-address=1C
add address=192.168.88.249 client-id=1:14:c
add address=192.168.88.243 client-id=1
add address=192.168.88.250 mac-addres
add address=192.168.88.230 client-
add address=10.10.55.40 client-id=1:a mac-address=\
B8:69:A server=server1055
/ip dhcp-server network
add address=192.168.2.0/24 gateway=192.168.55.1 netmask=24
add address=192.168.55.0/24 gateway=10.10.55.40 netmask=24
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=passthrough chain=input comment="count new icmp from wan" \
connection-state=new in-interface=ether1 protocol=icmp
add action=accept chain=input comment="count new icmp from bridge" \
connection-state=new in-interface=bridge protocol=icmp
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="count new icmp from eth3" \
connection-state=established,related,new,untracked in-interface=ether3 \
protocol=icmp
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=drop chain=input comment="defconf: drop ssh 22" dst-port=22 \
in-interface=ether1 protocol=tcp
add action=drop chain=input comment="defconf: drop telnet 23" dst-port=23 \
in-interface=ether1 protocol=tcp
add action=drop chain=input comment="defconf: drop ftp 23" dst-port=21 \
in-interface=ether1 protocol=tcp
add action=accept chain=output comment="added iicmp send" protocol=icmp
add action=drop chain=forward comment="added 18 feb 2023" in-interface=ether1 \
protocol=ipv6-encap
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" \
disabled=yes in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
disabled=yes ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
disabled=yes ipsec-policy=out,ipsec
add action=accept chain=forward comment="new ..55 to ..88" connection-state=\
established,related,new,untracked dst-address=192.168.88.0/24 \
in-interface=ether3
add action=accept chain=forward comment="new ..55 to ..88" connection-state=\
!invalid out-interface=ether3 src-address=192.168.88.0/24
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related disabled=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 firewall service-port
setxxx
/ip route
add distance=1 dst-address=10.10.55.40/32 gateway=ether3
add check-gateway=ping distance=1 dst-address=192.168.2.0/24 gateway=\
10.10.55.40
add disabled=yes distance=1 dst-address=192.168.55.0/24 gateway=10.10.55.1
/system clock
set time-zone-name=America/New_York
/system identity
set name=MikroTik-g/w
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN