Problem solve Get help with specific problems with your technologies, process and projects.

The Lazy Coder: Find your iSeries using a DNS or name server

Andrew Borts shows you how to use serving names to enable people to get to your servers on the Internet or inside your office.

Last month we gave our iSeries-AS/400 system a private IP address so we could do more things with TCP/IP, such as possibly Web serving. Now lets look at how people can get to get your servers on the Internet or inside your office. With name serving, it's easy as pie.

Here's what we're trying to do:

Configure a name server that will associate names of your iSeries systems so you don't keep CALLING them dot 1 and dot 2 (as in 192.168.1.1 and 192.168.1.2 -- the USERS get a little bored with numbers), then configure your PCs to point to that name server. After that, BAM you've kicked up your management up a notch.

Client Access doesn't really care if you point to your iSeries as an IP address -- or as a name -- as long as the results are pointing to your iSeries. So if EVERYONE in the company is pointing to LOCAL.EXAMPLE.COM, you don't really need to worry about a hard-coded number on 200 PCs around your office. Cool -- right? (I TOLD you this was about being LAZY!)

So with my iSeries I gave a domain of CTLALTDEL.ORG, and I want to call it "local" when I am inside my house. It then becomes "LOCAL.CTLALTDEL.ORG". (Think Internet naming standards, which many times have a country code after the ".ORG", since that IS the standard technically.

Step 1:

Install a COMPLETE version of Operations Navigator in the iSeries Access family of products. To do that, look for an option under the PC program menu called "IBM Client Access Express" and within that menu is "Selected Setup" (have your installation CD handy) and find EVERY option for Operations Navigator and install them. Why, you ask. I'm LAZY, and I don't want to ask you next month to install the NEXT set of functions if I can have you do it THIS month. (There IS a method to my madness!)

Here's the screen you should be looking at:

Next, install the LATEST service pack for the version of the OS/400 iSeries Access you're currently using. After applying that Service pack, you're now ready to start creating name servers on your iSeries.

Step 2:
Start up the Operations Navigator and follow these links:

  • Hit the PLUS (+) next to your server
  • Then hit the PLUS (+) next to the word "servers" * Then highlight "DNS" -- a Single menu option appears on the right, and options on the bottom of the screen. * Select the option on the BOTTOM of the screen called "Configure your AS/400 as a DNS server " After you click on that, the MAGIC begins.

Here's what it should look like:

Then you will point and click on "Configure AS/400 as DNS Server"

Now you want to right-click on "Primary Domain" and select "Create a new Primary Domain". I'm calling it example.com to show you how it's done.

When that screen appears, fill in the top domain field. (Note the PERIOD on the end.)

You'll see that I also checked "Create and delete reverse mappings by default". This will create the appropriate reverse mappings to help name servers find your server. Then I added the DOMAIN, which is the LAST bit of the address. In our case it is example.com. The SUB domain would be www.example.com, which points to your Web server.

This is what you should see next:

Note the yellow indication that SOME action needs to be taken on that domain. What it means here is that when we're done, it needs to be activated. I'll walk you though that process in a few moments.

Next, right-click on the domain you just added in the above step, and click "New Host".

Once there, click on the "Add" button.

You've already declared your domain name, so all you need to do here is add information on how to FIND your domain and its IP address. I said I wanted the name to be LOCAL, so let's look at that.

WAIT -- I didn't put the domain! Well, you're RIGHT. I'm declaring this WITHIN the hosts. Once I say, "OK," everything I want will be waiting for me. By not having a period on the end, we're telling the configuration tool that we want it to fill this in for us (not the name on the top of the screen).

Just like magic it filled in all the blanks.

Now what? Let's complete this and test it.

Hey that YELLOW thing is still there!

OK -- right-click on your domain (we called it example.com) and select "enable." Once selected the yellow thing will go away. Update your server by hitting the button up top with the arrow pointing to the upper right corner where that cute little server is waiting for this information. Note that I have a LOT of domains on my iSeries. There is NO limit to the amount of domains that an iSeries can respond as.

Step 3:
Point your PC to your NAME server. Then select your network card's configuration and the "Internet Protocol (TCP/IP)" and click "Properties".

Then set your preferred DNS server (my iSeries' IP address) to 192.168.1.2 (or YOUR iSeries's IP address) and you're done.

Step 4:
You also need to declare this name server inside your iSeries' domain setting.



Note the name of my system -- because the AS/400 responds as FIRE400.CTLALTDEL.ORG (which responds over the Internet -- why -- the NAME server served it!) Set up the iSeries to use its OWN DNS server by placing the address in the "Domain Name Server" section of this display.

Step 5:
TEST! You can do this by typing the NSLOOKUP command on the iSeries and hitting Enter. I set DEBUG and VERBOSE by typing "SET DEBUG" and SET VERBOSE" as line commands. After that, type the name of the domain you'd like to look up and hit Enter.

Then SET D2 for FULL debugging.

Then ask about your domain by typing the domain name -- in our case, local.example.com

Look at these three examples for the complete picture of how your system responded.





PCs also have this command, NSLOOKUP.

Also ping the server to see if it responds, and HOW it responds. (See the CHANGE TCP/IP Domain Information to make sure it will use the DNS to search for domains.)

Now EVERYTHING in your network can use LOCAL.EXAMPLE.COM. And when you need to change IP addresses for ANY reason, you change it in your DNS server and you're done. It resolves the IP address for the PCs, so you change this in ONE SPOT, not many. How's that for being LAZY?

OK -- COOL! Anyone wanna see this on the World Wide Wait? Ask, and I'll show you how this works on the Internet!

That's all for now. Until next month, BE LAZY!!!

-----------------------------------------
About the author: Andrew Borts is webmaster at United Auto Insurance Group in North Miami, Fla. He is often a frequent speaker at COMMON and is past president of The Southern National Users Group, an iSeries-AS/400 user group based in Deerfield Beach, Fla.


Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close