Network and Sharing Center
Network and Sharing Center
As shown in Figure 5.3, the Network and Sharing Center provides real-time status information about your network. You can see if your computer is con- nected to your network or the Internet, the type of connection, and what level of access you have to other computers and devices on the network. This infor- mation can be useful when you set up your network or if you have connection problems. You can find more detailed information about your network in the network map, which is accessible from the Network and Sharing Center. You can access the Network and Sharing Center from the Control Panel or from the Notification Area. You can also use the Network and Sharing Center to set up a wireless or VPN connection; create and manage homegroups; and manage a system’s sharing options.
FIGURE 5.3 The Network and Sharing Center.
Using the netsh Command
Netsh.exe is a tool an administrator can use to configure and monitor various networking parameters using the command prompt, including
. Configuring IP addresses, default gateway, and DNS servers . Configuring interfaces . Configuring routing protocols
Introduction to TCP/IP
. Configuring filters . Configuring routes . Configuring remote access behavior for Windows-based remote access
servers that are running the Routing and Remote Access Server (RRAS) Service
. Displaying the configuration of a currently running router . Using the scripting feature to run a collection of commands in batch
mode against a specified router To display the available options for the netsh command, you enter the fol-
lowing at the command line:
netsh /?
To view your interfaces, execute the following command:
netsh interface ipv4 show interfaces
When you view the output of the netsh command, you need to note the names of the interfaces for your network adapter.
To set a static IP address and default gateway, you use the following command: netsh interface ipv4 set address name “ interface name” source=static
address= preferred IP address mask=SubnetMask gateway=gateway address
If you are using and configuring IPv6, you specify ipv6 instead of ipv4 . If the interface name includes spaces, you need to surround the name with quotes (“”). If you don’t want to assign a gateway, you specify gateway=none .
To set the static DNS address, use the following command:
netsh interface ipv4 add dnsserver name=” interface name” address=IP address of the primary DNS server index=1
For each DNS server that you want to set, increment the index= number each time. Therefore, for the first DNS server, index would be 1. For the sec- ond DNS server, index would be 2.
To change a server to the DHCP-provided IP address from a static IP address, use the following command:
netsh interface ipv4 set address name =”interface name” source=DHCP
Introduction to TCP/IP
For more information about using the netsh command, use the following websites:
http://technet.microsoft.com/en-us/library/cc754516(WS.10).aspx http://technet.microsoft.com/en-us/library/cc770948(WS.10).aspx
Cram Quiz
1. What are the two services that provide name resolution? (Choose two answers.)
❍ A. DNS ❍ B. DHCP ❍ C. WINS ❍ D. NAT
2. What command do you use to view your IPv4 interfaces on a computer running Windows 7?
❍ A. netsh interface ipv4 show interfaces ❍ B. netsh interface ipv4 set address name all ❍ C. netsh interface ipv4 add interface ❍ D. netsh interface ipv4 set address name source=DHCP
3. What IPv6 address is used to communicate with neighboring hosts on the same link?
❍ A. Global unicast ❍ B. Link-local ❍ C. Unique local unicast ❍ D. Multicast
Introduction to TCP/IP
Cram Quiz Answers
1. A and C are correct. DNS is short for Domain Name System and WINS is short for Windows Internet Name Service. DNS translates from host names/domain names to IP addresses and WINS translates from NetBIOS names/computer names. Answer B is incorrect because DHCP (short for Dynamic Host Configuration Protocol) is used to assign IP addresses automatically. Answer D is incorrect because NAT, short for Network Address Translation, is used to con- nect a private network through a single public address.
2. A is correct. To view your interfaces, execute the following command: netsh
interface ipv4 show interfaces . Answers B, C, and D are incorrect because the set option and add option are used to modify or add an address, not view an address.
3. B is correct. A link-local address is used by hosts when communicating with neighboring hosts on the same link. Answer A is incorrect because the global unicast addresses are equivalent to IPv4 public addresses, so they are globally routable and reachable on the IPv6 portion of the Internet. Answer C is incorrect because the unique local unicast addresses are equivalent to IPv4 private address spaces. Answer D is incorrect because a multicast address is used for one-to-many communications between computers.
CHAPTER 5: Configuring Windows Networking