AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Problem with routing for two paths

    Posted Fri January 01, 2010 05:30 PM

    Originally posted by: Kosala


    Hi,

    I have a interesting situation which I can't seem to find a workaround. One of my servers are assigned with two IP address with two interfaces (en2 and en3):

    en2: 172.16.1.151 gw 172.16.1.222 (production LAN)
    en3: 172.16.250.151 gw 172.16.250.222 (test LAN)

    Both these networks are accessible to users in the 172.0.0.0 network in our organization. Using smitty I have applied the default gateway of 172.16.1.222 for both the interfaces (en2 and en3). In order to allow users to connect to the 172.16.250.0 network I have added a static route for the 172.16.250.222, for the network on en3. Now I have the following entries in the netstat -rn

    default 172.16.1.222 UG 4 0 en2 - - =>
    default 172.16.250.222 UG 4 0 en3 - -

    Since these two route are assigned to two different interfaces, I expected AIX to use the respective interface based on the destination network, but for my disappointment, these two routing entries are used as a ip multi-pathing scenario. For example, telnet attempts to one of the IP addresses respond alternately in a round robin manner. Which means alternatively, the connection times out for consecutive telnet sessions, for both IP addresses.

    How can I specify, users who reach the server through en2 should go to 172.16.1.222 and users who reach the server via en3 should use the 172.16.250.222... What did I do wrong here? Any pointers highly appreciated.

    Thanx in advance,
    Kosala
    #AIX-Forum


  • 2.  Re: Problem with routing for two paths

    Posted Fri January 01, 2010 08:19 PM

    Originally posted by: aklyachkin


    What are the netmasks on the interfaces?

    Sincerely yours,
    Andrey Klyachkin
    http://www.sysadminsleben.de
    #AIX-Forum


  • 3.  Re: Problem with routing for two paths

    Posted Sat January 02, 2010 07:42 PM

    Originally posted by: dukessd


    "Both these networks are accessible to users in the 172.0.0.0 network"

    "Using smitty I have applied the default gateway of 172.16.1.222 for both the interfaces"

    "Now I have the following entries in the netstat -rn

    default 172.16.1.222 UG 4 0 en2 - - =>
    default 172.16.250.222 UG 4 0 en3 - -"
    No, no, no.

    1. You can only have one interface in any network / subnet / network mask.

    2. You can only have one default gateway.

    3. Again, You can only have one default gateway.

    You need to seperate the networks, 255.255.0.0, remove the other default route, use static routing if required for the second network.

    I don't know where you "learnt" about networking but it simply will not work like you have it configured.
    #AIX-Forum


  • 4.  Re: Problem with routing for two paths

    Posted Sat January 02, 2010 11:09 PM

    Originally posted by: Kosala


    > 1. You can only have one interface in any network / subnet / network mask.
    >

    Yes, there is only one network in each interface. Sorry for the confusion, the network segments are 172.16.1.0/24 and 172.16.250.0/24. That is the main reason we have two different gateways.

    > 2. You can only have one default gateway.
    >

    Yes, for my purpose having two default gateways is not the solution. Yet I have two separate gateways for both the networks.

    > 3. Again, You can only have one default gateway.
    >

    If you're trying to generalize, this is not completely correct. According to documentation, you can have multiple default gateways (under 5.2 onwards... I think). When you have two default gateways, they act as multi path routing.... which I do not want to happen in my scenario... or rather not working with different networks.

    Any idea how to add a static route, rather than creating a bunch of entries to for each client network...

    Kosala
    #AIX-Forum


  • 5.  Re: Problem with routing for two paths

    Posted Sat January 02, 2010 11:15 PM

    Originally posted by: Kosala


    > "Both these networks are accessible to users in the 172.0.0.0 network"

    Oops.. actually I meant is, the clients are class C subnets of the above class A subnet. Our internal network is quite diverse. That is the reason why I can't specify a static route for each network segment.

    Kosala
    #AIX-Forum