Microsoft gives Windows NT greater capability to assign network addresses
Peter Wayner
Laptop computers make it simple to carry almost all your desktop environment with you. Everything except your network connectivity, that is. If you carry a laptop to a meeting or another office and then plug it in there, you may or may not get what you wanted because the file servers and other connections might not be available on that subnet. More important, mail and other messages might not be able to find you because your computer is now in a different branch of the network. This problem is growing larger as more and more people turn to standards like the IP (Internet Protocol), which can handle large networks but requires continual upkeep to adapt to new configurations.
Microsoft recently announc
ed plans for creating a new set of protocols that would add much of the flexibility of small office LANs to the IP so that companies can grow and evolve their networks quickly and easily. Microsoft will offer two open standards to the Internet community. One, DHCP (Dynamic Host Configuration Protocol), lets computers set up their network addresses on their own without stepping on toes. The other, WINS (Windows-Internet Naming Service), allows computers to publish their names to the world. The combination of these two protocols will allow ordinary machines to automatically establish themselves as clients on an Internet-capable network with much the same ease that they do in systems like AppleTalk.
This approach is necessary because Microsoft decided to adopt the IP when it became apparent that this standard would dominate the worldwide Infobahn. The standard is robust and flexible in part because it was designed by DoD (Department of Defense) researchers seeking to find a way to create a fault-tolerant
network to link U.S. armed forces in the midst of battle. For this reason, the network can route packets between nodes even when the links are dropping in and out of service.
This high-speed flexibility is only possible when machines keep the same network addresses and stay in the same location. If you pick up your laptop and walk to another building with a different local network environment, the network administrator must reconfigure the network so that your packets can follow you. This may take only a few keystrokes, but even these finger taps can be prohibitive if hundreds of users are always renotifying the network administrator when they get up and move.
Many low-end LANs have this flexibility as a side-effect of their simple design that links all computers with one shared pair of wires. This means that a packet sent from one machine to another will reach all machines in the network. If you move your machine to a different connection, then it will still receive all the messages and pick ou
t the ones intended for it. But this approach quickly breaks down as more users crowd the cable. Once a router is installed to break up the network, techniques like the DHCP and WINS become necessary.
DHCP
The first new layer in the system is the DHCP, which runs on a router or centralized machine. This DHCP server maintains a collection of addresses and assigns them to users. When a new machine signs on, DHCP gives it an available address if it has one.
A DHCP server maintains order on the network by enforcing a time limit on the addresses. When a computer requests an IP address, it doesn't get to own that address; it only receives a ``lease'' with a set expiration date. When the lease is half over, the computer is responsible for renegotiating its lease with the DHCP server. In almost all cases, the lease will be renewed. The protocol is designed so that a laptop's lease on an IP address will simply expire if that laptop isn't around to ask for it again. Then it can be reassigned later.
The lengths of the leases is automatically determined by the DHCP server using parameters established by the network administrator. If a network supports plenty of laptop computers that are disconnected and reconnected frequently, then the administrator will choose a short lease that only lasts several hours. This ensures that unused IP addresses will be freed up as soon as possible. But if a network includes many stable desktop machines that rarely migrate, then the administrator will probably allow leases that last several months.
The administrator will also choose a lease length by examining the number of users and the number of available IP addresses. If the network is crowded, then the administrator needs to choose a shorter expiration time to keep the few extra addresses available. Less saturated subnets that might have 30 to 40 machines and 254 available IP addresses can extend much longer leases. Ambitious administrators might want to study queuing theory, which will give them a basic es
timate of the right length of time for the leases.
Failure Mode
Microsoft is also recommending that the minimum length of a lease be set to be twice the maximum amount of time that a DHCP server might be down. So if the network staff always takes the full weekend off, then you should choose a minimum lease length of four days. In the worst possible case, a server will crash at the beginning of the weekend just before a machine starts to ask for a renewal. If you've set the leases to be twice the maximum expected downtime, then the machine will still have two days to go before the lease expires.
If a DHCP server is still down after 87.5 percent of the length of a lease, a client goes into a ``panic'' mode and searches everywhere for a new IP address. If there is another DHCP server available, then it will offer a new IP address and the computer will switch over. This can be disastrous if it happens while your machine is expecting data at the old address. An FTP connection, for instance, wou
ld be broken. But it won't make a difference if you're not using the network at that moment.
Microsoft suggests leaving two DHCP servers on a network so that one can solve problems if the other is down. The DHCP software was designed to live with any of the ambiguities caused by having two or more servers trying to supervise a network. For instance, the client gets to choose addresses if several servers respond to a request for an IP address.
There are limitations to the software. At this time, there is no way for two DHCP servers to coordinate their use of a shared address space. That means if there are 200 available IP addresses for a network governed by two DHCP servers, then the administrator must split them up between the two. If one machine fails, then the other will only be able to dispense leases for the IP addresses that it holds. The lack of coordinating mechanisms prevents it from completely assuming the duties of the other. Microsoft says it is developing a future version of DHCP tha
t will allow communication between the DHCP servers.
Deep Structure
The structure of the DHCP request is built to be ``nearly identical'' to the BOOTP format used by companies like Sun Microsystems to allow machines to start up from a remote disk. Keeping the same basic format makes it easier for software authors to upgrade their software. BOOTP routers will correctly route DHCP addresses with little modification. Several of the reserved bits were converted into flags and also several fields were used for different purposes.
The flags were created out of 16 unused bytes in the BOOTP message format. One bit specifies whether a new computer is able to receive messages before the address is formally allocated. Some of the additional fields allow a machine to request a particular IP address if it is available. Another contains the address of any gateway that is relaying the packet into another subnet.
The main difference is built into the intelligence of the servers. The BOOTP server ne
eds to be programmed with the network address codes of all machines asking for IP addresses. The DHCP server adapts itself to requests.
Other Solutions
The DHCP approach seems simple, but it is still an improvement over previous attempts. For instance, the MacTCP extension to the Macintosh system can dynamically set its own IP address when the Macintosh starts up. But many network administrators have found that MacTCP's approach often yields problems in networks with several different types of machines.
The MacTCP software randomly chooses an IP address from a small predetermined set and then broadcasts a message asking if there is anyone out there with this address. This approach works fine if the network is only used by other MacTCP users who leave their machines turned on to this random setting. Many users quickly discovered problems when their Macintoshes shared the network with workstations or other machines that thought they had a fixed address carved in stone. A freshly turned on Ma
cintosh would often steal the address of one of these systems when it was off. When both were on, they would start using the same address and get their data mixed. This problem occurred frequently in places where users turned off their machines at night.
This weakness arises because the MacTCP is not relying on a central server. This may be an advantage if a company does not want to invest the extra money and resources, but it also causes its share of problems. Imagine you wanted to fix one particular address to one machine. If you wanted to do it with the decentralized MacTCP, you would need to go from machine to machine to remove this address from its list of available choices. A centralized DHCP server is the only stop necessary in a server-based system.
WINS of Change
The next layer of Microsoft's addition to its network environment, WINS, allows computers to look up other computers by name instead of Internet address. If a machine moves, then it can still carry the same name with it i
f the WINS system tracks the move and changes the listing information. Naturally, this system must work closely with the DHCP server so that machines do not get lost as they roam from subnet to subnet.
After a client receives an IP address from the DHCP server, it sends a copy of this address and its chosen name to the WINS server asking for a listing. If all goes well, the WINS server responds affirmatively and sends along a time limit for the listing. The WINS listing must also be renewed like the DHCP lease.
The process may fail if there is another machine that has already reserved the name and IP address binding. At this point, the WINS server challenges the first computer to reserve that name to prove that it is the rightful user of the name. If that first user responds, then the server makes a simple choice to go with the first. There is no authentication or password system built into the current version of the system. Microsoft hopes to add a layer to do this in the future.
A fair
amount of fault tolerance and flexibility is also built into the WINS protocol. If there are multiple WINS servers on a network, then they will coordinate their listings of names and swap new names. This broadcasts a name to the local WINS servers so someone can look up a distant name without sending packets throughout the Internet. It also provides some fault tolerance so that names to IP conversion will still be available even if one machine goes down.
The network administrator can set the amount of time between these swaps according to the load on the network. If the two WINS servers are on different continents joined by a low-speed, expensive link, then the coordination can be done once a day. If the servers are joined by an unsaturated local network, then they can constantly keep each other informed about new users.
Bringing You the World
Unfortunately, WINS is still a local solution to providing a name space. If someone from outside your company tries to call up and get the IP addres
s of your computer, they won't be able to do it. This is important to do if someone tries to finger, ftp, or use a talk program with your local machine.
For instance, right now someone can type talk pcw@access.digex.com and the network routing software would decode this to get the net address of the machine access.digex.com before trying to initiate a talk command. This is because access.digex.com is published in the Internet's name tables. It's like getting the phone number of the person you're trying to reach, not the phone number of the receptionist.
But if I started running WINS and I registered my local name ``epinonymous'' with the WINS server, my IP address would not be available to anyone from the rest of the world. They would still need to send me mail through the gateway.
This is largely the fault of the Internet for using static tables with fixed addresses. If you want to publish a name and IP address to the world, then you need to ask DHCP to always give you a fixed address. M
icrosoft anticipated this problem and added this feature even though widespread use of it would largely destroy the dynamic nature of DHCP.
Microsoft is actively pursuing getting the wider Internet to accept dynamic naming tables. In the future, it hopes that others will adopt a dynamic standard that will work with DHCP. The company is approaching the IETF (Internet Engineering Task Force) at this time, and it hopes to move toward a dynamically bound DNS (Domain Name Service) standard in the future.
As this proposal advances, you will probably see an expansion of the capabilities of WINS. At this time, it accepts NetBIOS names and addresses. The architecture is not limited to this complicated structure, and the IETF plans to expand the name space to include Internet names as well as any other naming conventions that emerge in the future.
For Big Networks
The DHCP/WINS combination is an excellent way to solve the irritating problem of introducing users to a network. The current syste
ms that handle wide-array systems like TCP/IP require too much work by an administrator. The smaller network protocols like NetBEUI, IPX, or AppleTalk will not easily scale to large networks. Microsoft built this system to handle 250,000 people moving their laptops around from office to office without dealing with the local network administrator.
Smaller network users will probably not feel the need to adopt such a protocol. The low-end systems already offer all this flexibility as a side-effect. This may change with time, though, because the worldwide expansion of the Internet is rapidly making purely local networks an anachronism. Everyone will want to plug into this network and get their own IP addresses, even when there are only a few machines on the local network.
Microsoft's push to make the IP part of the foundation for Windows NT ensures that the Internet connectivity may be an attractive side-effect. Sure, in a small office you've got only a few users and the network administration chor
es are so small that you don't need the flexibility of DHCP. But, if it provides an easy way to create a gateway to the Internet, then the operating system may be more desirable.
The adoption of this system may give Microsoft a better competitive position against workstation manufacturers like Sun and Hewlett-Packard. The operating systems on these machines were built around TCP/IP long ago and the applications running on the system embraced the standard from the beginning. If Microsoft wants to push NT into the traditional domain of workstations, then it needs to talk the local language. It's made the commitment to this and now DHCP and WINS will give it a more flexible environment.
Illustration: The DHCP Message Format
The DHCP initialization data structure is designed with the same format as the popular BOOTP format. This lets it interoperate with old BOOTP systems.
Illustration: When a DHCP Server Goes Off-Line
In this hypothetical example, a DHCP server in the engi
neering department is off-line. You power up the desktop labeled \\ENGR_NT1, and the BOOTP relay router relays a DHCPREQUEST message to the DHCP server (\\RSDV_AS) at address 200.192.100-3 in the R&D department. Because the scope of the R&D subnet is different, the \\RSDV_AS server gives it a new IP address at 200.192.0.129.
Peter Wayner is a BYTE consulting editor based in Baltimore, Maryland. You can reach him on the Internet at
pcw@access.digex.com
or on BIX as ``pwayner.''