Teradata Express Network Configuration

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Teradata Employee

Teradata Express Network Configuration

When first installing Teradata Express for your VMware or Amazon EC2 environment, there are some basic configuration steps that we need to make based on the IP addresses that are given to the instance when it is started.

With VMware player, we typically use the NAT networking configuration. With this, VMware manages the underlying virtual network for the instances and is the gateway for managing all inbound and outbound network traffic. This gateway provides the DHCP service to assign an IP address to the Teradata Express instance and will also provide the DNS services to resolve web domain names to their IP address. We'll need to first get the instance IP address as well as this gateway address. We'll do this using some basic Linux terminal command line utilities.

The IP address assigned to your Teradata Express image is displayed with the ifconfig command:

# ifconfig eth0

This should result in output similar to this, in which I've bolded the IP address for this instance - 192.168.80.133. Yours will likely be a different address.

eth0 Link encap:Ethernet HWaddr 00:0C:29:FD:D9:5B
inet addr:192.168.80.133 Bcast:192.168.80.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fefd:d95b/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:381 errors:0 dropped:0 overruns:0 frame:0
TX packets:657 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:47151 (46.0 Kb) TX bytes:73442 (71.7 Kb)
Base address:0x2000 Memory:e8920000-e8940000

Now let's find the IP address being used to connect to the VMware gateway using the netstat command. Again, I've bolded the IP address for the gateway - 192.168.80.2. Again, yours will likely be a different address.

# netstat -r

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.80.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.80.2 0.0.0.0 UG 0 0 0 eth0

Now that we have our 2 address, let's check out Linux networking configurations.

First, let's look at the /etc/resolv.conf file. This file contains the address of our domain name server (DNS), which is used to translate network aliases to their IP address. For example, you can't browse the web without translating web domain names to their IP address. Use your favorite editing tool (such as vi) to update this file as I've done here:

# cat /etc/resolv.conf

nameserver 192.168.80.2

Once this is updated and saved, we can test using the ping utility with a web domain name:

# ping yahoo.com

PING yahoo.com (209.191.122.70) 56(84) bytes of data.
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_seq=1 ttl=128 time=106 ms

The second network configuration change we should make is to support Teradata connectivity. A common Teradata configuration used by client computers is to create what we call a 'cop' entry in the hosts file. This allows our connectivity tools to connect to Teradata using aliases instead of IP address. An example is the BTEQ query tool included in the Teradata Express image. I can create an alias name "localTD" in my /etc/hosts file with the pattern '{alias}cop1', or 'localTDcop1' as seen here mapped to my Teradata Express IP address:

# cat hosts

# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost
192.168.80.133 localTDcop1

With this new 'cop' entry, my client tools can connect to Teradata using the alias instead of IP address. Here's an example using the BTEQ client on the Teradata Express instance. I've highlighted the alias entry. (Remember, though, if you want to use this alias from another client such as BTEQ from your Windows host environment, you'll need to create a similar 'cop' entry in its hosts file.)

# bteq

Teradata BTEQ 13.00.00.00 for LINUX.
Copyright 1984-2008, Teradata Corporation. ALL RIGHTS RESERVED.
Enter your logon or BTEQ command:
.logon localTD/dbc

.logon localTD/dbc
Password:

*** Logon successfully completed.
*** Teradata Database Release is 13.00.00.19
*** Teradata Database Version is 13.00.00.19
*** Transaction Semantics are BTET.
*** Character Set Name is 'ASCII'.

*** Total elapsed time was 1 second.

BTEQ -- Enter your DBC/SQL request or BTEQ command:
select * from dbcinfo;

select * from dbcinfo;

*** Query completed. 3 rows found. 2 columns returned.
*** Total elapsed time was 1 second.

InfoKey InfoData
------------------------------ --------------------------------------------
RELEASE 13.00.00.19
VERSION 13.00.00.19
LANGUAGE SUPPORT MODE Standard

BTEQ -- Enter your DBC/SQL request or BTEQ command:
.exit

.exit
*** You are now logged off from the DBC.
*** Exiting BTEQ...
*** RC (return code) = 0

With these simple configuration updates, your Teradata Express virtual instance should be ready to go!

8 REPLIES
Enthusiast

Re: Teradata Express Network Configuration

Hi Mike,
Thanks for the new articles.
I managed to fix my VM and now I can play with teradata database.
Regards.
Enthusiast

Re: Teradata Express Network Configuration

Thanks Mike.
this s what i needed. thanks again!
Teradata Employee

Re: Teradata Express Network Configuration

MikeR

Having just converted to MAC I wanted to build a stand alone development environment so I got Eclipse (Helios) JEE for MAC and the Teradata Plug-in for Eclipse to let me develop SQL, JXSP's and JUDF (I should be in marketing). I then installed VMWare Fusion and spun up a "Virtual" TD 13.10 instance and tried to wire the two together, however, I realised a couple of simple points of clarification would probably help other readers.

#1 When determining the IP address of the VM make sure you are running a terminal within your VMFusion instance when you run the "ifconfig eth0" command in order to pick up the IP address of your VM (typically something ilk 192.64.100.100.

#2 Add this IP address into the /etc/hosts file of the MAC as something like "192.64.100.100 MyTDcop1"

#3 Use the Host name MyTD (note how we drop the cop1) in the "Database Server Name" of the IDE Connection profile plus the username / password and you should have an active connection between the MAC hosted IDE and the VMFusion hosted TD Instance.

MikeC....
Teradata Employee

Re: Teradata Express Network Configuration

This is great, now if I could just find someone to tell me the IP address of the Viewpoint server in the TD 15 w/Viewpoint VM instance????

Teradata Employee

Re: Teradata Express Network Configuration

Hi Mike

Great article.  Could you update to say that you cannot run client tools like SQL Assistant against your TD VMware server if you are connected to the TD VPN.

Thanks  John L

Re: Teradata Express Network Configuration

Hi Mike,

Very easy to understand and implement hence very very good article.

Thanks a lot for your support.

Yudhvir Singh Gujjer

Teradata Employee

Re: Teradata Express Network Configuration

Hi Mike,

Great article.

I am getting started with TD Express and I have followed you article step by step, however, when I ping yahoo.com, I get the following message: 

ping: unknown host yahoo.com

Any suggestion or idea about what I am missing?

Thanks in advance

Oscar

Re: Teradata Express Network Configuration

Hi Mike,

Thanks very much. Appretiated.