1. What is the purpose of netstat?. What is the purpose of the -a switch?

" How many connections are listed?
" How many rely on TCP?
" How many rely on UDP?

Check google LOL, all that is explained, for the purpose of netstat and the -a switch just look for manual page netsat, or man netstat if you are running on Unix.