Article 4W5AV Trying to dual bind two WiFi interfaces.....getting error messages

Trying to dual bind two WiFi interfaces.....getting error messages

by
ajmcello
from LinuxQuestions.org on (#4W5AV)
Here's the values of /etc/iproute2/rt_tables:

db1:/etc/iproute2# cat rt_tables
#
# reserved values
#
255local
254main
253default
252 T2
251 T1
0unspec
#
# local
#
#1inr.ruhep

ifconfig -a output:
db1:/etc/iproute2# ifconfig -a
enp0s20f0u3c4i2: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 16:20:5e:53:a3:96 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp7s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 8c:16:45:b4:3d:b4 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1444 bytes 135637 (135.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1444 bytes 135637 (135.6 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.25.3.206 netmask 255.255.255.0 broadcast 172.25.3.255
inet6 fe80::2a61:a50a:aa77:525 prefixlen 64 scopeid 0x20<link>
ether 30:24:32:5f:48:da txqueuelen 1000 (Ethernet)
RX packets 11521 bytes 7970323 (7.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9672 bytes 1388625 (1.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlx3894ed23cf8d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.25.0.104 netmask 255.255.255.0 broadcast 172.25.0.255
inet6 fe80::2d91:4c3:11cf:76ec prefixlen 64 scopeid 0x20<link>
ether 38:94:ed:23:cf:8d txqueuelen 1000 (Ethernet)
RX packets 96 bytes 6410 (6.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 136 bytes 12338 (12.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Script:

db1:/root# ./ipbind.sh
+ IF1=wlp0s20f3
+ IF2=wlx3894ed23cf8d
+ IP1=172.25.3.206
+ IP2=172.25.0.104
+ P1_NET=172.25.3.0/24
+ P2_NET=172.25.0.0/24
+ P1=172.25.3.1
+ P2=172.25.0.1
+ ip route add 172.25.3.0/24 dev wlp0s20f3 src 172.25.3.206 table T1
+ ip route add default via 172.25.3.1 table T1
+ ip route add 172.25.0.0/24 dev wlx3894ed23cf8d src 172.25.0.104 table T2
+ ip route add default via 172.25.0.1 table T2
+ ip route add 172.25.3.0/24 dev wlp0s20f3 src 172.25.3.206
+ ip route add 172.25.0.0/24 dev wlx3894ed23cf8d src 172.25.0.104
+ ip route add default via 172.25.3.1
+ ip rule add from 172.25.3.206 table T1
+ ip rule add from 172.25.0.104 table T2
+ ip route add dev table T1
Error: any valid prefix is expected rather than "T1".
+ ip route add 172.25.0.0/24 dev wlx3894ed23cf8d table T1
+ ip route add 127.0.0.0/8 dev lo table T1
+ ip route add dev table T2
Error: any valid prefix is expected rather than "T2".
+ ip route add 172.25.3.0/24 dev wlp0s20f3 table T2
+ ip route add 127.0.0.0/8 dev lo table T2
+ ip route add default scope global nexthop via 172.25.3.1 dev wlp0s20f3 weight 1 nexthop via 172.25.0.1 dev wlx3894ed23cf8d weight 1
RTNETLINK answers: File exists

Details of script:
#!/bin/bash -x

IF1=wlp0s20f3
IF2=wlx3894ed23cf8d
IP1=172.25.3.206
IP2=172.25.0.104
P1_NET=172.25.3.0/24
P2_NET=172.25.0.0/24
P1=172.25.3.1
P2=172.25.0.1

ip route add $P1_NET dev $IF1 src $IP1 table T1
ip route add default via $P1 table T1
ip route add $P2_NET dev $IF2 src $IP2 table T2
ip route add default via $P2 table T2

ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2

ip route add default via $P1

ip rule add from $IP1 table T1
ip rule add from $IP2 table T2

ip route add $P0_NET dev $IF0 table T1
ip route add $P2_NET dev $IF2 table T1
ip route add 127.0.0.0/8 dev lo table T1
ip route add $P0_NET dev $IF0 table T2
ip route add $P1_NET dev $IF1 table T2
ip route add 127.0.0.0/8 dev lo table T2

ip route add default scope global nexthop via $P1 dev $IF1 weight 1 nexthop via $P2 dev $IF2 weight 1

How do I resolve?

Simpler way? What if both wifi's are on the same network with different IP addresses? (This is not the case due to netmask, it appears)

Thanks.latest?d=yIl2AUoC8zA latest?i=ijQGvNqH83Q:HG9Zb-vgg38:F7zBnMy latest?i=ijQGvNqH83Q:HG9Zb-vgg38:V_sGLiP latest?d=qj6IDK7rITs latest?i=ijQGvNqH83Q:HG9Zb-vgg38:gIN9vFwijQGvNqH83Q
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments