Does multiple nic setup with different subnet in Ubuntu actually require some extra steps to work correctly? I can't seem to bind curl/any other apps to one of the nic and make it uses that nic connection.
I have 2 nic plugged to my computer, one is onboard wired nic and wireless usb adapter. Both of them are connected to different routers and are assigned with different ip range and gateway ip. Before you ask
$ ip -4 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 10.10.1.2/24 brd 10.10.1.255 scope global eth0
4: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
inet 192.168.1.2/24 brd 192.168.1.255 scope global wlan1
$ ip -4 r
default via 10.10.1.1 dev eth0 proto static
10.10.1.0/24 dev eth0 proto kernel scope link src 10.10.1.2 metric 1
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.1.0/24 dev wlan1 proto kernel scope link src 192.168.1.2 metric 2
$ netstat -rn output
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.10.1.1 0.0.0.0 UG 0 0 0 eth0
10.10.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan1
I can ping their ip/gateway fine but binding to the usb adapter always fail. So any idea how to get this to work?