Honestly, I am not sure, but I can give it a try and give you
some few tryouts :)
1. If you are talking about setting static ip, you'll have to write
the dns gateway adress to find it write "ipconfig /all" in cmd.
2. You should also try go to "Network Connections" then click
"Create a new connection" then click "Next" then click "Set up
an advanced connection" then click "CONNECT DIRECTLY
TO ANOTHER COMPUTER" then I would think you're a guest,
since your friend is getting the information from an router, but
you could try either host or guest.
Please tell me if it works :)