Operating System - HP-UX
1832591 Members
3354 Online
110043 Solutions
New Discussion

best way to setup (2) lan cards for different networks

 
SOLVED
Go to solution
Jerry_109
Super Advisor

best way to setup (2) lan cards for different networks

#uname -a ; model
HP-UX hohp230 B.11.11 U 9000/800 100434656 unlimited-user license
9000/800/L3000-7x
###################################
root@hohp230[/etc/rc.config.d]
#/etc/ioscan -nfC lan
Class I H/W Path Driver S/W State H/W Type Description
========================================================================
lan 0 0/0/0/0 btlan CLAIMED INTERFACE HP PCI 10/100Base-TX Core
/dev/diag/lan0 /dev/ether0 /dev/lan0
lan 1 0/8/0/0/4/0 btlan CLAIMED INTERFACE HP A5506B PCI 10/100Base-TX 4 Port
/dev/diag/lan1 /dev/ether1 /dev/lan1
lan 2 0/8/0/0/5/0 btlan CLAIMED INTERFACE HP A5506B PCI 10/100Base-TX 4 Port
/dev/diag/lan2 /dev/ether2 /dev/lan2
lan 3 0/8/0/0/6/0 btlan CLAIMED INTERFACE HP A5506B PCI 10/100Base-TX 4 Port
/dev/diag/lan3 /dev/ether3 /dev/lan3
lan 4 0/8/0/0/7/0 btlan CLAIMED INTERFACE HP A5506B PCI 10/100Base-TX 4 Port

###############################################
root@hohp230[/root]
#netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.10.230 192.168.10.230 UH 0 lan1 4136
10.254.110.230 10.254.110.230 UH 0 lan0 4136
192.168.10.0 192.168.10.230 U 2 lan1 1500
10.254.0.0 10.254.110.230 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.254.200.1 UG 0 lan0 0

#
root@hohp230[/root]
#ifconfig lan1
lan1: flags=843
inet 192.168.10.230 netmask ffffff00 broadcast 192.168.10.255

root@hohp230[/root]
#lanadmin -x 1
Current Config = 100 Full-Duplex MANUAL

Netconf:
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=10.254.110.230
SUBNET_MASK[0]=255.255.0.0
BROADCAST_ADDRESS[0]=10.254.255.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0

#HP A5506B PCI 10/100Base-TX 4 Port Interface
#INTERFACE_NAME[1]=lan1
#IP_ADDRESS[1]=192.168.10.230
#SUBNET_MASK[1]=255.255.255.0
#BROADCAST_ADDRESS[1]=192.168.10.255
#INTERFACE_STATE[1]=up

############################################
question #1 :
Not clear if I need to configure "hpbtlanconf" or "hp_apaportconf" ? I was thinking, since we are only using (1) port for lan1, I could just add lan1 to "hpbtlanconf" as follows:
#more hpbtlanconf

HP_BTLAN_INTERFACE_NAME[0]=lan0
HP_BTLAN_STATION_ADDRESS[0]=
HP_BTLAN_SPEED[0]=100FD

#HP_BTLAN_INTERFACE_NAME[1]=lan1
#HP_BTLAN_STATION_ADDRESS[1]=
#HP_BTLAN_SPEED[1]=100FD
#########################################

question #2 :
Best way to setup aliases for hohp230 to 192.168.10.230 ?

Thanks for your help.
7 REPLIES 7
Jeff_Traigle
Honored Contributor
Solution

Re: best way to setup (2) lan cards for different networks

Looks like you have it right for the hpbtlanconf file.

As for an "alias" for hohp230 to the second address, I assume you mean how to have two addresses assigned to the same hostname. A couple of employment assignments ago, I worked in a shop that had a production network and a management network for each server in their data center. They used the same hostname on both networks and it really caused them some some unnecessary confusion. Ideally, you want unique hostnames for each IP address, especially on the same host if for no other reason than tools on the host itself that need to resolve things backwards and forwards always gets the right answer.
--
Jeff Traigle
Patrick Wallek
Honored Contributor

Re: best way to setup (2) lan cards for different networks

Since the driver is btlan, yes you can set up lan1 in the hpbtlanconf file to control speed/duplex.

I'm not sure I quite understand you 2nd question. Are you asking how to assign the name hohp230 to the ip address? If so, then you can do this locally via the /etc/hosts file. If you have a DNS serer on your network, you need to create an entry in the DNS server for 192.168.10.230 to map that to hohp230.
Jerry_109
Super Advisor

Re: best way to setup (2) lan cards for different networks

Thanks, I'll use another name like
hohp230lab
Jerry_109
Super Advisor

Re: best way to setup (2) lan cards for different networks

what would the hosts file entry look like ?
10.254.110.230 hohp230.scif.com hohp23

192.168.10.230 hohp230.scif.com
Jerry_109
Super Advisor

Re: best way to setup (2) lan cards for different networks

Hello All,

I wanted my lan1 card to use the following route "192.168.10.1", so I entered the following command:
#route add 192.168.10.0 192.168.10.1 1
add net 192.168.10.0: gateway 192.168.10.1
##################################

Netstat -rn now shows the following :

root@hohp230[/etc/rc.config.d]
#netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.10.230 192.168.10.230 UH 0 lan1 4136
10.254.110.230 10.254.110.230 UH 0 lan0 4136
192.168.10.0 192.168.10.230 U 2 lan1 1500
10.254.0.0 10.254.110.230 U 2 lan0 1500
192.168.10.0 192.168.10.1 UG 0 lan1 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.254.200.1 UG 0 lan0 0

############################

What change do I make in the netconf file to
configure lan1 after reboot ?
Jerry_109
Super Advisor

Re: best way to setup (2) lan cards for different networks

I added the following to netconf :

ROUTE_DESTINATION[1]="net 192.168.10.0"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="192.168.10.1"
ROUTE_COUNT[1]=""
ROUTE_ARGS[1]=""

Does anyone know the command to stop/start
the network without bouncing the server ?
Is it :
cd /sbin/init.d
./net stop ; ./net start ?
Deoncia Grayson_1
Honored Contributor

Re: best way to setup (2) lan cards for different networks

/sbin/init.d/net stop
/sbin/init.d/net start

Is the commands you will use
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon