Community discussions

MikroTik App
 
ASkript
just joined
Topic Author
Posts: 2
Joined: Mon Apr 01, 2024 4:08 am

I'm trying to setup VLANs but I get no gateway

Mon Apr 01, 2024 4:31 am

I'm trying to setup VLANs but I get no gateway
https://drive.google.com/file/d/1XN4Dyp ... sp=sharing
# 2024-01-10 23:01:37 by RouterOS 7.14.2
# software id = 55AP-WFB1
#
# model = RB760iGS

/interface bridge
add name=PlayBridgeVL22
add admin-mac=DC:2C:6E:80:44:43 auto-mac=no comment=defconf name=bridge \
port-cost-mode=short
/interface ethernet
set [ find default-name=ether1 ] comment=WAN1
set [ find default-name=ether2 ] comment=WAN2
/interface vlan
add interface=ether3 name=GuestNetVLAN vlan-id=66
add interface=ether3 name=PlayVLAN22 vlan-id=22
add interface=ether3 name=RestVLAN vlan-id=77
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip hotspot profile
set [ find default=yes ] html-directory=hotspot
/ip pool
add name=default-dhcp ranges=192.168.88.12-192.168.88.254
add name=GuestNet ranges=192.168.66.111-192.168.66.222
add name=PlayNet ranges=192.168.22.111-192.168.22.222
/ip dhcp-server
add address-pool=default-dhcp interface=bridge lease-time=10m name=defconf
add address-pool=GuestNet interface=GuestNetVLAN name=GuestNetDHCP
add address-pool=PlayNet interface=PlayBridgeVL22 name=PlaynetDHCP
/ip smb users
set [ find default=yes ] disabled=yes
/port
set 0 name=serial0
/routing table
add disabled=no fib name=To_WAN1
add disabled=no fib name=To_WAN2
/interface bridge port
add bridge=bridge comment=defconf interface=ether3 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 \
path-cost=10
add bridge=bridge comment=defconf interface=ether5 internal-path-cost=10 \
path-cost=10
add bridge=PlayBridgeVL22 interface=PlayVLAN22
/ip firewall connection tracking
set udp-timeout=10s
/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
add interface=PlayVLAN22 list=LAN
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=192.168.66.1/24 interface=GuestNetVLAN network=192.168.66.0
add address=192.168.22.1/24 interface=PlayBridgeVL22 network=192.168.22.0
/ip dhcp-client
add add-default-route=no comment=defconf interface=ether1
add add-default-route=no interface=ether2
/ip dhcp-server lease
add address=192.168.88.254 client-id=1:74:56:3c:3c:f3:f4 mac-address=\
74:56:3C:3C:F3:F4 server=defconf
add address=192.168.88.246 client-id=1:c:9a:3c:f8:f0:7a mac-address=\
0C:9A:3C:F8:F0:7A server=defconf
add address=192.168.88.245 client-id=1:90:2e:16:d2:3f:3e mac-address=\
90:2E:16:D2:3F:3E server=defconf
add address=192.168.88.56 client-id=1:14:58:d0:47:b9:0 mac-address=\
14:58:D0:47:B9:00 server=defconf
add address=192.168.88.57 mac-address=98:F2:B3:0C:76:68 server=defconf
/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 servers=1.1.1.1
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
add address=127.0.0.1 regexp=".*\\.zip\$"
add address=127.0.0.1 regexp=".*\\.mov\$"
/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 mangle
add action=accept chain=prerouting dst-address=192.168.2.0/24 in-interface=\
bridge
add action=accept chain=prerouting disabled=yes dst-address=192.168.2.0/24 \
in-interface=GuestNetVLAN
add action=accept chain=prerouting dst-address=192.168.9.0/24 in-interface=\
bridge
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=ether1 new-connection-mark=WAN1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
in-interface=ether2 new-connection-mark=WAN2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
dst-address-type=!local in-interface=bridge new-connection-mark=WAN1_conn \
passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=\
yes dst-address-type=!local in-interface=GuestNetVLAN \
new-connection-mark=WAN1_conn passthrough=yes per-connection-classifier=\
both-addresses:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark \
dst-address-type=!local in-interface=bridge new-connection-mark=WAN2_conn \
passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=bridge new-routing-mark=To_WAN1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN1_conn disabled=\
yes in-interface=GuestNetVLAN new-routing-mark=To_WAN1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=bridge new-routing-mark=To_WAN2 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_conn \
new-routing-mark=To_WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=To_WAN2 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface=ether1
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface=PlayBridgeVL22
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface=ether2
add action=dst-nat chain=dstnat comment=BitComet dst-port=15689 protocol=udp \
to-addresses=192.168.88.254 to-ports=15689
add action=dst-nat chain=dstnat comment=HoMM3 disabled=yes dst-port=27015 \
protocol=tcp to-addresses=192.168.88.254 to-ports=27015
add action=dst-nat chain=dstnat comment=HoMM3 disabled=yes dst-port=27016 \
protocol=tcp to-addresses=192.168.88.254 to-ports=27016
add action=dst-nat chain=dstnat comment=HoMM3 disabled=yes dst-port=27016 \
protocol=udp to-addresses=192.168.88.254 to-ports=27016
add action=dst-nat chain=dstnat comment=HoMM3 disabled=yes dst-port=27015 \
protocol=udp to-addresses=192.168.88.254 to-ports=27015
add action=dst-nat chain=dstnat comment=HoMM3 disabled=yes dst-port=8766 \
protocol=udp to-addresses=192.168.88.254 to-ports=8766
add action=dst-nat chain=dstnat comment=HoMM3 disabled=yes dst-port=8766 \
protocol=tcp to-addresses=192.168.88.254 to-ports=8766
add action=dst-nat chain=dstnat dst-port=15689 protocol=tcp to-addresses=\
192.168.88.254 to-ports=15689
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
192.168.2.1 pref-src="" routing-table=To_WAN1 scope=30 \
suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
192.168.9.1 pref-src="" routing-table=To_WAN2 scope=30 \
suppress-hw-offload=no target-scope=10
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip smb shares
set [ find default=yes ] directory=/flash/pub
/ip upnp
set enabled=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
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19742
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: I'm trying to setup VLANs but I get no gateway

Mon Apr 01, 2024 4:58 am

Your config makes no senses, its a patchwork of nothing that fits together.
You need to make a coherent plan way before starting a config.
 
ASkript
just joined
Topic Author
Posts: 2
Joined: Mon Apr 01, 2024 4:08 am

Re: I'm trying to setup VLANs but I get no gateway

Mon Apr 01, 2024 3:47 pm

I got a rough idea of how I want my network to look like. Guess it is a good idea to set up the router from scratch.
https://drive.google.com/file/d/1k4kfiu ... sp=sharing
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11770
Joined: Thu Mar 03, 2016 10:23 pm

Re: I'm trying to setup VLANs but I get no gateway

Mon Apr 01, 2024 3:52 pm

Guess it is a good idea to set up the router from scratch.

Before[*] starting from scratch, have a look at this tutorial to get an idea about how VLANs are properly done in ROS.

[*] I wrote "before" not because you shouldn't tear your config apart but to learn how to do it properly from scratch. Have no doubts: diagnisis of your current setup by @anav is spot on.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19742
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: I'm trying to setup VLANs but I get no gateway

Mon Apr 01, 2024 4:59 pm

Suggest a diagram which details equipment being used, subnets in play, internet source, port usage etc..........
Suggest a set of requirements to:
a. identify all the users and devices, including the admin
b. identify all the traffic the users/devices need.

Who is online

Users browsing this forum: nichky and 23 guests