OS/2 eZine - http://www.os2ezine.com
Spacer
February 16, 2003
 
Bas Heijermans has been using computers for 24 years - since he was 12. Bas lives in Belgium and has used OS/2 since version 1.1. He ran The OS/2 BBS and was the Belgium OS/2 Fido moderator. IBM awarded him Official OS/2 Ambassidor in 1992 for his support efforts. Today he repairs computers for a living.

If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums.

There is also a Printer Friendly version of this page.

Spacer
Previous Article
Home
Next Article


SciTech SNAP Graphics for OS/2 and Linux


OS/2 is Boring Part 7

Many people today have Cable or ADSL, a lot of you are sharing the network too. It's fairly easy to use some sort of NAT and private IP's to share your connection. But when you change computers in the network all the time, it can be a big pain in the butt :-) as you need to remember the connections all the time, and it is not funny to change the settings for every network you enter. So I will explain how to make your network Plug-and-play for Internet, as we all know, PnP should be easy right? :-)

Ok here we go. You need the following stuff:

  • OS/2 2.xx with MPTS and TCP/IP running.
  • A network card (what would you do without it?)
  • A working connection to the Internet.

Let's assume your network is in the 10.0.0.x range and you have as subnet 255 255.255.0 as for most LAN's 256 IP's in the local network will be enough and we won't have too much network overhead. Our OS/2 machine has the following local address: 10.0.0.10.

We start by going to the c:\mptn\etc directory to edit the hosts file for the number of IP's we want to use and edit it to something like this:

127.0.0.1 localhost
10.0.0.10 borg www ftp mail
10.0.0.138 speedtouch
10.0.0.150 150
10.0.0.151 151
10.0.0.152 152
10.0.0.153 153
10.0.0.154 154
10.0.0.155 155
10.0.0.156 156
10.0.0.157 157
10.0.0.158 158
10.0.0.159 159
10.0.0.160 160
10.0.0.161 161

This will make sure that the computers we connect can be resolved by name as well. Then we edit the resolv2 file to look something like this:

domain heppen.be
nameserver 10.0.0.10
nameserver 195.144.67.168
nameserver 195.144.67.8

Change the last 2 IP's to the DNS servers of your ISP. As you can see, the OS/2 server machine will be used for DNS first, if it fails the lookup will be done directly to the provider.

Now we are ready to install the DNS cache server and DCHP-server. Just put the config files in the c:\mptn\etc directory, the exe files in the c:\mptn\bin and the DLL's in the c:\mptn\dll directory. (Be carefull not to overwrite any of the OS/2 files if you have e.g. DHCP from OS/2 installed.)

Now edit the DHCPSD.CFG file like this:

numLogFiles 1
logFileSize 50
logFileName D:\DHCPserver\dhcpsd.log
leaseTimeDefault 3 days
leaseExpireInterval 4 hours
supportBOOTP yes
supportUnlistedClients yes
logItem SYSERR
logItem OBJERR
logItem PROTERR
logItem WARNING
logItem EVENT
logItem ACTION
logItem INFO
logItem ACNTING
logItem TRACE
#.indent 12
# updateDNS "nsupdate -f -r%s -s"d;ptr;*;a;ptr;%s;s;%s;0;q""
network 10.0.0.0 10.0.0.150-10.0.0.161 #.name Heppen
{
#.ddns 10.10.0.1
}
option 1 255.255.255.0 #.name 1 Subnet Mask
option 3 10.0.0.10 #.name 3 Router
option 6 10.0.0.10 #.name 6 Domain Name Server
option 15 heppen.be #.name 15 Domain Name
option 42 10.0.0.10 #.name 42 Network Time Protocol Servers

As you can see, the range of my internal network goes from 10.0.0.150 to 10.0.0.161. IP-address are assigned to be automaticly assigned within this range. Also the nameserver will be assigned to the OS/2 machine. And last, edit the named.cfg:

#
# local network address
#
auth_network        10.0.0.0
#
# mask for local addresses
#
auth_netmask        255.255.255.0
#
# local domain name
#
auth_domain         heppen.be
#
# interface that must be up if name requests are to be referred on
#
refer_interface     lan0
#
# name server addresses for ISP 1
# (if address associated with sl0 is 192.168.33.x, where x is anything,
# use nameserver 192.168.33.47
#
refer_servers       10.0.0.10 255.255.255.0 195.144.67.168 195.144.67.8
#
# name server addresses for ISP 2
# (if address associated with sl0 is 192.168.32.11 (static address),
# use nameserver 192.168.32.7, then 192.168.32.3
#
# refer_servers       192.168.32.11 255.255.255.255 192.168.32.7 192.168.32.3

The refer_interface must be the lan adapter that is used for your local network. For this file, it's easy, just alter the last 2 IP's to the ones from your ISP's DNS servers and you are set. For the domainname, you can use anything you like. After you make this configuration, you only need to start the Named.exe and the Dhcpsd.exe from the startup.cmd and reboot the machine.

Set all clients to Automatic (for Windows) or DHCP client for others, then reboot the machines and they will get everything they need for TCP/IP to let you surf the internet without any configuration. On my local network I use TCP/IP for Internet traffic and Native NetBIOS for local networking, not only is this the fastest setup but it saves a lot of config trouble making the network secure as native NetBIOS can't be routed, so it won't be public on the net. :-)

With this setup you only need to plug a machine in the network and you have instant Internet Access, nice, quick and dirty. I have found, however, that some Unix boxes like Solaris and Irix don't like this setup, but no problem, just give them a static IP and say the DNS is 10.0.0.10, then it works just fine.

You can download these servers from here.

That's it from me this time, have fun installing.

Previous Article
Home
Next Article

Copyright (C) 2003. All Rights Reserved.