Operating System - HP-UX
1833161 Members
3014 Online
110051 Solutions
New Discussion

change default route & subnet masking

 
SOLVED
Go to solution
Jerry_109
Super Advisor

change default route & subnet masking

HP-UX B.11.11 U 9000/800
9000/800/rp3410
9000/800/L3000-7x

************************************
Hello HP,

I received a request from the network staff
to change our default route, and netmask to the following :

new default route:
10.254.110.1
new netmask:
255.255.255.0

**************************************
Current settings in our environment
hohp40
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
lan 0 0/1/2/0 igelan CLAIMED INTERFACE HP PCI 1000Base-T Core
lan 1 0/3/1/0 btlan CLAIMED INTERFACE HP A5230A/B5509BA PCI 10/100Base-TX Addon
/dev/diag/lan1 /dev/ether1 /dev/lan1

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.254.110.40 10.254.110.40 UH 0 lan0 4136
10.254.0.0 10.254.110.40 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

# ifconfig lan0
lan0: flags=1843
inet 10.254.110.40 netmask ffff0000 broadcast 10.254.255.255
root@hohp40[/root]
# ifconfig lan1
ifconfig: no such interface


hohp41
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
lan 0 0/1/2/0 igelan CLAIMED INTERFACE HP PCI 1000Base-T Core
lan 1 0/3/1/0 btlan CLAIMED INTERFACE HP A5230A/B5509BA PCI 10/100Base-TX Addon
/dev/diag/lan1 /dev/ether1 /dev/lan1
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.254.110.41 10.254.110.41 UH 0 lan0 4136
10.254.0.0 10.254.110.41 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

# ifconfig lan0
lan0: flags=1843
inet 10.254.110.41 netmask ffff0000 broadcast 10.254.255.255
root@hohp41[/root]
# ifconfig lan1
ifconfig: no such interface



hohp230
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
/dev/diag/lan4 /dev/ether4 /dev/lan4

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.254.110.230 10.254.110.230 UH 0 lan0 4136
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

#ifconfig lan0
lan0: flags=843
inet 10.254.110.230 netmask ffff0000 broadcast 10.254.255.255
root@hohp230[/root]
#ifconfig lan1
ifconfig: no such interface


hohp231
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/9/0/0 btlan CLAIMED INTERFACE HP A5230A/B5509BA PCI 10/100Base-TX Addon
/dev/diag/lan1 /dev/ether1 /dev/lan1

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.254.110.231 10.254.110.231 UH 0 lan0 4136
10.254.0.0 10.254.110.231 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

# ifconfig lan0
lan0: flags=843
inet 10.254.110.231 netmask ffff0000 broadcast 10.254.255.255
root@hohp231[/root]
# ifconfig lan1
ifconfig: no such interface



hohp232
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/9/0/0 btlan CLAIMED INTERFACE HP A5230A/B5509BA PCI 10/100Base-TX Addon
/dev/diag/lan1 /dev/ether1 /dev/lan1

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.254.110.232 10.254.110.232 UH 0 lan0 4136
10.254.0.0 10.254.110.232 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

# ifconfig lan0
lan0: flags=843
inet 10.254.110.232 netmask ffff0000 broadcast 10.254.255.255
root@hohp232[/root]
# ifconfig lan1
ifconfig: no such interface

*******************************************
These are the changes I want to review with you :


Lan Card reconfigure w/ : new route ( 10.254.110.1 )
ifconfig lan0 10.254.110.40 netmask 255.255.255.0 up
route add default 10.254.110.1 1

to flush route :
route -f add default 10.254.110.1 1
**********************************

/etc/rc.config.d/netconf

INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="10.254.110.40"
SUBNET_MASK[0]="255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="10.254.110.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""


restart network:

/sbin/init.d/net stop
/sbin/init.d/net start
####################################################
4 REPLIES 4
Pete Randall
Outstanding Contributor
Solution

Re: change default route & subnet masking

Your proposed changes look good to me. You could also make these changes using set_parms:

/sbin/set_parms ip_address
-and-
/sbin/set_parms addl_netwrk

-or-

/sbin/set_parms initial


Pete


Pete
Rick Garland
Honored Contributor

Re: change default route & subnet masking

To change default via command line.
route delete default ;route add default

Change the mask via the ifconfig

Make the changes in the /etc/rc.config.d/netconf file as well to have these changes survive boots.

Also can use the set_parms command and this will walk you through the process of making the changes
Uday_S_Ankolekar
Honored Contributor

Re: change default route & subnet masking

Changes can be done in netconf file as you mentioned and you can also do with set_parms command.

/sbin/set_parms ip_address
/sbin/set_parms addl_netwrk

Then restart net or reboot

-USA..
Good Luck..
Mahesh Kumar Malik
Honored Contributor

Re: change default route & subnet masking

Hi Jerry

Use following command to modify the required network parameters

#sbin/set_parms addl_netwrk

You should reboot the server after the changes and verify /etc/hosts & /etc/rc.config.d/netconf files

Regards
Mahesh