저는 MikroTik 라우터를 사용하고 있습니다. 192.168.1.0/24와 192.168.3.0/24라는 두 개의 네트워크가 있습니다. 하나는 ether4에 있고 다른 하나는 ether5에 있습니다. 나는 이러한 네트워크가 서로 ping을 할 수 있도록 설정하려고 합니다.
라우터 구성은 다음과 같습니다.
/interface ethernet
set [ find default-name=ether4 ] name=4_FrontDept
set [ find default-name=ether5 ] name=5_IntDept
set [ find default-name=ether9 ] name=9_BellNet
set [ find default-name=ether10 ] name=10_Primus
/ip pool
add name=InternetDept ranges=192.168.3.11-192.168.3.254
add name=FrontDept ranges=192.168.1.11-192.168.1.254
/ip dhcp-server
add address-pool=InternetDept disabled=no interface=5_IntDept name=\
InternetDept
add address-pool=FrontDept disabled=no interface=4_FrontDept name=FrontDept
/port
set 0 name=serial0
/interface pppoe-client
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=9_BellNet keepalive-timeout=60 \
max-mru=1480 max-mtu=1480 mrru=1600 name=Bellnet_ISP password={PASSWORD} \
profile=default service-name="" use-peer-dns=no user={USERNAME}
add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 \
dial-on-demand=no disabled=no interface=10_Primus keepalive-timeout=60 \
max-mru=1480 max-mtu=1480 mrru=1600 name=Primus_ISP password={PASSWORD} \
profile=default service-name="" use-peer-dns=no user={USERNAME}
/ip address
add address=192.168.3.1/24 interface=5_IntDept network=192.168.3.0
add address=192.168.1.1/24 interface=4_FrontDept network=192.168.1.0
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.1.1 \
netmask=24
add address=192.168.3.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.3.1 \
netmask=24
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=Bellnet_ISP new-connection-mark=Bell
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=Primus_ISP new-connection-mark=Primus
add action=mark-connection chain=prerouting connection-mark=no-mark \
dst-address-type=!local in-interface=4_FrontDept new-connection-mark=Bell
add action=mark-connection chain=prerouting connection-mark=no-mark \
dst-address-type=!local in-interface=5_IntDept new-connection-mark=Primus
add action=mark-routing chain=prerouting connection-mark=Primus \
dst-address-type=!local new-routing-mark=RouteToPrimus
add action=mark-routing chain=prerouting connection-mark=Bell \
dst-address-type=!local new-routing-mark=RouteToBell
add action=mark-routing chain=prerouting comment=\
"For DNS Server On MikroTik Will Fetch Through Primus Connection" \
connection-mark=no-mark disabled=yes dst-port=53 new-routing-mark=\
RouteToPrimus protocol=udp
/ip firewall nat
add action=masquerade chain=srcnat connection-mark=Bell out-interface=\
Bellnet_ISP
add action=masquerade chain=srcnat connection-mark=Primus out-interface=\
Primus_ISP
/ip route
add distance=2 gateway=Primus_ISP routing-mark=RouteToPrimus
add distance=2 gateway=Bellnet_ISP routing-mark=RouteToBell
3.x 컴퓨터에서 1.x 컴퓨터로의 Tracert 출력:
답변1
귀하의 경우 "!local" 필터가 작동하지 않는 것 같습니다. ISP를 사용하도록 로컬 패킷을 표시하여 인터넷에서 손실됩니다. 맹글 규칙을 추가해 보세요처음에맹글 목록의
/ip firewall mangle
add chain=prerouting dst-address=192.168.1.0/24 action=accept
add chain=prerouting dst-address=192.168.3.0/24 action=accept
그러면 로컬 패킷이 맹글 목록을 벗어나게 되어 표시되지 않습니다.
답변2
저도 같은 문제가 있어서 해결했습니다. Dynamic, Active, Connected 경로를 추가했습니다. 당신의 경우에는 아마도 이렇겠죠
/ip route
add distance=1 dst-address=192.168.3.0/24 gateway=5_IntDept routing-mark=RouteToPrimus
add distance=1 dst-address=192.168.1.0/24 gateway=4_FrontDept routing-mark=RouteToBell
틀 렸으면 고쳐줘