How do I show that a particular network route is working without that route being the default route?
Here is the situation at hand.
$ ip route
default via 192.168.2.1 dev enp0s31f6 proto dhcp metric 100
default via 10.162.141.192 dev wwp0s20f0u11i12 proto static metric 700
10.162.141.128/25 dev wwp0s20f0u11i12 proto kernel scope link src 10.162.141.191 metric 700
172.20.0.0/24 dev docker0 proto kernel scope link src 172.20.0.1 linkdown
172.20.2.0/24 dev br-8038758c8f58 proto kernel scope link src 172.20.2.1
192.168.2.0/24 dev enp0s31f6 proto kernel scope link src 192.168.2.21 metric 100
I want to show that the interface on wwp0s20f0u11i12
is working. That is I can open a connection where that interface is the source, connects to another address, and receives a response.
I thought something like curl --interface wwp0s20f0u11i12 https://www.google.com
would work, but there is no response. sudo tcpdump -n -i any -s 0 'tcp port https'
shows repeated requests with no response.
00:55:44.148198 IP 10.162.141.191.41853 > 172.217.6.68.443: Flags [S], seq 3546122463, win 64240, options [mss 1460,sackOK,TS val 4025092804 ecr 0,nop,wscale 10], length 0
If I make wwp0s20f0u11i12
the default route, I can successfully make the same request.
How do I make this request when wwp0s20f0u11i12
is not the default route.
(I have another system where I am unable to change an interface to be the default route and I want to be able to show if networking is operational on that interface.)
I am using Ubuntu 18.04 with NetworkManager.