I'm quite new to networking and I really can't figure this out.
I am trying to add a static route so that all traffic to aa.aa.aa.aa goes through eth0:0 interface
root@LSW-199:~# ifconfig
eth0 Link encap:Ethernet HWaddr 80:c1:6e:6f:f8:68
inet addr:xx.xx.xx.xx Bcast:xx.xx.xx.xx Mask:255.255.255.224
inet6 addr: fe80::82c1:6eff:fe6f:f868/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:93598294 errors:0 dropped:0 overruns:0 frame:0
TX packets:95074908 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23532770742 (23.5 GB) TX bytes:27395117749 (27.3 GB)
Memory:c0400000-c0420000
eth0:0 Link encap:Ethernet HWaddr 80:c1:6e:6f:f8:68
inet addr:bb.bb.bb.bb Bcast:xx.xx.xx.xx Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Memory:c0400000-c0420000
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:107 errors:0 dropped:0 overruns:0 frame:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9416 (9.4 KB) TX bytes:9416 (9.4 KB)
The eth0:0 is definitely working because when I use cURL to test it can successfuly use the device and the IP is correct:
root@LSW-199:~# curl --interface eth0:0 api.ipify.org
bb.bb.bb.bb
But when I try to add a static route I get this error message:
root@LSW-199:~# ip route add aa.aa.aa.aa via bb.bb.bb.bb
RTNETLINK answers: Network is down
I have tried it service networking restart
and ifconfig eth0:0 down/up
with no luck.
Any ideas?