Operating System - HP-UX
1748145 Members
3592 Online
108758 Solutions
New Discussion юеВ

Re: Configure server with dual IP address

 
paul skaria
Visitor

Configure server with dual IP address

Hi, I want to configure two IP address for one server, the two IP addresses are in different network and i should be able to telnet/ssh to the server using both the IP address. The OS version is HP-UX 11.31. The purpose is to configure a DR server for two different Oracle DB servers in different network. Please help.
Paul
6 REPLIES 6
Matti_Kurkela
Honored Contributor

Re: Configure server with dual IP address

Welcome to ITRC Forums!

What you're planning is common and probably easy to do, but some more details are required.

- Are you going to use two physical network interfaces, or should both IP addresses be on the same NIC?

If it's the former, just configure the IP address and netmask of the second network to the second NIC. You can do this with SAM or STM, if you don't want to edit /etc/rc.config.d/netconf manually. If you only need to communicate with the directly-connected network segment, you don't have to configure a gateway.

If it's the latter, you'll need to know more about your network infrastructure: are the networks supplied as two VLANs on the same physical NIC, or are the two IP segments just routed into the same physical network segment? Depending on the answer, you may need to configure either a virtual network interface for the second VLAN, or an IP alias to the single NIC.

- If the DB servers you need to reach are in the directly-connected network segments, configuring just the IP addresses and netmasks should be enough. But if the DB servers are behind routers, you need a "full" dual-homed host configuration, which includes some entries in your routing table. If you don't know how to do this, you really should contact your network administrator(s) (or someone else who understands how IP routing works and knows the topology of the networks involved) and have them choose suitable routing table entries for you.

A common mistake is to try and configure two default gateways: an IP address and netmask are interface-specific settings, but a default gateway is normally a host-specific setting. (It is possible to configure multiple default gateways, but unless you also configure source-IP-based routing, only the first default gateway in the routing table gets used unless it fails.)

MK
MK
paul skaria
Visitor

Re: Configure server with dual IP address

Hi MK thanks for the response.
I am configuring two physical network interfaces with two different IP's. These two networks are isolated by a firewall. So i need to configure two default gateways for the server. Please tell me how to do that. Thanks
Paul
Hakki Aydin Ucar
Honored Contributor

Re: Configure server with dual IP address

Since you have two NIC cards on server, you just need to configure separately them with different IPs .

If you need how to do it:
(link deleted)

OR as a new card config:
http://www.cyberciti.biz/tips/hp-ux-how-do-i-configure-the-new-lan-card-configuration.html

paul skaria
Visitor

Re: Configure server with dual IP address

here is my configuration.

mesdr@root:[/] #netstat -i
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lo0 32808 loopback localhost 1408 0 1408 0 0
lan6 1500 192.1.10.0 192.1.10.14 6076 0 0 0 0
lan4 1500 192.168.37.0 192.168.37.40 783334 0 740019 0 0
mesdr@root:[/] #netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 32808
192.1.10.14 192.1.10.14 UH 0 lan6 32808
192.168.37.40 192.168.37.40 UH 0 lan4 32808
192.168.37.0 192.168.37.40 U 2 lan4 1500
192.1.10.0 192.1.10.14 U 2 lan6 1500
127.0.0.0 127.0.0.1 U 0 lo0 32808
default 192.168.37.254 UG 0 lan4 1500

currently i can ssh to the server using 192.168.37.40 but the IP 192.1.10.14 i can only ping and cannot telnet or SSH. my requirement is to access the server using both the IP.
Paul
paul skaria
Visitor

Re: Configure server with dual IP address

I managed to configure it by setting the ip_strong_es_model to 2 (default 0)

ndd -set /dev/ip ip_strong_es_model 2

with this i can have two default gateways by adding the network information in to the netconf file

INTERFACE_NAME[0]="lan6"
IP_ADDRESS[0]="192.168.37.40"
SUBNET_MASK[0]="255.255.255.0"
ROUTE_GATEWAY[0]="192.168.37.254"
ROUTE_DESTINATION[0]="default"

INTERFACE_NAME[1]="lan4"
IP_ADDRESS[1]="192.1.10.14"
SUBNET_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="192.1.10.254"
ROUTE_DESTINATION[1]="default"
ROUTE_COUNT[1]="1"

To make the ip_strong_es_model 2 permanent you may add the below in /etc/rc.config.d/nddconf file

/etc/rc.config.d/nddconf
TRANSPORT_NAME[0]=ip
NDD_NAME[0]=ip_strong_es_model
NDD_VALUE[0]=2

Thanks for all your responses.
Paul
paul skaria
Visitor

Re: Configure server with dual IP address

Solution in previous message
Paul