There are a number of ways. In your question I don't think the vm part is relevant. (could be though)
See this post for two ways that may work.
http://serverfault.com/questions/611...-network-cards
It may or may not be what you are asking about.
Not sure there is a great reason to do what you want other than to test real setup or learn. In a normal vm setup there are other ways to get this to work.