Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I read the man page of ip and still do not understand what src is and I could not find much documentation.

Please, if you can explain it thoroughly or point to some link it a good answer.

share|improve this question

1 Answer 1

up vote 1 down vote accepted
   src ADDRESS
          the source address to prefer when sending to the destinations covered by the route prefix.

Nowadays, especially with IPv6, it is often possible to have multiple IP addresses on a single interface. That means that a route such as

ip route add 192.168.0.0/24 dev eth0

does not uniquely determine the source IP of the packages anymore (as it had been the case if eth0 only had one IP address). Therefore, it is possible to specify a specific source address using the src statement. The Linux kernel usually uses the newest address.

This is especially useful if you want to use IPv6 with privacy extensions. The kernel would then normally use the latest temporary address. However, you can make it use a specific permanent address when accessing a particular (for example, local) network using the src statement.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.