Office wifi not connected to internet while running OSX server
I am running OSX server 4.1 on my macbook running 10.10.5 yosemite. When my xcode server is running I am not able to connect to wifi. If I shutdown my server I am able to connect to the office wifi and able to access internet. If I connect to wifi and then switch on the server now my ip changes to self assigned ip and am not able to access the internet. How do I resolve this issue.
Thanks in advance.