Community discussions

MikroTik App
 
dhwiltshire
just joined
Topic Author
Posts: 4
Joined: Wed Aug 31, 2022 2:54 pm

Local IP List to go via WAN2

Wed Aug 31, 2022 2:59 pm

Hi.
I'm a bit of a beginner with MikroTik. Formerly Draytek and UB. But I want a challenge.. :)
I have a HEX at home. I also work from home.
I have two "broadband" connection. WAN1 is via a Mobile Internet Router. (Double natted, I know! :) ) ands WAN2 is VDSL Broadband.

I want the default connection for everyone at home to be WAN1, but I want anything in the IP List "DIT" to go out via WAN2.. I see all the exmaples of MANGLE rules etc, but I just can't quite get my head around it.
Any assistance would be much appreciated..

Current config. At present, WAN2 (PPPOE) is disabled.
/interface bridge
add name=bridge1
/interface ethernet
set [ find default-name=ether2 ] name=Optanet
set [ find default-name=ether1 ] name=Three
/interface pppoe-client
add add-default-route=yes disabled=yes interface=Optanet name=pppoe-out1 user=myverona@dslnet
/interface list
add name=WAN
add name=LAN
add name=WAN2
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=172.16.10.1-172.16.20.250
/ip dhcp-server
add add-arp=yes address-pool=dhcp interface=bridge1 name=dhcp1
/port
set 0 name=serial0
/interface bridge port
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
/interface list member
add interface=Three list=WAN
add interface=bridge1 list=LAN
add interface=Optanet list=WAN2
/ip address
add address=172.16.0.1/16 interface=bridge1 network=172.16.0.0
/ip dhcp-client
add interface=Three use-peer-dns=no
add interface=Optanet use-peer-dns=no
/ip dhcp-server lease
add address=172.16.111.8 client-id=1:e0:70:ea:da:3:4d mac-address=E0:70:EA:DA:03:4D server=dhcp1
add address=172.16.111.2 mac-address=C4:5B:BE:E2:40:D2 server=dhcp1
add address=172.16.111.9 mac-address=DC:4F:22:92:DC:C6 server=dhcp1
add address=172.16.111.18 client-id=1:c:8d:db:6:35:87 mac-address=0C:8D:DB:06:35:87 server=dhcp1
add address=172.16.11.17 client-id=1:9c:31:c3:fd:ef:49 comment="Sky Booster" mac-address=9C:31:C3:FD:EF:49 server=dhcp1
add address=172.16.111.1 client-id=1:de:28:b6:d7:3f:49 mac-address=DE:28:B6:D7:3F:49 server=dhcp1
add address=172.16.111.3 client-id=1:0:15:65:f2:ed:a9 mac-address=00:15:65:F2:ED:A9 server=dhcp1
add address=172.16.11.21 comment="Sky Q Main Box" mac-address=D0:58:FC:1A:09:5A server=dhcp1
add address=172.16.11.20 comment="Sky Q Master Bedroom" mac-address=D4:52:EE:06:66:1A server=dhcp1

/ip dhcp-server network
add address=172.16.0.0/16 dns-server=172.16.0.1 domain=myverona.home gateway=172.16.0.1 netmask=16
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,1.1.1.1
/ip firewall address-list
add address=172.16.111.0/24 comment="DirectIT IP Addresses" list=DIT
add address=172.16.11.0/24 comment="Sky Boxes" list=SKY
/ip firewall filter
add action=accept chain=input icmp-options=8:0-255 protocol=icmp
/ip firewall nat
add action=masquerade chain=srcnat out-interface-list=WAN
add action=masquerade chain=srcnat out-interface-list=WAN
/system clock
set time-zone-name=Europe/London
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19379
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Local IP List to go via WAN2

Wed Aug 31, 2022 4:24 pm

HI there,

Its not an unusual request for dual or multi-wan connections.
The question I have to ask is how many exceptions do you have?
(what constitutes this address list?)
a. do you have a second subnet where they all need to deviate
b. do you have a single subnet where some need to deviate and if so how many?
c. for the case b., can you move those that need to deviate to a different subnet or vlan ( makes life easier ).
 
dhwiltshire
just joined
Topic Author
Posts: 4
Joined: Wed Aug 31, 2022 2:54 pm

Re: Local IP List to go via WAN2

Wed Aug 31, 2022 7:36 pm

HI there,

Its not an unusual request for dual or multi-wan connections.
The question I have to ask is how many exceptions do you have?
(what constitutes this address list?)
a. do you have a second subnet where they all need to deviate
b. do you have a single subnet where some need to deviate and if so how many?
c. for the case b., can you move those that need to deviate to a different subnet or vlan ( makes life easier ).
Hi.
The IPs are static via DHCP server, and are 172.16.111.xxx
Sorting the VLAN, that would be a new lesson for my MikroTik journey.......
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19379
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Local IP List to go via WAN2

Wed Aug 31, 2022 8:47 pm

Are you saying its the complete 172.16.111.0/24 subnet?
If its only some, how many users?
 
dhwiltshire
just joined
Topic Author
Posts: 4
Joined: Wed Aug 31, 2022 2:54 pm

Re: Local IP List to go via WAN2

Thu Sep 01, 2022 4:35 pm

Are you saying its the complete 172.16.111.0/24 subnet?
If its only some, how many users?
Yeah. I'd like the whole of the 111.0 subnet to go out WAN2.
It's just about 10 IPs
 
dhwiltshire
just joined
Topic Author
Posts: 4
Joined: Wed Aug 31, 2022 2:54 pm

Re: Local IP List to go via WAN2

Thu Sep 01, 2022 4:36 pm

HI there,

Its not an unusual request for dual or multi-wan connections.
The question I have to ask is how many exceptions do you have?
(what constitutes this address list?)
a. do you have a second subnet where they all need to deviate
b. do you have a single subnet where some need to deviate and if so how many?
c. for the case b., can you move those that need to deviate to a different subnet or vlan ( makes life easier ).
Hi.
The IPs are static via DHCP server, and are 172.16.111.xxx
Sorting the VLAN, that would be a new lesson for my MikroTik journey.......
I managed to get VLANS set up, but as I don't have a managed switch, I was only able to get the DHCP set up on the HEX to issue the correct IP/GW etc but unable to access the internet at all.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19379
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Local IP List to go via WAN2

Thu Sep 01, 2022 7:12 pm

Well no wonder it doesnt work you never assigned a subnet/address or anything for the .111 network, you only have leases.

I see you have ports 3,4,5 available to the LAN bridge,
what is each connected too? and which users are behind each port..........

Who is online

Users browsing this forum: Google [Bot], Javokhir, rspott and 208 guests