Ultimate SQM settings: Layer_cake + DSCP marks

Sounds like issue has nothing to do with QoS as you have problem with reverted config as well. I'd say set up your QoS and debug the DNS etc separately

Yea, it basically happens as soon as the connection is routed through Veth0/1. QoS package wasn't even installed at this point.

1 Like

HI.
i ant to check something:
first, open CMD then type "ping 192.168.8.2 -t" , i think 192.168.8.2 is your openwrt router gateway ip.
and see if there's a packet loss when the veth script is running.
second, some isp's is intercept dns traffic like in my case, isp is intercept the dns traffic on port 53; i can't open
openwrt.org or xda-devlopers.com it say host not resolved.
so after using opendns (Cisco owned dns provider)on port 5353,my problem is fixed.
goto -->network-->dhcp and dns-->DNS forwardings, then add :

208.67.220.220#5353
208.67.222.222#5353

then check if your problem got fixed!

just beware that the name is misleading in that it is anything but open.
its owned by cisco, logs to power their passive dns db and filters

Hard to imagine I have packet loss to router though (or did you mean packet loss to modem?)

Ill test it anyway! Also will check DNS.

Another thing I might try is use my alternate isp which does have bridge mode possibility. At least I can see if my Fake DMZ bridge is causing it.

Edit:
Tried my other 'unstable' ISP with bridge mode capabilty on modem, switched openwrt interface to dhcp, same issue once script starts.

DNS solution not working. I really have an idea its something to do with Veth, Dnsmasq or openwrt here.. :-/

Pinging www.google.nl [172.217.17.35] with 32 bytes of data:
Reply from 192.168.1.1: Destination port unreachable.

Strange thing is, sometimes it intermittently works for a while as soon as i start the script, other times the DNS is completely crapped up.

Yet my continuous ping on my Client keeps going nicely though the Veth, or any other network socket stream seems to stay alive.

Edit2:

I see no indication of any packet loss to modem nor router when it happens, both pings 192.168.8.2 and internal ip 192.168.1.1 happily.

However! I can no longer ping 192.168.8.1 (My modem with DMZ method) once i start the script. Not sure if this is intended behavior?

1 Like

no i mean packet loss to your openwrt router, cause this happened to me a long time ago, and i fixed that with a trick.
ok, test and lets see.also try to change the dns.
try this in terminal :

ifconfig veth1 192.168.8.4
ifconfig your_main_lan_interface_like_eth0 192.168.8.5

also why "192.168.1.1" it should be 192.168.8.2 ?!

Well, 192.168.8.1 is my modem IP, 192.168.8.2 is my assigned 'WAN' ip, with gateway 192.168.8.1 set.

192.168.1.1 is the 'internal' LAN ip of my router right, with added DHCP server to clients.. from range 100-150.

now i see!
so instead use 192.168.1.4 - 192.168.1.5 instead of 192.168.8.4-5.
can you paste your ifconfig output here?
add an interface from network-->interface-->new interface
protocol unmanaged ,physical interface veth0

root@OpenWrt:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr 62:38:E0:10:AE:CF
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fdec:4e63:cbbd::1/60 Scope:Global
          inet6 addr: fe80::6038:e0ff:fe10:aecf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1578 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1584 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:264568 (258.3 KiB)  TX bytes:276864 (270.3 KiB)

eth0      Link encap:Ethernet  HWaddr 62:38:E0:10:AE:CF
          inet6 addr: fe80::6038:e0ff:fe10:aecf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1685 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1630 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:303261 (296.1 KiB)  TX bytes:289519 (282.7 KiB)
          Interrupt:37

eth0.1    Link encap:Ethernet  HWaddr 62:38:E0:10:AE:CF
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1611 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1603 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:269400 (263.0 KiB)  TX bytes:279463 (272.9 KiB)

eth1      Link encap:Ethernet  HWaddr 60:38:E0:10:AE:CF
          inet6 addr: fe80::6238:e0ff:fe10:aecf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:895 errors:0 dropped:0 overruns:0 frame:0
          TX packets:868 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532
          RX bytes:214011 (208.9 KiB)  TX bytes:235476 (229.9 KiB)
          Interrupt:36

eth1.2    Link encap:Ethernet  HWaddr 60:38:E0:10:AE:CF
          inet addr:192.168.8.2  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fe80::6238:e0ff:fe10:aecf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:873 errors:0 dropped:0 overruns:0 frame:0
          TX packets:864 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:197021 (192.4 KiB)  TX bytes:231564 (226.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1648 (1.6 KiB)  TX bytes:1648 (1.6 KiB)

veth0     Link encap:Ethernet  HWaddr E2:17:E4:06:86:34
          inet6 addr: fe80::e017:e4ff:fe06:8634/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6828 (6.6 KiB)  TX bytes:2599 (2.5 KiB)

veth1     Link encap:Ethernet  HWaddr 6A:E5:6B:D5:E8:D6
          inet6 addr: fe80::68e5:6bff:fed5:e8d6/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:19 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2599 (2.5 KiB)  TX bytes:6828 (6.6 KiB)

This is with script just started up.
(I just noticed no ipv4 on veth interfaces btw? Does it internally use Ipv6 only?)

that's normal that veth have no ip, cause it's layer2.
i will back after a few minutes!
look at mine:

br-lan    Link encap:Ethernet  HWaddr C0:4A:00:E7:23:46
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd80:b841:8de6::1/60 Scope:Global
          inet6 addr: fe80::c24a:ff:fee7:2346/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:498911 errors:0 dropped:3 overruns:0 frame:0
          TX packets:180351 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:54489943 (51.9 MiB)  TX bytes:77689299 (74.0 MiB)

eth0      Link encap:Ethernet  HWaddr C0:4A:00:E7:23:46
          inet6 addr: fe80::c24a:ff:fee7:2346/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4887602 errors:0 dropped:1 overruns:0 frame:0
          TX packets:5135831 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:37035005 (35.3 MiB)  TX bytes:1217841813 (1.1 GiB)

eth0.1    Link encap:Ethernet  HWaddr C0:4A:00:E7:23:46
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26656 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1518567 (1.4 MiB)

eth0.4    Link encap:Ethernet  HWaddr C0:4A:00:E7:23:46
          inet addr:10.10.20.21  Bcast:10.10.20.255  Mask:255.255.255.0
          inet6 addr: fe80::c24a:ff:fee7:2346/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4887574 errors:0 dropped:151250 overruns:0 frame:0
          TX packets:5109175 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4204895321 (3.9 GiB)  TX bytes:1174984658 (1.0 GiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:3357 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3357 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:303124 (296.0 KiB)  TX bytes:303124 (296.0 KiB)

pppoe-wan Link encap:Point-to-Point Protocol
          inet addr:10.54.112.109  P-t-P:10.0.0.10  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1480  Metric:1
          RX packets:4524932 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5105205 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:4148768345 (3.8 GiB)  TX bytes:1062536660 (1013.3 MiB)

veth0     Link encap:Ethernet  HWaddr 5E:F6:3E:73:3E:D5
          inet6 addr: fe80::5cf6:3eff:fe73:3ed5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4404106 errors:0 dropped:5 overruns:0 frame:0
          TX packets:4249729 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1047633112 (999.1 MiB)  TX bytes:4182592351 (3.8 GiB)

veth1     Link encap:Ethernet  HWaddr 86:37:60:D8:41:CE
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:4249729 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4404106 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4182592351 (3.8 GiB)  TX bytes:1047633112 (999.1 MiB)

wlan0     Link encap:Ethernet  HWaddr C0:4A:00:E7:23:48
          inet6 addr: fe80::c24a:ff:fee7:2348/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4885051 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4379808 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1109147089 (1.0 GiB)  TX bytes:4312932743 (4.0 GiB)

Veth interfaces are basically layer 2 here, they're just a place to put a full service queue that happens after routing.

1 Like

Ah i see. A lot of this goes beyond me, been years since I've even touched linux and corresponding commands hah.

I'm just confused why this whole thing craps out on me while others seem to just get it working out of the box :blush:

Especially since I use default Openwrt settings pretty much. Appreciated all the help I got so far though.

Hey
instead of :
ip rule add iif eth1.2 table 100 priority 100
try:
ip rule add iif eth1 table 100 priority 100
then lets see how it will goes.

Works fine. Veth interfaces are not used now though.

what do you mean?

No data going through Veth0/1 (At least not my activity)

You need separate priorities otherwise I think second one overwrites first right?

I'm rebooting anyhow when i make change to script though, and retried this one now.

there's should be some traffic going in/out even without priorities!

There has been, but only initially.


veth0     Link encap:Ethernet  HWaddr 3A:CA:78:3E:C9:03
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1140 (1.1 KiB)  TX bytes:966 (966.0 B)

veth1     Link encap:Ethernet  HWaddr C6:1D:2B:D3:03:B1
          inet6 addr: fe80::c41d:2bff:fed3:3b1/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:966 (966.0 B)  TX bytes:1140 (1.1 KiB)

I see data go through Eth1 though when browsing web.