To check that your Mac is set up to obtain and IP address automatically:
- Click on the Apple icon (top left of your desktop) to open the Apple menu.

- Select System Preferences.
- In the System Preferences window, click on Network.

- Make sure that Ethernet is highlighted in the pane on the left of the screen, and that Automatic is selected in the Location drop-down list.

- Click on Advanced to display the Advanced screen, then select the TCP/IP tab.
- Make sure that Using DHCP is ticked in the Configure IPv4 drop-down list.

- Click on OK to close the window, and then click on Apply to close the Network window.
That's it. Your Mac is set up to obtain an IP address automatically.