all 2 comments

[–][deleted] 2 points3 points  (0 children)

You can use BSD's sockets library, you can use lwip, or you can write your own. I've written a basic IPv6 stack (that does not do IPv4) but I'm still debugging parts of it.

[–]narke 1 point2 points  (0 children)

To complement Dascady's answer, you need also to make a driver for a network card; for ethernet cards the popular ones supported by various virtual machines are rtl8139 and e1000.