Hi,
The following question relates to IP aliases.
I'm not sure if the groups I've posted to are the correct
place - but I couldn't find a really correct group.
Bear with me if you've any expertise in programming IP Aliases.
If I have the following IP aliases configuration
(IP numbers changed to protect the innocent :-):
eth0 Link encap:Ethernet HWaddr 00:48:54:01:28:61
inet addr:10.0.0.172 Bcast:10.0.0.175 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:921326 errors:0 dropped:0 overruns:0 frame:0
TX packets:92310 errors:4 dropped:0 overruns:0 carrier:10
collisions:8167
Interrupt:10 Base address:0xd000
eth0:1 Link encap:Ethernet HWaddr 00:48:54:01:28:61
inet addr:10.0.0.173 Mask:255.255.255.255
UP RUNNING MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
eth0:2 Link encap:Ethernet HWaddr 00:48:54:01:28:61
inet addr:10.0.0.174 Mask:255.255.255.255
UP RUNNING MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
It's relatively easy to write code that will listen()
on each of these interfaces. I've been going mad trying
to get the "reverse" to work.
Is it possible to write code under Linux that allows outgoing
packets (after a connect(), etc) to come from the aliased
interfaces (eth0:1, etc) rather than simply eth0?
If so; could someone point me at the correct ioctl()
or the socket options or even a snippet of code.
Please remove the "eatspam" from my reply address to
send to me if you reply directly.
thanks,
Geoff