How to set the IP address, subnet mask, default gateway, and DNS in Server Core

Home > Search > How-to
  by

Using sconfig

  1. Type sconfig and press enter to open Server Configuration
  2. Type 8 (Network Settings) and press enter
  3. Type the number in the Index# column for the network interface you want to configure and press enter
  4. Type 1 (Set Network Adapter Address) and press enter
  5. Type s (static) and press enter
  6. Type the IP address and press enter
  7. Type the subnet mask and press enter
  8. Type the default gateway and press enter
  9. Type 2 (Set DNS Servers) and press enter
  10. Type the address for the preferred DNS server and press enter (example: 8.8.8.8). A pop-up box with message "Preferred DNS server set" appears. Select OK.
  11. Type the address for the alternate DNS server and press enter (example: 8.8.4.4). A pop-up box with message "Alternate DNS server set" appears. Select OK.
  12. Type 4 (Return to Main Menu) and press enter
  13. Type 15 (Exit to Command Line) and press enter

 


Using netsh

  • Replace name with the name of the interface
  • Replace x.x.x.x with the IPv4 address
  • Replace y.y.y.y with the subnet mask
  • Replace z.z.z.z with the default gateway
  • Replace w.w.w.w with the IP address of the primary DNS server
  • Replace v.v.v.v with the IP address of the secondary DNS server
netsh interface ipv4 set address “name” static x.x.x.x y.y.y.y z.z.z.z. 
netsh interface ipv4 add dnsserver “name” address=w.w.w.w index=1 
netsh interface ipv4 add dnsserver “name” address=v.v.v.v index=2 

 


Type ipconfig /all  to verify the IP address, subnet mask, default gateway, and DNS servers have been set

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments