- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to change gateway on lan1 without interrupting...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 05:50 AM
тАО09-21-2006 05:50 AM
##################################
Hello All,
Is there a way to change gateway address of my "lan1" card without interrupting the system ? This is a production server, and lan0
should not be interrupted.
##################################
root@hohp112[/root]
# /etc/ioscan -nfC lan
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
lan 0 0/1/2/0 iether CLAIMED INTERFACE HP AB352-60001 PCI/PCI-X 1000Base-T Dual-port Core
lan 1 0/1/2/1 iether CLAIMED INTERFACE HP AB352-60001 PCI/PCI-X 1000Base-T Dual-port Core
######################################
root@hohp112[/root]
# ifconfig lan1
lan1: flags=1843
inet 172.31.22.218 netmask fffffff8 broadcast 172.31.22.223
##################################
root@hohp112[/root]
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.2.110.112 10.2.110.112 UH 0 lan0 4136
172.31.22.218 172.31.22.218 UH 0 lan1 4136
172.31.22.216 172.31.22.218 U 2 lan1 1500
10.2.0.0 10.2.110.112 U 2 lan0 1500
172.31.22.224 172.31.22.217 UG 0 lan1 0
172.31.22.0 172.31.22.217 UG 0 lan1 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.2.1.1 UG 0 lan0 0
root@hohp112[/root]
######################################
#
root@hohp112[/root]
# netstat -rn | grep lan1
172.31.22.218 172.31.22.218 UH 0 lan1 4136
172.31.22.216 172.31.22.218 U 2 lan1 1500
172.31.22.224 172.31.22.217 UG 0 lan1 0
172.31.22.0 172.31.22.217 UG 0 lan1 0
##################################
# cat /etc/rc.config.d/netconf | grep -v "#"
HOSTNAME="hohp112"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="10.2.110.112"
SUBNET_MASK[0]="255.255.0.0"
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="10.2.1.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
GATED=0
GATED_ARGS=""
RDPD=0
RARP=0
IP_ADDRESS[1]=172.31.22.218
SUBNET_MASK[1]=255.255.255.248
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=172.31.22.223
INTERFACE_STATE[1]=up
DHCP_ENABLE[1]=0
ROUTE_DESTINATION[1]="net 172.31.22.224"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]=172.31.22.217
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""
root@hohp112[/root]
#######################################
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 05:57 AM
тАО09-21-2006 05:57 AM
SolutionSince you are using default gateway through lan0 it is ok you can plumb lan1 to get going with new gateway through lan1.
ifconfig lan1 plumb
ifconfig lan1 unplumb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 06:10 AM
тАО09-21-2006 06:10 AM
Re: How to change gateway on lan1 without interrupting system
As stated the ifconfig command is your friend.
but you will also need to update /etc/rc.config.d/netconf
man ifconfig for more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 06:41 AM
тАО09-21-2006 06:41 AM
Re: How to change gateway on lan1 without interrupting system
You can use "route add" for the time being. After your next planned reboot the netconf will be used and your settings will be permanent.
Regards,
MB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 07:56 AM
тАО09-21-2006 07:56 AM
Re: How to change gateway on lan1 without interrupting system
I'm still waiting for the network folks to deliver the new gateway address. I assume the commands would look like :
####################################
# ifconfig lan1 unplumb
#ifconfig lan1 172.31.22.218 netmask 255.255.255.248 up
#route add 172.31.22.0
netconf:
INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=172.31.22.218
SUBNET_MASK[1]=255.255.255.248
BROADCAST_ADDRESS[1]=172.31.22.223
INTERFACE_STATE[1]=up
ROUTE_DESTINATION[1]="net 172.31.22.0"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 07:57 AM
тАО09-21-2006 07:57 AM
Re: How to change gateway on lan1 without interrupting system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 08:02 AM
тАО09-21-2006 08:02 AM
Re: How to change gateway on lan1 without interrupting system
#ifconfig lan1 172.31.22.218 netmask 255.255.255.248 up
#route delete 172.31.22.224
#route add 172.31.22.0
netconf:
INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=172.31.22.218
SUBNET_MASK[1]=255.255.255.248
BROADCAST_ADDRESS[1]=172.31.22.223
INTERFACE_STATE[1]=up
ROUTE_DESTINATION[1]="net 172.31.22.0"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 08:17 AM
тАО09-21-2006 08:17 AM
Re: How to change gateway on lan1 without interrupting system
Good Luck.