problem with host route


 
Thread Tools Search this Thread
Operating Systems AIX problem with host route
# 1  
Old 03-16-2010
problem with host route

Hi,

I have a system with network interfaces en0 and en1

en0:
physical ip: 1.1.1.10
virtual ip1: 192.168.100.11
virtual ip2: 192.168.100.12

en1:
physical ip: 1.1.1.20
virtual ip1: 192.168.100.20
virtual ip2: 192.168.100.21

default gateway ist 192.168.100.254

when I open a connection from this host to another host, it's established from ip 192.168.100.11

but I want it to be established from 192.168.100.21 to one special host behind a firewall

the interface name on which the ips reside on may differ, so I need a host route, and specify the source ip, and not the source interface, it would be easy to say take en1 when connecting to host x, but that's not what I want
any ideas?
# 2  
Old 03-16-2010
try smit route so you can add routs from there
# 3  
Old 03-17-2010
it's not possible to add a host route from an ip, it's just possible to specify an interface in the smit menu

on linux, my interface would be eth0:1, eth0:2

but on AIX, there are no additional interfaces created for ip aliasing
# 4  
Old 03-24-2010
I am not sure if i understand you correctly, but wouldn't a simple static route solve your problem? Use "route add -host ..." to add a static route to the destination with a network mask of 255.255.255.255 and your desired local IP address as gateway. You can indeed use an IP address as gateway, can't you?

I hope this helps.

bakunin
# 5  
Old 08-26-2010
In AIX, you can use the -interface option with route.
This line should solve your problem:

route add -host targethost -interface 192.168.100.21

If omitting "-interface", the system would use the primary address on the same interface as gateway, in your case 1.1.1.20, which is not what you want.

This User Gave Thanks to gurumeditation For This Post:
# 6  
Old 08-26-2010
No do not use route add with AIX as the route will disappear when you reboot the server. The correct way to this is via smithy tcpip and add static route.

You can do this via the command line with a chdev command on the inter device, but it needs a lot of commas in the right place. You can specify the en device that you want a route to use.

In relation to the original question, the trouble is that the TCP/IP stack can't differentiate between which of the two source addresses that you have as they are in the same subnet. My understanding of TCP/IP tells me that this will lead to ambiguous routing and problems. Would you not be better to create an ether channel with the two intfaces and have a single ip address on it as being easier to manage?
This User Gave Thanks to ross.mather For This Post:
# 7  
Old 08-26-2010
AIX cannot handle multiple adapters, or interfaces, in the same subnet. Why would it?
You need to separate the the addressed in to different subnets if you need to gain control over what goes where.
Or do you have subnet masks one IP address wide?
This User Gave Thanks to dukessd For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

"Network error: No route to host" While connecting guest RHEL4 using putty

Hi, I have installed RHEL4 using vmware workstation.. Host OS: Windows XP Guest OS: RHEL4 Pls refer step 17 & 18 in below link... ORACLE-BASE - Red Hat Enterprise Linux 4 and Centos 4 Installation 1) If i choose to assign IP automatically (using DHCP) means, i am able to connect RHEL4... (3 Replies)
Discussion started by: thomasraj87
3 Replies

2. UNIX for Dummies Questions & Answers

No route to host - mail error

A linux box is supposed to emailing the results of backups to the windows exchange server, but nothing arrives. it never has, as the muppet who set up the Windows domain knew nothing about linux. I know only slightly more than that... pretty sure sendmail is the daemon running to handle mail. it... (0 Replies)
Discussion started by: Noewon
0 Replies

3. AIX

problem with command 'route -q' in AIX 5.3

Hi all! I have a problem.I access to AIX server via SSH,then i use command 'route -q', after that i can't connect to AIX server.Please help me to fix this problem. Thanks & Best Regards (1 Reply)
Discussion started by: bachtq
1 Replies

4. IP Networking

IP forwarding Route/Host ?

I have a unix machine that operates some CNC machines, I need to hook up my windows machine through core ftp to load programs onto the box. The card i need to route to for the FTP on unix is tu1 I need to check the routing tables on the unix box to see which IP address will automatically... (2 Replies)
Discussion started by: moticulus
2 Replies

5. Programming

socket() No Route to host ??

Hello, My program should connect to a server. here's the code : int main(int argc, char *argv){ int sock = socket(AF_INET, SOCK_STREAM, 0); if(sock == -1){ perror("socket()"); exit(errno); } printf("retour socket = %d",sock); struct sockaddr... (1 Reply)
Discussion started by: nowayy
1 Replies

6. Red Hat

No route to host

I get below error when using telnet and ssh ?? Why ? the ip address of linux server is 10.155.25.22 =tstgcota ?? # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.75.0 0.0.0.0 255.255.255.0 U 0 0... (6 Replies)
Discussion started by: chuikingman
6 Replies

7. Programming

Error: No Route to host...urgent {socket() connection}

hello, I am doing Socket programming.. when I am establishing a socket connection using TCP protocol ...I am getting Error :: No route to host. at the client side during connect() call...........that it is returning -1. So I thing problem lies here......but what to do now... So for just... (6 Replies)
Discussion started by: arunchaudhary19
6 Replies

8. IP Networking

Connect to RAS callback server: route problem

I'm trying to use my Gentoo Linux home workstation for connecting to a Windows RAS callback server through analogic telephone line (PSTN). I'm using pppd and successfully configured pppd's options and chat files, both for the outgoing call and for receiving the incoming callback. All seems going... (20 Replies)
Discussion started by: robotronic
20 Replies

9. UNIX for Dummies Questions & Answers

no route to host

I not able to ping outside the internet. i am able to ping my 192. ip address. when i try to ping a 68. ip address i get no route to host. what should i do to correct this issue. I have sco openserver 5.05 (6 Replies)
Discussion started by: scoman2
6 Replies

10. UNIX for Dummies Questions & Answers

add route gives target: Host name lookup failure

We need to add our remote office to our linux routing table. Our internal office ip addresses are all in the range of 198.9.200.x with an subnet mask of 255.255.255.0 the remote office has ip addresses in the range of 192.168.0.0 and also a subnet mask of 255.255.255.0 when i use the... (3 Replies)
Discussion started by: progressdll
3 Replies
Login or Register to Ask a Question

Featured Tech Videos