So, you’ve installed a new server with Server 2008 R2 Core – what next? Logging on, you’re presented with a shiny command prompt, you can run notepad or regedit…but aside from that, where do you go from there? In the next few series of posts I’ll hopefully point out the basics, and some not so basics!
The server configuration tool (sconfig.cmd) is provided in R2 for some of the basic setup tasks, so you can run that by issuing the “sconfig” command. Out of the box, it looks something like this:
As you can see, this interactive tool will step you through configuring the network settings (Option 8), Computer Name (Option 2) or Domain/Workgroup (Option 1).
Enter number to select an option: 8
Network settings
Available Network Adapters
Index# IP address Description
0 192.168.8.117 Intel(R) PRO/1000 MT Network Connection
Select Network Adapter Index# (Blank=Cancel): 0
Network Adapter Settings
NIC Index 0 Description Intel(R) PRO/1000 MT Network Connection IP Address 192.168.8.117 Subnet Mask 255.255.255.0 DHCP enabled True Default Gateway 192.168.8.1 Preferred DNS Server 192.168.8.5 Alternate DNS Server 192.168.8.22
- Set Network Adapter IP Address
- Set DNS Servers
- Clear DNS Server Settings
- Return to Main Menu
Select option: 1
Select (D)HCP, (S)tatic IP (Blank=Cancel): S Set Static IP Enter static IP address: 192.168.8.220 Enter subnet mask (Blank = Default 255.255.255.0): Enter default gateway: 192.168.8.1 Setting NIC to static IP…
Network Adapter Settings
NIC Index 0 Description Intel(R) PRO/1000 MT Network Connection IP Address 192.168.8.220 Subnet Mask 255.255.255.0 DHCP enabled False Default Gateway 192.168.8.1 Preferred DNS Server Alternate DNS Server
- Set Network Adapter IP Address
- Set DNS Servers
- Clear DNS Server Settings
- Return to Main Menu
Select option: 2 DNS Servers
Enter new preferred DNS server (Blank=Cancel): 192.168.8.22 Enter alternate DNS server (Blank = none): 192.168.8.5 Alternate DNS server set.
Network Adapter Settings
NIC Index 0 Description Intel(R) PRO/1000 MT Network Connection IP Address 192.168.8.220 Subnet Mask 255.255.255.0 DHCP enabled False Default Gateway 192.168.8.1 Preferred DNS Server 192.168.8.22 Alternate DNS Server 192.168.8.5
- Set Network Adapter IP Address
- Set DNS Servers
- Clear DNS Server Settings
- Return to Main Menu
Select option: 4
Enter number to select an option: 2Computer Name
Enter new computer name (Blank=Cancel): SERVERCORE2008 Changing Computer name…
Enter number to select an option: 1Change Domain/Workgroup Membership
Join (D)omain or (W)orkgroup? (Blank=Cancel) D
Join Domain Name of domain to join: MCGEOWN.LOCAL Specify an authorized domain\user: MCGEOWN\sam.mcgeown
Joining MCGEOWN.LOCAL…
Enter the password of the authorized user:
There’s also a manual method (e.g. for a scripted installation and config) using Netsh and Netdom commands that most Windows admins will be familiar with.
List the interfaces (network adaptors):
netsh interface ipv4 show interfaces
Identify the name of the interface you want to assign an IP for and configure:
netsh interface ipv4 set address name="<Interface Name>" source=static address=<IP Address> mask=<Subnet Mask> gateway=<Gateway>
Configure DNS servers:
netsh interface ipv4 add dnsservers "<Interface Name>" <DNS Server IP> index=<number>
If you want to add more than one IP address for your server, try:
netsh interface ipv4 add address name="<Interface Name>" address=<Additional IP> mask=<Subnet Mask>
To change your computer’s name, you can use (leave off the /reboot if you don’t want to yet):
netdom renamecomputer /newname:<New Name> /reboot
To join your computer to a domain, you can use (leave off the /reboot if you don’t want to yet):
netdom /join /domain:<domain> /UserO:<domain\user to join with> /PasswordO:<Password> /reboot
At the end of all that, you can see that configuring basic network settings with sconfig.cmd is pretty straight forward, and configuring basic network settings for scripts, or a more command-line based admin, is also quite do-able.
C:\Users\Administrator>ipconfig /allWindows IP Configuration
Host Name . . . . . . . . . . . . : ServerCore2008 Primary Dns Suffix . . . . . . . : MCGEOWN.LOCAL Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : MCGEOWN.LOCAL
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection Physical Address. . . . . . . . . : 00-50-56-AB-28-8B DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::3c4d:cdd1:5a4a:fbff%3(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.8.220(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 IPv4 Address. . . . . . . . . . . : 192.168.8.221(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 IPv4 Address. . . . . . . . . . . : 192.168.8.222(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 IPv4 Address. . . . . . . . . . . : 192.168.8.223(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.8.1 DHCPv6 IAID . . . . . . . . . . . : 50352214 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-13-3B-B4-6C-00-50-56-AB-28-8B
DNS Servers . . . . . . . . . . . : 192.168.8.5 192.168.8.22 NetBIOS over Tcpip. . . . . . . . : Enabled
C:\Users\Administrator>
Netsh command reference | Netdom command reference