Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Can not set default gateway to lan2

mura-kei7
Advisor

Can not set default gateway to lan2

 

There are 2 lan interfaces on a itanium HP-UX, lan0 is closed local address and lan1 must be reach another segment address. I defined routing data as default gateway for lan1's gateway address on this HP-UX server by sam, but sum abort by segmentation fault?

So , I wrote routing data directly in /etc/rc.config.d/netconf  and type command " route add default gw xx.xx.xx.xx".

(xx.xx.xx.xx is lan1's gateway address)

 

1. Please tell me why sam failed?

2. Can lan1's(not lan0) gateway works default gateway on this HP-UX?

Regards,

mura-kei7

6 REPLIES
Naj
Valued Contributor

Re: Can not set default gateway to lan2

Hi,

Could you please show me the output

#netstat -rn

Thanks

BR
Naj

____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
Steven E. Protter
Exalted Contributor

Re: Can not set default gateway to lan2

Shalom,

 

It is certainly possible to use lan2 and set its gateway to lan2.

 

To really assist you, I'd need to see relevant portions of /etc/rc.config.d/netconf and your routing tables.

 

netstat -rn

 

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
Naj
Valued Contributor

Re: Can not set default gateway to lan2

Hi,

 

I just assume what are you trying to do and hope it would help you to overcome this.

Below i provide the step and hope this could help you

 

Files need to be configure:

  • /etc/hosts - Hosts configuration file (resolve hosts and IPs)
  • /etc/rc.config.d/netconf – IP address, routeing address and hostname stored in this file

Scripts for network:

  • /etc/init.d/net start – Use to start, stop network service

 

Misc command related network could help you
# lanscan

 

 All in one lan configuration utility (lan0 is first Ethernet interface) to configure and view the system IP address:

# ifconfig lan0 - Display IP info such as IP address netmask etc.

# ifconfig lan0 up - Up network interface (allow traffic)
# ifconfig lan0 down - Down network interactive (deny traffc)
# ifconfig lan0 x.x.x.x netmask x.x.x.x up - Setup/change IP adddress

 

Display routing table/info:
# netstat -nr

 

Define new route:
# route add default 192.168.1.254 1

 

HP's LAN diagnostic tool
# lanadmin

 


Setup various lan properties, dns client, NIS client configuration etc using GUI tool:
# sam
# set_parms

 

Thanks

 

BR

Naj

 


____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
mura-kei7
Advisor

Re: Can not set default gateway to lan2

Thank you for your advice,

 

I'm sorry, lan1 of my first post is spell miss of lan2 .

 

Unfortunately I can NOT copy  all files on the hp-ux server to outside, because security of the customer's policy.

So I write some file's information on this reply.

 

When I got sam's error, hosts and netconf files was defined bellows.

------

1. /etc/hosts

   define lan0's address -> lan2's address

   192.168.0.10 xxx

   192.142.1.11 xxx     <- defined same name

 

2. /etc/rc.config.d/netconf

....

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

...

routing data are default. (all lines were comment outed)

...

DEFAULT_INTERFACE_MODULES=""
IP_ADDRESS[2]=193.42.1.11
SUBNET_MASK[2]=255.255.255.0
INTERFACE_NAME[2]=lan2
BROADCAST_ADDRESS[2]=193.42.1.255
INTERFACE_STATE[2]=up

-------

and I tried to add routing information 193.42.1.254 by sam "Add Default Route..." menu.

When I pushed apply button, sam showed me core dumped message,

and routing info on /etc/rc.config.d/netconf  was not changed.

 

I forgot netstat -nr's output , but folowing output was returned, mabe.

No gateway setting found.

---

destination   Gateway 

193.42.1.11  19342.1.11

193.42.1.0  19342.1.11

 ----

 

 

Naj
Valued Contributor

Re: Can not set default gateway to lan2

Hi,

Could you please show me the output

#netstat -rn

Thanks

BR
Naj

____________________________________________
:: Really appreciate if you could assign some points.
:: Don't know how to assign point? Click the KUDOS! star!
mura-kei7
Advisor

Re: Can not set default gateway to lan2

I could defined lan2's routing address as default gateway by direct modification of /etc/rc.config.d/netconf.

 

ROUTE_DESTINATION[2]=default
ROUTE_MASK[2]="255.255.255.0"
ROUTE_GATEWAY[2]="193.42.1.254"
ROUTE_COUNT[2]="1"
# ROUTE_ARGS[2]=""

 

# netstat -nr's output are

default 193.42.1.254 UG 0 lan2

 

So this machine could reach outside server of gateway 193.42.1.254.

 

Thank you for all messages.

mura-kei