You are here

IP Rules in nightly build 509-303c509?

6 posts / 0 new
Last post
w6bi
w6bi's picture
IP Rules in nightly build 509-303c509?

Joe a number of months ago you gave me these IP rules to run to block Internet traffic:


ip rule del pref 20080
ip rule del pref 20080  < you may have said this is an unneeded duplicate; don't recall.
ip rule del pref 30099
ip rule del pref 30299

I've used them reliably with the production release firmware.
Tonight I upgraded my Mikrotik 952Ui-5ac2nD to nightly build 509.  Now running those rules, I get this:

root@W6BI-Shack-Node:~# ip rule del pref 20080
root@W6BI-Shack-Node:~# ip rule del pref 20080
root@W6BI-Shack-Node:~# ip rule del pref 30099
ip: RTNETLINK answers: No such file or directory
root@W6BI-Shack-Node:~# ip rule del pref 30299
ip: RTNETLINK answers: No such file or directory

I assume the rules have changed - what works for this release?  I need it because MRTG is giving me some crazy network utilization numbers post-upgrade and I need to see if it's Internet traffic, and/or the Mikrotik is lying to SNMP/MRTG.

Thanks
Orv W6BI

File Attachment: 
AE6XE
AE6XE's picture
Orv,  the interfaces have
Orv,  the interfaces have gotten more complicated with recent builds to support LAN Access Point capability and devices with multiple physical ethernet chips.   on the hap lite use these to measure the respective traffic:

br-lan:  LAN traffic (this is now the same for all devices setting stage to bridge in an AP when Mesh RF is off)
eth1.2:  DtDLINK traffic
eth0:  WAN traffic
wlan0:  RF Mesh traffic (and soon, if mesh rf is turned off, this will be joined in to br-lan bridge)

Would need to dig more why these ip rules don't exist, may not be normal in some situations.   The first is for the br-lan (LAN) route to a mesh default (not local gateway).   

what does these return (after a reboot and before you enter the ip rule delete commands)?:
> ip route list table 31
> ip rule list

Joe AE6XE 
w6bi
w6bi's picture
Results

Here you go:
 

root@W6BI-Shack-Node:~# ip route list table 31
default via 172.31.208.225 dev tun52  metric 2 onlink


root@W6BI-Shack-Node:~# ip rule list
0:      from all lookup local
20010:  from all iif eth1.2 lookup 29
20010:  from all iif wlan1 lookup 29
20010:  from all iif tun56 lookup 29
20010:  from all iif tun50 lookup 29
20010:  from all iif tun52 lookup 29
20010:  from all iif tun55 lookup 29
20010:  from all iif tun53 lookup 29
20020:  from all iif eth1.2 lookup 30
20020:  from all iif wlan1 lookup 30
20020:  from all iif tun56 lookup 30
20020:  from all iif tun50 lookup 30
20020:  from all iif tun52 lookup 30
20020:  from all iif tun55 lookup 30
20020:  from all iif tun53 lookup 30
20080:  from all iif eth1.2 lookup 31
20080:  from all iif wlan1 lookup 31
20080:  from all iif tun56 lookup 31
20080:  from all iif tun50 lookup 31
20080:  from all iif tun52 lookup 31
20080:  from all iif tun55 lookup 31
20080:  from all iif tun53 lookup 31
20090:  from all iif tun56 lookup main
20090:  from all iif tun50 lookup main
20090:  from all iif tun52 lookup main
20090:  from all iif tun55 lookup main
20090:  from all iif tun53 lookup main
30010:  from all iif br-lan lookup 29
30020:  from all iif br-lan lookup 30
30090:  from all iif br-lan lookup main
30099:  from all iif br-lan lookup 31
30210:  from all lookup 29
30220:  from all lookup 30
30290:  from all lookup main
30299:  from all lookup 31
32766:  from all lookup main
32767:  from all lookup default

 
AE6XE
AE6XE's picture
For a device with tunnels,
For a device with tunnels, there are a few more commands to type and clean out the routings to the internet.   General steps for any device:

1) ip rule list | grep "lookup 31"
2) do a command to get each row removed until this does not return anything.

In your data above, do this command 7 times to get the 7 respective rows removed:  "ip rule del pref 20080".
Table 31 is the default route that olsr sets to route traffic to the next mesh node to reach a remote internet gateway node. 

This is a manual hack until we get this into the UI and properly handled.   If an interface goes down, then back up, it would automatically recreate these entries.  This can happen if a tunnel link goes down and back live again.  

Joe AE6XE
w6bi
w6bi's picture
Works
This works, Joe - thanks.  It's not as bad as I fread; I can live with it until it's in the UI.
Orv W6BI
w6bi
w6bi's picture
Wunnerful....
Yuck.   Thanks, Joe.  Is there a github issue open to do this, or is it on someone's mental to do list?

Orv W6BI

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer