Community discussions

MikroTik App
 
Kaze6129
just joined
Topic Author
Posts: 6
Joined: Tue Sep 22, 2020 5:41 pm

IP range can ping its range and another but other range cant ping another range but can ping its range

Mon Mar 01, 2021 9:14 am

Hi Everyone

Been stuck for a few days on this, I have a hap lite that I'm trying to use as a type of bridge for a network to connect 2 different IP ranges to see each other.
The 1st range will be 192.168.245.0/24 on eth4 and currently this range can ping the 245 range but not the 8 range -> Will be connected to a standalone machine.
The 2nd range will be 192.168.8.0/24 on eth 3 and currently this range can ping the 8 range but not the 245 range -> Will be connected to a switch which then will connect to the entire network

There is no firewall currently and no other settings are set.

I tried with NAT mas all and added manual static routes but still the same thing.

Any advice?
 
Kaze6129
just joined
Topic Author
Posts: 6
Joined: Tue Sep 22, 2020 5:41 pm

Re: IP range can ping its range and another but other range cant ping another range but can ping its range

Mon Mar 01, 2021 10:08 am

Seem to have broken it now, now I am unable to ping each others range from either but can from the Mikrotik.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11597
Joined: Thu Mar 03, 2016 10:23 pm

Re: IP range can ping its range and another but other range cant ping another range but can ping its range

Mon Mar 01, 2021 2:15 pm

With router having addresses properly set[*] on two interfaces (and having proper network mask set, in your case subnet mask is most probably /24 in both cases) and without anything in firewall, router will pass all packets between both subnets ... if those packets arrive at router, which implies properly set routes on relevant devices in each of subnets (which ones heavily depends on overall network design).

[*] It's all too easy to forget to set subnet mask when setting interface address, e.g. /ip address add interface=ether3 address=192.168.8.x/24
 
Kaze6129
just joined
Topic Author
Posts: 6
Joined: Tue Sep 22, 2020 5:41 pm

Re: IP range can ping its range and another but other range cant ping another range but can ping its range

Mon Mar 01, 2021 2:34 pm

I have the /24 showing in my IP Addresses.

Here is my current setup, I have been making changes to try and see what works=

/interface bridge
add name=bridge2
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce \
disabled=no mode=ap-bridge ssid=Test wireless-protocol=802.11
/interface ethernet
set [ find default-name=ether1 ] disabled=yes
/interface pppoe-client
add add-default-route=yes interface=ether1 name=pppoe-out1 use-peer-dns=yes
/interface list
add name=WAN
add name=LAN
/interface bridge nat
add action=accept chain=srcnat
/interface bridge port
add bridge=bridge2 interface=ether2 trusted=yes
add bridge=bridge2 hw=no interface=ether3 trusted=yes
add bridge=bridge2 interface=ether4 trusted=yes
add bridge=bridge2 disabled=yes interface=ether1
add bridge=bridge2 interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=all
/interface list member
add interface=ether2 list=LAN
add interface=ether3 list=LAN
add interface=ether4 list=LAN
add interface=wlan1 list=LAN
add interface=bridge2 list=LAN
add interface=ether1 list=WAN
add interface=pppoe-out1 list=WAN
/interface wireless cap
set bridge=bridge2 interfaces=wlan1
/ip address
add address=192.168.8.0/24 interface=ether2 network=192.168.8.0
add address=192.168.245.1/24 interface=ether4 network=192.168.245.0
add address=192.168.0.177/24 interface=bridge2 network=192.168.0.0
/ip dhcp-client
add interface=ether1
/ip dhcp-server network
add address=192.168.8.0/24 dns-server=192.168.8.1,8.8.8.8 gateway=192.168.8.1
/ip dns
set servers=8.8.8.8,8.8.4.4
/ip firewall filter
add action=accept chain=input
/ip firewall nat
add action=accept chain=srcnat
/ip route
add distance=1 gateway=192.168.0.254
add distance=1 dst-address=192.168.8.0/24 gateway=192.168.8.1
add distance=1 dst-address=192.168.8.1/32 gateway=ether2 pref-src=\
192.168.245.250
add distance=1 dst-address=192.168.245.0/24 gateway=192.168.245.1
add distance=1 dst-address=192.168.245.1/32 gateway=ether4 pref-src=\
192.168.8.0
/ip route rule
add action=lookup-only-in-table dst-address=192.168.8.0/24 src-address=\
192.168.245.0/24 table=main
add action=lookup-only-in-table dst-address=192.168.245.0/24 src-address=\
192.168.8.0/24 table=main
/system clock
set time-zone-name=Africa/Johannesburg
/system identity
set name=Test
/system ntp client
set enabled=yes primary-ntp=196.4.160.4
/system package update
set channel=long-term
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11597
Joined: Thu Mar 03, 2016 10:23 pm

Re: IP range can ping its range and another but other range cant ping another range but can ping its range

Mon Mar 01, 2021 2:49 pm

If the only functionality you need is routing between two subnets, then current config is overly complicated and in large part simply wrong (e.g. both interfaces are bridged while they shouldn't be, you have SRC-NAT enabled, ...).
Fetch winbox, then reset router to no configuration. Connect using winbox by clicking MAC address and set addresses to ether3 and ether4. If routes in both subnets are fine, this should do.
 
Kaze6129
just joined
Topic Author
Posts: 6
Joined: Tue Sep 22, 2020 5:41 pm

Re: IP range can ping its range and another but other range cant ping another range but can ping its range

Mon Mar 01, 2021 3:51 pm

I reset and it is still not working with just these settings.

/interface bridge
add admin-mac= auto-mac=no comment=defconf name=bridgeLocal
/interface wireless
# managed by CAPsMAN
set [ find default-name=wlan1 ] ssid=MikroTik
/interface pwr-line
set [ find default-name=pwr-line1 ] disabled=yes
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface bridge port
add bridge=bridgeLocal comment=defconf interface=ether1
add bridge=bridgeLocal comment=defconf interface=ether2
add bridge=bridgeLocal comment=defconf interface=ether3
add bridge=bridgeLocal comment=defconf interface=ether4
/interface wireless cap
#
set bridge=bridgeLocal discovery-interfaces=bridgeLocal enabled=yes \
interfaces=wlan1
/ip dhcp-client
add comment=defconf disabled=no interface=bridgeLocal
/ip dns
set servers=8.8.8.8
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11597
Joined: Thu Mar 03, 2016 10:23 pm

Re: IP range can ping its range and another but other range cant ping another range but can ping its range

Mon Mar 01, 2021 6:17 pm

These settings won't allow device to route between subnets, it's switching between ethernet interfaces.

Instead, you should end up with configuration like this:
/ip address
add interface=ether3 address=192.168.8.42/24    # adjust address to what other devices in 192.168.8.0/24 expect
add interface=ether4 address=192.168.245.42/24  # adjust address to what other devices in 192.168.245.0/24 expect

So no bridge, no nothing else. Simply LAN1 address on ether3 and LAN2 address on ether4 ...

Who is online

Users browsing this forum: Ahrefs [Bot] and 59 guests