- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- I have two network card,How can I set gateway for ...
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
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
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
тАО02-20-2004 02:37 PM
тАО02-20-2004 02:37 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2004 03:20 PM
тАО02-20-2004 03:20 PM
SolutionThere can be only one 'default' gateway per system. If that gateway cannot take care of default routing, you can configure static routes for the other router. Say your routers are 10.10.10.1 and 20.20.20.1 then you would run
#route add default 10.10.10.1 1
#route add net 30.30.30 netmask 255.255.255.0 20.20.20.1 1
#route add net 40.0.0 netmask 255.0.0.0 20.20.20.1 1
etc.,
Your /etc/rc.config.d for the above would be
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]="255.255.255.0"
ROUTE_GATEWAY[0]="10.10.10.1"
ROUTE_COUNT[0]=1
ROUTE_DESTINATION[1]="net 30.30.30"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="20.20.20.1"
ROUTE_COUNT[1]=1
ROUTE_DESTINATION[2]="net 40.0.0"
ROUTE_MASK[2]="255.0.0.0"
ROUTE_GATEWAY[2]="20.20.20.1"
ROUTE_COUNT[2]=1
You can keep addding modules like the above in netconf file for each static route. Make sure the index is unique for each static route. Depending on the configuration of the router, you will need to specify the corresponding ROUTE_MASKs.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2004 09:36 AM
тАО02-21-2004 09:36 AM
Re: I have two network card,How can I set gateway for each of it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 04:51 AM
тАО02-23-2004 04:51 AM
Re: I have two network card,How can I set gateway for each of it ?
lan0: 10.10.10.5
route add net 10.10.10 netmask 255.255.255.0 10.10.10.5 1
lan1: 20.20.20.7
route add net 20.20.20 netmask 255.255.255.0 20.20.20.7 1
Then you'd have to run a routing daemon. It used to be "routed". Now I think it's called "mrouted". You wouldn't be able to reach any addresses other than 10.10.10.[1-254] and 20.20.20.[1-254].
Then if you ran:
route add default inet 10.10.10.5 netmask 255.255.255.0 1
You'd go through the lan1 interface to get to 20.20.20.x addresses and 10.10.10.5 addresses for everything else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 05:55 AM
тАО02-23-2004 05:55 AM
Re: I have two network card,How can I set gateway for each of it ?
There are other side effects - traffic will only be accepted on the interface with the patching IP address.
How well it works when apps do not bind() to IPs prior to calling connect() I do not know. It does seem to work the other way around - that is with applications that are calling accpet() - as the remote client has pretty much selected our local IP by its choice of destination IP address in the IP datagram carrying the TCP SYN segment.
How "supported" it is I am not sure.