Operating System - HP-UX
1752625 Members
4399 Online
108788 Solutions
New Discussion юеВ

Static Routing Issue on HP-UX Server

 
amreek bansal
Frequent Advisor

Static Routing Issue on HP-UX Server


Hi, I'm hoping someone out there has a good understanding of routing as I have a issue which I just cannot resolve.

There are 2 servers which I want to have connectivity. The firewall rules are all in place, its just now setting up static routes to get the connectivity set up. The details are as follows:

server1: IP is 10.93.58.144 (residing in sub network 10.93.58.128/26) g/w is 10.93.58.129

server2: Ip is 10.254.11.130 g/w is 10.254.11.129 (residing in sub network 10.254.11.128/25)

SO i want to be able to telnet from server1 to server2, so what static route do i need to set up this connectivity. The routing table on server2 is this.

Server2: netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.254.11.130 10.254.11.130 UH 0 lan0 4136
10.254.11.2 10.254.11.2 UH 0 lan1 4136
10.254.11.128 10.254.11.129 UGH 0 lan0 0
10.93.58.128 10.254.11.129 UGH 0 lan0 0
10.254.11.128 10.254.11.130 U 2 lan0 1500
10.254.11.0 10.254.11.2 U 2 lan1 1500
10.254.11.0 10.254.11.172 UGH 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.254.11.1 UG 0 lan1 0
lfhg-j-core01:/etc#
lfhg-j-core01:/etc# ifconfig lan0
lan0: flags=1843
inet 10.254.11.130 netmask ffffff80 broadcast 10.254.11.255
lfhg-j-core01:/etc#
lfhg-j-core01:/etc# ifconfig lan1
lan1: flags=1843
inet 10.254.11.2 netmask ffffff80 broadcast 10.254.11.127

Server1:

netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.93.58.128 0.0.0.0 255.255.255.192 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.93.58.129 0.0.0.0 UG 0 0 0 eth1

ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:50:56:8F:36:A5
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:18 Base address:0x1400

eth1 Link encap:Ethernet HWaddr 00:50:56:8F:75:50
inet addr:10.93.58.144 Bcast:10.93.58.191 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16041051 errors:466 dropped:1992 overruns:0 frame:0
TX packets:11439964 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1175939937 (1121.4 Mb) TX bytes:1792556783 (1709.5 Mb)
Interrupt:19 Base address:0x1480

Can any one know what thestaid route is to put in to allow server1 to be able to connect (i.e telent ) to server2 ?

Thanks.
6 REPLIES 6
Suraj K Sankari
Honored Contributor

Re: Static Routing Issue on HP-UX Server

H,

On server 1 try this command
#route add net 10.254.11.129 netmask X.X.X.X 10.93.58.129

X.X.X.X -- What is your netmask

Suraj
Mel Burslan
Honored Contributor

Re: Static Routing Issue on HP-UX Server

if you want a route to the whole network where server2 belongs to, run this command:

route add net 10.254.11.128 netmask 255.255.255.128 10.93.58.129 1


If you want to route to a single host, i.e., server2, then run this command:

route add 10.93.58.144 10.93.58.129 1

whichever method you decide to use, make sure you put the static routing information to the ROUTE section of the server1's /etc/rc.config.d/netconf file, so that your static route is resilient against reboots.

Hope this helps.
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: Static Routing Issue on HP-UX Server

Oh by the way, I forgot to mention, make sure that you speak to the network and/or firewall administrators and let them know about your intentions of connecting via ssh, so that they can open up firewalls if there is any. And despite what you might be led to believe, even in between two internal networks, there usually is a firewall or at least a filtering router to keep the networks sane. So, don't assume it is open access between the two networks, unless you spoke to the firewall people and got their word that it is so, in the last few days.

After the routing is done, if you are still having problems connecting, post the netstat -rn output from both servers and the error message you are getting for your ssh attempt for further help.

What you are going thru, was once my life purpose, after we decided to re-wire and re-network all our servers into different VLANs. Thank you Sarbanes-Ox(ymoron)ley rules.
________________________________
UNIX because I majored in cryptology...
amreek bansal
Frequent Advisor

Re: Static Routing Issue on HP-UX Server


Thanks Mel for your detailed reply, I'm going to run the commands you suggestin, just to confimr should the route command be excuted on server1 or server2?
amreek bansal
Frequent Advisor

Re: Static Routing Issue on HP-UX Server


This error is what I'm getting

Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.254.11.130 10.254.11.130 UH 0 lan0 4136
10.254.11.2 10.254.11.2 UH 0 lan1 4136
10.254.11.128 10.254.11.129 UGH 0 lan0 0
10.93.58.128 10.254.11.129 UGH 0 lan0 0
10.254.11.128 10.254.11.130 U 2 lan0 1500
10.254.11.0 10.254.11.2 U 2 lan1 1500
10.254.11.0 10.254.11.172 UGH 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.254.11.1 UG 0 lan1 0
lfhg-j-core01:/var#
lfhg-j-core01:/var# route add 10.93.58.144 10.93.58.129 1
add host 10.93.58.144: gateway 10.93.58.129: Network is unreachable


The command was run on server2.
amreek bansal
Frequent Advisor

Re: Static Routing Issue on HP-UX Server


Thanks, I have put in the route as suggested to the specific server and now is working. Thanks alot for your help.