Mikrotik OS v6.44.2 >> ตาม flow นะครับ มี network 2 วง ใช้ router 1ตัว แจก DHCP LAN1 และ LAN2
ปัญหาคือ
Ping จากเครื่อง PC1 ไปที่ เครื่อง NB2 ไม่ได้ (ping LAN1 ไป LAN2)
คำถาม ??
คืออยากทราบวิธีทำให้ 2 LAN นี้มองเห็นกันจะกำหนดค่ายังไงครับ
ค่า Config ทั้งหมด
ใส่โค้ด
#| IP ADDRESS
/ip address add address=192.168.10.100/24 network=192.168.10.0 broadcast=192.168.10.255 interface=ether1
/ip address add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether2
/ip address add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 interface=ether3
#| POOL
/ip pool add name=pool-lan1 ranges=192.168.1.100-192.168.1.200
/ip pool add name=pool-lan2 ranges=192.168.2.100-192.168.2.200
#| DHCP Server Network
/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 comment="DHCP LAN1"
/ip dhcp-server add name=DHCP-LAN1 address-pool=pool-lan1 disabled=no interface=ether2 lease-time=6h
/ip dhcp-server network add address=192.168.2.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.2.1 netmask=24 comment="DHCP LAN2"
/ip dhcp-server add name=DHCP-LAN2 address-pool=pool-lan2 disabled=no interface=ether3 lease-time=6h
#| DNS
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=50000K max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4
#| IP FIREWALL MANGLE
/ip firewall mangle
add action=accept chain=prerouting in-interface=ether1
add action=accept chain=prerouting dst-address=192.168.1.0/24 src-address=192.168.2.0/24
add action=accept chain=prerouting dst-address=192.168.2.0/24 src-address=192.168.1.0/24
#| LAN To WAN
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
new-connection-mark=Lan1-to-Wan passthrough=yes per-connection-classifier=both-addresses:1/0 src-address=192.168.1.0/24 comment="LAN1 To WAN"
add action=mark-routing chain=prerouting connection-mark=Lan1-to-Wan disabled=no new-routing-mark=to_wan passthrough=yes src-address=192.168.1.0/24
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
new-connection-mark=Lan2-to-Wan passthrough=yes per-connection-classifier=both-addresses:1/0 src-address=192.168.2.0/24 comment="LAN2 To WAN"
add action=mark-routing chain=prerouting connection-mark=Lan2-to-Wan disabled=no new-routing-mark=to_wan passthrough=yes src-address=192.168.2.0/24
#| NAT
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=ether1 comment=""
#| ROUTE
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.10.254 routing-mark=to_wan scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.10.254 scope=30 target-scope=10
add dst-address=192.168.1.0/24 gateway=192.168.2.1
add dst-address=192.168.2.0/24 gateway=192.168.1.1
Mikrotik config ยังไงให้ LAN 2 วงมองเห็นกันและ ping กันได้ครับ
Mikrotik OS v6.44.2 >> ตาม flow นะครับ มี network 2 วง ใช้ router 1ตัว แจก DHCP LAN1 และ LAN2
ปัญหาคือ
Ping จากเครื่อง PC1 ไปที่ เครื่อง NB2 ไม่ได้ (ping LAN1 ไป LAN2)
คำถาม ??
คืออยากทราบวิธีทำให้ 2 LAN นี้มองเห็นกันจะกำหนดค่ายังไงครับ
ค่า Config ทั้งหมด
#| IP ADDRESS
/ip address add address=192.168.10.100/24 network=192.168.10.0 broadcast=192.168.10.255 interface=ether1
/ip address add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether2
/ip address add address=192.168.2.1/24 network=192.168.2.0 broadcast=192.168.2.255 interface=ether3
#| POOL
/ip pool add name=pool-lan1 ranges=192.168.1.100-192.168.1.200
/ip pool add name=pool-lan2 ranges=192.168.2.100-192.168.2.200
#| DHCP Server Network
/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 comment="DHCP LAN1"
/ip dhcp-server add name=DHCP-LAN1 address-pool=pool-lan1 disabled=no interface=ether2 lease-time=6h
/ip dhcp-server network add address=192.168.2.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.2.1 netmask=24 comment="DHCP LAN2"
/ip dhcp-server add name=DHCP-LAN2 address-pool=pool-lan2 disabled=no interface=ether3 lease-time=6h
#| DNS
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=50000K max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4
#| IP FIREWALL MANGLE
/ip firewall mangle
add action=accept chain=prerouting in-interface=ether1
add action=accept chain=prerouting dst-address=192.168.1.0/24 src-address=192.168.2.0/24
add action=accept chain=prerouting dst-address=192.168.2.0/24 src-address=192.168.1.0/24
#| LAN To WAN
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
new-connection-mark=Lan1-to-Wan passthrough=yes per-connection-classifier=both-addresses:1/0 src-address=192.168.1.0/24 comment="LAN1 To WAN"
add action=mark-routing chain=prerouting connection-mark=Lan1-to-Wan disabled=no new-routing-mark=to_wan passthrough=yes src-address=192.168.1.0/24
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
new-connection-mark=Lan2-to-Wan passthrough=yes per-connection-classifier=both-addresses:1/0 src-address=192.168.2.0/24 comment="LAN2 To WAN"
add action=mark-routing chain=prerouting connection-mark=Lan2-to-Wan disabled=no new-routing-mark=to_wan passthrough=yes src-address=192.168.2.0/24
#| NAT
/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=ether1 comment=""
#| ROUTE
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.10.254 routing-mark=to_wan scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.10.254 scope=30 target-scope=10
add dst-address=192.168.1.0/24 gateway=192.168.2.1
add dst-address=192.168.2.0/24 gateway=192.168.1.1