- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: adding gateway
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
Forums
Discussions
Discussions
Discussions
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
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
03-30-2002 06:49 PM
03-30-2002 06:49 PM
adding gateway
i try to add this gateway manually using "route add net 192.168 192.168.1.251" but when i view back using "netstat -rn" there is no gateway defined reported...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 07:25 PM
03-30-2002 07:25 PM
Re: adding gateway
Then /sbin/init.d/net start, next netstat -rn
should show your gateway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 11:07 PM
03-30-2002 11:07 PM
Re: adding gateway
If it is the default gateway
route add net default
else
route add 192.168.0.0
The last parameter '1' tells whether the gateway is a remote host or a local host.If it is the local host use 0 instead of 1.If the gateway is a remote host then give 1.
If you want to make permanent entries then
edit your /etc/rc.config.d/netconf file .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2002 11:15 PM
03-30-2002 11:15 PM
Re: adding gateway
you can add the gateway manually by adding the /etc/rc.config.d/netconf file or you can add this through sam. If you want to add this through sam, do this
sam --> Networking and communication --> Local hosts file --> TAB and select action --> Configure default gateway
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2002 02:53 PM
03-31-2002 02:53 PM
Re: adding gateway
Routes added "on the fly" with the route command are not saved when rebooting. You have to set them every time you boot. The preferred method in HPUX is to edit /etc/rc.config.d/netconf with a stanza similar to this:
ROUTE_DESTINATION[0]="net 192.168.0.0"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=192.168.1.251
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""
If 192.168.1.251 is the IP address for the NIC on the HPUX box itself, change "ROUTE_COUNT[0]=1" to "ROUTE_COUNT[0]=0".
If you want to add a default route use a stanza like:
ROUTE_DESTINATION[1]=default
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]=xx.xx.xx.xx
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""
Substitute your gateway's IP address for xx.xx.xx.xx.
If adding multiple stanzas, be sure the instance number inside the [] symbols are unique for each stanze.
I suggest you try adding the routes in SAM then look at /etc/rc.config.d/netconf to see what it did.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2002 06:46 AM
04-01-2002 06:46 AM
Re: adding gateway
one thing, after i did all the changes, i tried "route add -net 192.168 192.168.1.251" then when i view the the configuration "netstat -rn" still cannot get the default gateway for this server.i also run "/sbin/init.d/net start" then "netstat -rn", still the same,
what should i do?
server info:
IP No. : 192.168.1.2
Gateway : 192.168.1.251
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2002 07:07 AM
04-01-2002 07:07 AM
Re: adding gateway
Are you subnetting? If you are using the default class C subnet mask, your netconf should have the following (at a minimum):
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=192.168.1.2
SUBNET_MASK[0]=""
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=192.168.1.251
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""
To add the default route "on the fly" do:
route add default 192.168.1.251 1
If you are still having problems, please post the output of the following:
netstat -rn
lanscan
netstat -ni
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2002 07:13 AM
04-01-2002 07:13 AM
Re: adding gateway
If you can reboot the system after doing the changes, it would be good.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2002 07:19 AM
04-01-2002 07:19 AM
Re: adding gateway
There are many ways to go about it. First check by netstat -nr command and if there is any default gateway delete it by route delete command.
The ping the gateway you should be able to receive reply back.
Adding can be done wither by
route add default
and add entry to the /etc/rc.config.d/netconf file and stop and start the net by /sbin/init.d/net stop < start>
or go the SAM way.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2002 03:38 AM
04-02-2002 03:38 AM
Re: adding gateway
I already reboot the server, but still cannot get that default server when I run "netstat -rn"
the output of netstat -rn :
s01amy02 #>netstat -rn
Routing tables
Dest/Netmask Gateway Flags Refs Use Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 2815 lo0 4136
192.168.1.2 192.168.1.2 UH 0 925877 lan0 4136
192.168.1.0 192.168.1.2 U 2 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 0 lo0 4136
output of lanscan :
s01amy02 #>lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0x001083FAF51B 0 UP lan0 snap0 1 ETHER Yes 119
output of netstat -ni :
s01amy02 #>netstat -ni
Name Mtu Network Address Ipkts Opkts
lan0 1500 192.168.1.0 192.168.1.2 1029667 1029541
lo0 4136 127.0.0.0 127.0.0.1 2815 2815
fyi, there is nothing to do with the IP class, because this server & gateway is in same LAN (not connected to outside/internet).
One thing, before this, the server is working fine,
the only problem is, because this server is in VLAN 1(gateway : 192.168.1.251), but workstations is in VLAN 2(gateway : 192.168.2.251), so, which ever PC in VLAN 2 can't connect to this server.
There is also another 2 servers in the same VLAN, with same configuration in netconf file as this server, with IP : 192.168.1.1 & 192.168.1.3, both is working fine.
attach is netconf files for those server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2002 06:39 AM
04-02-2002 06:39 AM
Re: adding gateway
Can 192.168.1.2 communicate with 192.168.1.251? Is "ping 192.168.1.251" successful?
Please post the output from:
ifconfig lan0
route add default 192.168.1.251 1
Back to your original post...
"route add net 192.168 192.168.1.251" is an invalid route command for your system. Your network is 192.168.1.0 (vlan1). The other network is 192.168.2.0. If you want to add a route just to 192.168.2.0 use:
route add net 192.168.2.0 192.168.1.251 1
Perhaps you should attach your netconf file.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2002 08:16 AM
04-02-2002 08:16 AM
Re: adding gateway
I can ping this gateway(192.168.1.251),
reply seccussfully.
"route add net 192.168.2.0 192.168.1.251 1" I already tried, still cannot view the default gateway when i run "netstat -rn"
attach is ifconfig lan0 output for 192.168.1.2
and also netconf for :
192.168.1.2 (problem)
192.168.1.1 (working fine)
192.168.1.3 (working fine)
hope this info. can help me to solve the problem.