| How To Specify IP Address In Outbound Traffic In Linux |
|
|
|
| How To - Networking | |||
| Written by Christian Foronda | |||
| Wednesday, 02 March 2011 09:16 | |||
|
If you setup an IP aliases (e.g., eth0:0, eth0:1) on a single NIC, by default the primary IP assigned to the NIC (eth0) will be used as the source IP for all outbound traffic. Where: Specify what IP should be used for outbound traffic on a specific host: # route add -host xxx.xxx.xxx.xxx dev eth0:0 All traffic destined to host xxx.xxx.xxx.xxx will be routed to eth0:0, thus the outgoing IP will be 172.16.0.10.
Specify what IP should be used for outbound traffic on a specific network: # route add -net xxx.xxx.xxx.x/xx dev eth0:0 Similar articles
|
|||
| Last Updated on Wednesday, 02 March 2011 09:51 |


