Applies ToWindows 11 Windows 10 Windows 8.1 Windows 7

TCP/IP defines how your PC communicates with other PCs.

To make it easier to manage TCP/IP settings, we recommend using automated Dynamic Host Configuration Protocol (DHCP). DHCP automatically assigns Internet Protocol (IP) addresses to the computers on your network if your network supports it. If you use DHCP, then you don't have to change your TCP/IP settings if you move your PC to another location, and DHCP doesn't require you to manually configure TCP/IP settings, such as Domain Name System (DNS) and Windows Internet Name Service (WINS).

To enable DHCP or change other TCP/IP settings

  1. Select Start, then type settings. Select Settings > Network & internet.

  2. Do one of the following:

    • For a Wi-Fi network, select Wi-Fi > Manage known networks. Choose the network for which you want to change the settings.

    • For an Ethernet network, select Ethernet, then select the Ethernet network you’re connected to.

  3. Next to IP assignment, select Edit.

  4. Under Edit network IP settings or Edit IP settings, select Automatic (DHCP) or Manual.

    • To specify IPv4 settings manually

      1. Under Edit network IP settings or Edit IP settings, choose Manual, then turn on IPv4.

      2. To specify an IP address, in the IP address, Subnet mask, and Gateway boxes, type the IP address settings.

      3. To specify a DNS server address, in the Preferred DNS and Alternate DNS boxes, type the addresses of the primary and secondary DNS servers.

      4. To specify if you want to use an encrypted (DNS over HTTPS) or unencrypted connection to the DNS server or servers you specify, for DNS over HTTPS, choose the setting you want:

        • Off: All DNS queries will be sent to the DNS server unencrypted in plaintext over HTTP.

        • On (automatic template): DNS queries will be encrypted and sent to the DNS server over HTTPS. DNS queries will use the default settings for the automatic template or try to discover them automatically.

        • On (manual template): DNS queries will be encrypted and sent to the DNS server over HTTPS. They’ll use the settings you enter in the DNS over HTTPS template box.

      5. If you use DNS over HTTPS (automatic or manual template), turn Fallback to plaintext on or off:

        • When it’s turned on, a DNS query will be sent unencrypted if it can’t be sent over HTTPS.

        • When it’s turned off, a DNS query won’t be sent if it can’t be sent over HTTPS.

    • To specify IPv6 settings manually

      1. Under Edit network IP settings or Edit IP settings, choose Manual, then turn on IPv6.

      2. To specify an IP address, in the IP address, Subnet prefix length, and Gateway boxes, type the IP address settings.

      3. To specify a DNS server address, in the Preferred DNS and Alternate DNS boxes, type the addresses of the primary and secondary DNS servers.

      4. To specify if you want to use an encrypted (DNS over HTTPS) or unencrypted connection to the DNS server or servers you specify, for DNS over HTTPS, choose the setting you want:

        • Off: All DNS queries will be sent to the DNS server unencrypted in plaintext over HTTP.

        • On (automatic template): DNS queries will be encrypted and sent to the DNS server over HTTPS. DNS queries will use the default settings for the automatic template or try to discover them automatically.

        • On (manual template): DNS queries will be encrypted and sent to the DNS server over HTTPS. They’ll use the settings you enter in the DNS over HTTPS template box.

      5. If you use DNS over HTTPS (automatic or manual template), turn Fallback to plaintext on or off:

        • When it’s turned on, a DNS query will be sent unencrypted if it can’t be sent over HTTPS.

        • When it’s turned off, a DNS query won’t be sent if it can’t be sent over HTTPS.

    • When you select Automatic (DHCP), the IP address settings and DNS server address setting are set automatically by your router or other access point (recommended).

    • When you select Manual, you can manually set your IP address settings and DNS server address.

  5. When you’re done, select Save.

To install IPv4, run Command Prompt as an administrator, type netsh interface ipv4 install, and then press Enter.

To enable DHCP or change other TCP/IP settings

  1. Select Start , then select Settings  > Network & Internet .

  2. Do one of the following:

    • For a Wi-Fi network, select Wi-Fi  > Manage known networks. Choose the network you want to change the settings for, then select Properties.

    • For an Ethernet network, select Ethernet, then select the Ethernet network you’re connected to.

  3. Under IP assignment, select Edit.

  4. Under Edit IP settings, select Automatic (DHCP) or Manual.

    1. To specify IPv4 settings manually

      1. Under Edit IP settings, choose Manual, then turn on IPv4.

      2. To specify an IP address, in the IP address, Subnet prefix length, and Gateway boxes, type the IP address settings.

      3. To specify a DNS server address, in the Preferred DNS and Alternate DNS boxes, type the addresses of the primary and secondary DNS servers.

    2. To specify IPv6 settings manually

      1. Under Edit IP settings, choose Manual, then turn on IPv6.

      2. To specify an IP address, in the IP address, Subnet prefix length, and Gateway boxes, type the IP address settings.

      3. To specify a DNS server address, in the Preferred DNS and Alternate DNS boxes, type the addresses of the primary and secondary DNS servers.

    • When you select Automatic (DHCP), the IP address settings and DNS server address setting are set automatically by your router or other access point (recommended).

    • When you select Manual, you can manually set your IP address settings and DNS server address.

  5. When you’re done, select Save.

To install IPv4, run Command Prompt as an administrator, type netsh interface ipv4 install, and then press Enter.

To enable DHCP or change other TCP/IP settings

  1. Do one of the following:

    • In Windows 8.1, select the Start button, start typing View network connections, and then select View network connections in the list.

    • In Windows 7, open Network Connections by selecting the Start button, and then selecting Control Panel. In the search box, type adapter, and then, under Network and Sharing Center, select View network connections.

  2. Right-click the connection that you want to change, and then select Properties. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

  3. Select the Networking tab. Under This connection uses the following items, select either Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6), and then select Properties.

  4. To specify IPv4 IP address settings, do one of the following:

    • To get IP settings automatically using DHCP, select Obtain an IP address automatically, and then select OK.

    • To specify an IP address, select Use the following IP address, and then, in the IP address, Subnet mask, and Default gateway boxes, type the IP address settings.

  5. To specify IPv6 IP address settings, do one of the following:

    • To get IP settings automatically using DHCP, select Obtain an IPv6 address automatically, and then select OK.

    • To specify an IP address, select Use the following IPv6 address, and then, in the IPv6 address, Subnet prefix length, and Default gateway boxes, type the IP address settings.

  6. To specify DNS server address settings, do one of the following:

    • To get a DNS server address automatically using DHCP, select Obtain DNS server address automatically, and then select OK.

    • To specify a DNS server address, select Use the following DNS server addresses, and then, in the Preferred DNS server and Alternate DNS server boxes, type the addresses of the primary and secondary DNS servers.

  7. To change advanced DNS, WINS, and IP settings, select Advanced.

To install IPv4, run Command Prompt as an administrator, type netsh interface ipv4 install, and then press Enter.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Find solutions to common problems or get help from a support agent.