I'll start out by saying networking isn't my strong suit, I'm trying to configure a few sub-interfaces so that some code I am working will have more sockets to locally bind to. So far i've done the following, I can locally bind to my sub interface 192.168.2.210, but I can not make a remote connection with it.
Here is my ifconfig:
eth0 Link encap:Ethernet HWaddr 00:50:56:BB:00:0B
inet addr:10.6.19.18 Bcast:10.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:febb:b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1056026 errors:0 dropped:0 overruns:0 frame:0
TX packets:638290 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:237037186 (226.0 MiB) TX bytes:126161362 (120.3 MiB)
eth0:1 Link encap:Ethernet HWaddr 00:50:56:BB:00:0B
inet addr:192.168.2.210 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Here is what i've tried to do to configure eth0:1
ifconfig eth0:1 192.168.2.210/32 up
ip route add 192.168.2.210/32 via 10.6.19.18
Here is my netstat -r output:
192.168.2.210 devserv. 255.255.255.255 UGH 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
10.6.19.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
default 10.6.19.1 0.0.0.0 UG 0 0 0 eth0
Any thoughts? Thanks for looking
192.168.2.210/32
which means that IP address has no network. The/32
netmask says that its the only IP address in the subnet. Also youre adding a route to say that traffic to that IP should go out your10.6.19.18
address. This doesnt make any sense. Why would you add a route to an IP that is on the server itself? If you can provide more info about what youre trying to accomplish, we can probably help more.