Operating System - HP-UX
1844837 Members
2836 Online
110233 Solutions
New Discussion

Default route for second nic

 
SOLVED
Go to solution
Craig A. Sharp
Super Advisor

Default route for second nic

Hi all,

I have a C180 workstation. I have installed a 100 Base-T nic at lan1 and need to change the default route to this card. Is it as simple as using route add default 200.x.x.x lan1 or do I need to flush the routing table and how would I make the required changes?

Here is the current table.
Destination Gateway Flags Refs Use Interface Pmtu PmtuTime
127.0.0.1 127.0.0.1 UH 0 138 lo0 4608
200.1.4.54 127.0.0.1 UH 40 713211 lo0 4608
default 200.1.4.2 UG 2 469 lan0 1500
200.1.4 200.1.4.54 U 10 189351 lan0 1500

Also do all entries need to be changed to lan1?

Thanks,

Craig A. Sharp
9 REPLIES 9
Andreas Voss
Honored Contributor

Re: Default route for second nic

Hi,

more that one default routing entries are not supported, instead the first given route would be used.
So you have to first delete the default route: route delete default 200.1.4.2
Then you could do: route add default 200.x.x.x (1)

Regards
CHRIS_ANORUO
Honored Contributor

Re: Default route for second nic

Try using landamin, or editing /etc/rc.config.d/netconf.
/sbin/init.d/net (stop/start)
By the way, if you are using a dynamic routing protocol with gated (say RIP or OSPF), do not forget to confirm the static routes in the gated.conf file, otherwise they will be deleted by gated.

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Victor BERRIDGE
Honored Contributor

Re: Default route for second nic

Hi Craig,
I didnt understand:
Are you trying to configure a second lancard?
That means you would want lan0 on a network and lan1 on another?
Or are you migating lan0 to lan1
Or something completely different?

Best regards
Victor
Craig A. Sharp
Super Advisor

Re: Default route for second nic

I am migrating from lan0 to lan1. I tried to delete the default route and then add the default route with the command:

route add default 200.1.4.2 (1)

This did nothing. I also edited the netconf file and added the entries for the lan1 card in the routing area and commented out the lan0 entries. No luck. It still picks up the lan0 default route on reboot.

I have a feeling I am missing something simple by digging to deep.

Thanks,

Craig
Andreas Voss
Honored Contributor

Re: Default route for second nic

Hi,

could you send your netconf to the forums ?

Regards
Craig A. Sharp
Super Advisor

Re: Default route for second nic

Sure. Note that the install program for lan1 put the card entries at the bottom of the file.

I entered the lan1 info for the default route.

Craig
Andreas Voss
Honored Contributor
Solution

Re: Default route for second nic

Hi,

i have edit your netconf (see attachment)
Give it a go.

Regards
Victor BERRIDGE
Honored Contributor

Re: Default route for second nic

No news Good News?
Did you try specifying ifconfig lan0 down?
then ifconfig lan1 up?

Again just thoughts...
Best regards
Victor
Craig A. Sharp
Super Advisor

Re: Default route for second nic

Got it. Andreas had the answer. Have a look at the changes in the netconf file.
The system is working now on the new nic.

Thanks to all for your suggestions and help.

Craig