Operating System - HP-UX
1834302 Members
2679 Online
110066 Solutions
New Discussion

techies...routing problem..urgent pls

 
SOLVED
Go to solution
Anil C. Sedha
Trusted Contributor

techies...routing problem..urgent pls

Hi,

I have a server on VLAN with two nic's. I want one of the interface address to connect to another server out of the VLAN via a static route. Also i want to specify a different name to the interface address. Can u pls guide me as to how i go about it.

regards
If you need to learn, now is the best opportunity
7 REPLIES 7
Sanjay_6
Honored Contributor

Re: techies...routing problem..urgent pls

Craig Rants
Honored Contributor
Solution

Re: techies...routing problem..urgent pls

Assuming that you have another gateway for your vlan (lets say some 10 network). You would enter:

route add 10.0.0.0 netmask 255.0.0.0 10.1.1.1 1

Where the 10.0.0.0 is your vlan net and 10.1.1.1 is the gateway to that vlan net.

Hope this is what you were looking for,

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
John Dvorchak
Honored Contributor

Re: techies...routing problem..urgent pls

And to add to all of the responses, to the second part of your question about a different name. That is a DNS or hosts file issue. If you are using DNS then you need to add a name to the second lan/IP card that is unique on the lan. If you are using hosts files then of course you can add the new IP address/name combination in your hosts file.
If it has wheels or a skirt, you can't afford it.
Steven Sim Kok Leong
Honored Contributor

Re: techies...routing problem..urgent pls

Hi,

By the way, don't forget to update your /etc/rc.config.d/netconf if you want your static routes to be permanent in future reboots.

Hope this helps. Regards.

Steven Sim Kok Leong
Ravi_8
Honored Contributor

Re: techies...routing problem..urgent pls

Hi,Anil

You can assign the IP to each of NIC's you have and can communicate thru these NIC's as Sanjay says in his post. Having 2 different names is also possible and by making entry in your DNS server you can communicate thru respective NIC. But command like swinstall, swlist... fails, since two names are pointing to the same host(physically)
never give up
gimini
Advisor

Re: techies...routing problem..urgent pls

Hi,
Since our server has 2 nics,thus you have to configure it as a router(gateway)with each nic claiming a different network.By default lan0 nic is on your VLAN network.the other nic (say lan1) should be assigned IP adress of the other network;
-Supose the other network is 192.1.2 and you want to give lan1 a node no. say 2,on this network ,then type;
#ifconfig lan1 inet 192.1.2.2 up
#ifconfig lan1
It should be up .
-Check lan0
# ifconfig lan0
It should be up too.
-Now add the routing info. to operating sys.:
# route add net 192.1.2 192.1.2.2 0
-Edit /etc/rc.config.d/netconfig file and look for the lines;
ROUTE_DESTINATIN="net 192.1.2"
ROUTE_GATEWAY=192.1.2.2
ROUTE_COUNT=0
_ For naming purpose,edit /etc/hosts and give the new ip a name.
Never take simple matters for granted
gimini
Advisor

Re: techies...routing problem..urgent pls

Hi Anil,
ofcoure you have to reboot after configuring the router.
For all nodes on the second netwowk(192.1.2),you have to do two thinks on each node;
1. edit /etc/hosts and add ;
192.1.2.2
192.1.1.1
2.run the route command;
#route add default 192.1.2.2 1
then edit /etc/rc.config.d/netconfig file accordingly.
I hope this will help.
Regards
Never take simple matters for granted