Operating System - HP-UX
1850057 Members
2961 Online
104050 Solutions
New Discussion

How to config hpux 11.00 as a router on HP9000/800?

 
SOLVED
Go to solution
fanyong
Occasional Contributor

How to config hpux 11.00 as a router on HP9000/800?

How to config hpux 11.00 as a router on HP9000/800?
8 REPLIES 8
Eugen Cocalea
Respected Contributor

Re: How to config hpux 11.00 as a router on HP9000/800?

Hi,

First you will need two NICs.

Then you need to proper configure them for the two nets that they will route the packets between.

Next is configuring the routes so they will fit your needs.

More detailed answers after more detailed requests. :)

E.
To Live Is To Learn
harry d brown jr
Honored Contributor

Re: How to config hpux 11.00 as a router on HP9000/800?

You can also look into "ipfilter", but I have never used it on HP.

live free or die

harry
Live Free or Die
Wodisch
Honored Contributor
Solution

Re: How to config hpux 11.00 as a router on HP9000/800?

Hello,

even only one NIC will be possible, as you can use "virtual" NICs on the one that physically exists...

You have to edit that station's "/etc/rc.config.d/netconf" and add another paragraph for the additional NIC, and one or more paragraphs for the routes.

Just copy the six or seven lines for the existing first interface, modify the copies' index from "[0]" to "[1]", change the device name from "lan0" to "lan1" (or "lan0:1" if you only have one NIC) and the ip-address and netmask. That's step 1. The next is to go down in that file to find the paragraph for routing. In there is the *destination*,, the *netmask*, and the *metric*. The *destination* is one of the three possibilities:
1) "default"
2) "net 10.11.12"
3) "host 10.11.12.13"
where you would use your wanted network-/ip-addresses, of course (not the 10.11.12 stuff).
Remember that the *metric* or *count* must be greater than zero for external destinations, but zero (0) if it is an interface in your station itself.
You copy those lines as often as neccessary (one set of lines for every *destination*), change the index numbers, and the values.
Then you test it by executing "/sbin/init.d/net start" and check for error-messages.

Check your DNS settings, too...

HTH,
Wodisch
Sridhar Bhaskarla
Honored Contributor

Re: How to config hpux 11.00 as a router on HP9000/800?

Fanyong,

You can configure your HP-UX server to act like a "router".

For ex., if your HP system has two NIC cards configured with two subnets say subnet A and subnet B. You can have the systems (other than the HP Server itself) on one Subnet talk to other through our HP Server.

Normally it's rare in real life scenario to use this setup as it's cheaper to buy dedicated this_purpose_only routers than setting up a UNIX server as a router.

To setup a HP Server as a router, you need to setup "gated" on the system.

It's simple to enable gated. Edit /etc/rc.config.d/netconf and make GATED=1. Then do a /sbin/init.d/gated start.

However, this won't work straight as you need to define your ROUTING TOPOLOGY. The configuration file is /etc/gated.conf. It's little bit complicated. A simple configuration would be to use RIP. You can see example configuration files under /usr/examples/gated directory.

Also take a printout of gated.conf(4) and have a look at various parameters.

Enjoy.

-Sri



You may be disappointed if you fail, but you are doomed if you don't try
Sanjay_6
Honored Contributor

Re: How to config hpux 11.00 as a router on HP9000/800?

rick jones
Honored Contributor

Re: How to config hpux 11.00 as a router on HP9000/800?

at the most basic level a router is simply an entity that forwards IP datagrams.

an HP-UX system will do that automagically - it is configured to be willing to forward IP datagrams by default - certainly if there are more than two IP addresses assigned to the system, and perhaps optionally if there is only one.

forwarding of IP datagrams can be controlled via ndd and the ip_forward* variables.

one does not necessary need to be running a routing protocol daemon such as gated, but it is not uncommon for a router to do so in more sophisticated situations.
there is no rest for the wicked yet the virtuous have no pillows
Eugen Cocalea
Respected Contributor

Re: How to config hpux 11.00 as a router on HP9000/800?

Hi,

If your network is small and you don't need to export/import routes, you don't need dynamic routing you don't need gated. And if you're a newbie, you'd better study it first and then kick it into production.

And yes, I know it can be done with only one NIC, but usually, you need a router to forward packets between two different physical subnets (not only, I said usually).

Anyway, it's very simple. Configure each NIC (or each virtual NIC, there you go) and add your routes to the routing table.

First of all, plan it. Use go'ol' paper and a pencil to make a sketch, see what packet where it has to go and build your routing table according to it.

Generalities, generalities...

E.
To Live Is To Learn