Home > AS/400 Tips > iSeries programmer tips > The Lazy Coder: Find your iSeries using a DNS or name server
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

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


Andrew Borts
07.28.2004
Rating: -3.94- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries CL programming
Taking advantage of CL advancements, starting with V5R3
Checking in on your IBM i authorization lists
Running PHP open source applications: NOBODY needs authority
Simplify the process of converting a spool file from iSeries into an Excel spreadsheet
CL program for daily backups
An automated CL method of moving a query from AS/400 to Excel
Changing user password expiration
Eight steps for creating program documentation using AS/400 utilities
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date
Advanced Job Scheduler help

Application Development
iSeries calling an .exe
Top 10 programmer tips
Formatted work job scheduler
Convert system date and time
Mixing free format code with embedded SQL
SQL update a field in one file from a field in another file
Webcasts for iSeries programmers
Programming advice from the pros
Easy code copying via the drag and drop method
Setting FTP time-outs

PC/Windows Connectivity
CA Express utility helps you manage SSL certificates
Windows XP SP2 causes problem for iSeries Access
Top 10 tips from our experts
The registration facility helps you tailor your system -- Part II
20 FTP tips in 20 minutes
Are your terminal sessions secure?
Top advice on connecting to the iSeries
Fast guide to PC/Windows connectivity resources
The Lazy Coder: Fun with TCP/IP
Automatically check FTP process for errors

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts