Default GW

Dears,

I have machine using TWO interfaces with diffrent IP subnets
I need to create a different DGW to each interface.

your support is appreciated

Would you mind taking the time to give a more detailed description of the requirements and goals?

Did you try anything so far ?

If so, would you mind posting your attempt ?

my question is not clear?! let me explain it in another way
I got a Sun using oracle solrais x86, solaris 10 with patches had been installed on the machine, I configued one interface net0 with 10.10.10.10 with DGW of 10.10.10.1

Now I need to change this DGW as fixed one.
and also configure net1 with IP 20.20.20.20 and DGW of 20.20.20.1

Hope this clarify the situation

which are the commands should I use to do the configuration of the above senario?

HowTo: Change Default Gateway or Default Router in Sun Solaris | ItsyourIP.com

Dear ctsgnb,

Thanks for your fast replay.

I have only one last question: can I configure 2 different DGW IPs to each physical interface?

As far as i understand so far (please correct me if i'm wrong so i will remove my post)

When Your system send a packet, it find the destination IP to which it is supposed to be sent.

It checks if there are specific route to follow for that target IP, if no route is specified, then it is sent to the default Gateway.

You should set up your routes accordingly to fit your needs.

Maybe Solaris 10 offers network capabilities for setting differents types of configurations, but since it is not exactly in my area, i am not sure about what is possible or not.
In such case, the best is to get the relvant documentation (PDF or other) and read it.

many thanks for the fast replaies, my last question
can I configure 2 different DGW to each interface

I think it is possible for example if each interface is in its own zone.

(Get the PDF : SystemAdministration Guide: Solaris Containers-Resource Management and Solaris Zones)

And read in Chapter/subsection :
-> Solaris Zone Administration
-> Using IP Network Multipathing on a Solaris system With Zones Installed
-> Solaris 10 8/07: How to Use IP Network Multipathing in Exclusive-IP Non-Global Zones
-> How to Extend IP Network Multipathing Functionality to Shared-IP Non-Global Zones

No, generally not.

TCP/IP routing is above the link layer. That means that you can generally have only one default gateway per host.

Default mean "if there are no routes in the routing table, send the packet here" which means that there should only be one default gateway.

i had same problem. and had to leave just one default gw. iirc, it was possible to define two of them, but then some packets would get lost (presumably sent to wrong one).

If you need more granularity on routing, based on interface, you should either add more static routes or run a dynamic routing protocol on your network.

For special cases where you might want to direct a subset of traffic to a particular interface, it is easier to do this by configuring static routes. A "default route" means "if there is no entry in the routing table, send the packet here". There should not be two "defaults". There should be only one. If you need more specific routing, add more static routes to your routing table.