Introduction
Laymen explanation
Technical explanation
How to configure
If you have physical interface eth0, you can create sub-interface eth0:0
#ifconfig eth0:0 192.168.1.6 up
Use-cases
To run multiple apache servers. For example if you have 100 alias for same interface- eth0:0 – eth0:100 we can assign 100 ips to it. If apache configured on this server, We can use this Ips to mimic as 100 apache servers.
To collect more informative stats. If multiple Apache servers are running on same interface (using multiple IPs) , then stats will include same interface name. Instead, if we use sub-interface, then we will have 1-1 mapping between interface and server. It may look trivial, but it will help analysis of logs a lot.
Reference