Operating System - HP-UX
1829127 Members
2190 Online
109986 Solutions
New Discussion

How to access two networks with just one Lan card ?

 
Mauro_3
Advisor

How to access two networks with just one Lan card ?

Hi,

I have hp-ux 10.20 and I want to access two networks and I just have one lan card. The IPs are: 191.120.122.5 and 10.14.9.4. Can I set two default gateways one for each network ? I tried to set a virtual IP with no sucess in netconf (like lan0:1) it did not recognize as an interface. What can I do to solve it ?

Cheers,
Mauro
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: How to access two networks with just one Lan card ?

route add destination gateway

man route for details.

You can only have ONE default gateway, but you can have routes to as many networks as you want.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
G. Vrijhoeven
Honored Contributor

Re: How to access two networks with just one Lan card ?

Hi Mauro,

check out ifalias. This command allows you to create multiple ip-adresses on a interface.

Gideon
Mauro_3
Advisor

Re: How to access two networks with just one Lan card ?

Hi,

The HP host is connected to the 191.x.x.x network and the another network is connected in the hub. If I set the default gateway as 191.x.x.x all the packets is using this gateway to access the other networks. It is strange but besides I set the route to 10.x.x.x it is not working !?

Thanks,
Mauro
Michael Duthie
Trusted Contributor

Re: How to access two networks with just one Lan card ?

Best bet is to add the lastest ARPA patches and use SAM to configure.
Mauro_3
Advisor

Re: How to access two networks with just one Lan card ?

I??m really want to do it using netconf with

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=191.168.122.7
BROADCAST_ADDRESS[0]=191.168.122.255
LANCONFIG_ARGS[0]="ether"
DHCP_ENABLE[0]=0

INTERFACE_NAME[1]=lan0:1
IP_ADDRESS[1]=10.13.2.5
BROADCAST_ADDRESS[1]=10.13.2.255
LANCONFIG_ARGS[1]="ether"
DHCP_ENABLE[1]=0

And two default gateways:

ROUTE_DESTINATION[0]="xxxx"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=test
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

ROUTE_DESTINATION[1]="yyyyyy"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]=test2
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""

Why can I do it in netconf (hp-ux 10.20)

Cheers,
Mauro
Michael Duthie
Trusted Contributor

Re: How to access two networks with just one Lan card ?

Should have made that a bit clearer, use SAM to configure a logical IP address on your existing card.

SAM is good for some things :-)

I am guessing there is no gateway between these networks available.
Mauro_3
Advisor

Re: How to access two networks with just one Lan card ?

Mike,

Where can I do it in SAM ?

I could not find logical IP in SAM !?

Cheers,
Mauro
Michael Duthie
Trusted Contributor

Re: How to access two networks with just one Lan card ?

Before you configure netconf run

# ifalias lan0 add 10.13.2.5

to initialise the Logical card.


Mike


Michael Duthie
Trusted Contributor

Re: How to access two networks with just one Lan card ?

If your using SAM go to Network interfaces, highlight your card and under Actions should be Add Logical IP.

If its not there you need the latest 10.20 ARPA patches. Maybe SAM patches too.
Ron Kinner
Honored Contributor

Re: How to access two networks with just one Lan card ?

Mauro,

Keep your current default gateway. Do not try to have two - that will just mess you up. The 10.20 does not support the strong end-system model so would not know what to do with a second default gateway.

Actually I see nothing wrong with your current setup. Letting the router route between two networks on the same interface is quite common. If the interface to the router is a bottleneck then if it's a Cisco have the Cisco admin add the command
ip route-cache same-interface
to the interface. That will speed it up considerably since the interface will no longer have to query the main routing table every time it gets a packet that has to go back out the same interface. Other routers probably have the same idea.

Do not try to add a route via a gateway which is not in the same subnet as the HPUX.

Ron
Mauro_3
Advisor

Re: How to access two networks with just one Lan card ?

Hi,

Does anyone know what are these ARPA patches ?

Thanks, cheers,
Mauro
Michael Duthie
Trusted Contributor

Re: How to access two networks with just one Lan card ?

Go to http://www5.itrc.hp.com/service/patch/search.do

search for 10.20 & ARPA, select the cumlative patch.

ARPA - Advanced Research Projects Agency .. its the Agency who defined the network protocol standard.