to enable 2nd gateway


 
Thread Tools Search this Thread
Operating Systems AIX to enable 2nd gateway
# 1  
Old 11-17-2011
to enable 2nd gateway

HI admins,

Server is AIX 5.2

I have 2 NIC card enabled with 2 vlan ips.

en0 - 10.50.102.25 gw 10.50.102.1
en4 - 10.50.103.25 gw 10.50.103.1

I have configured via smitty. But automaticall gateway of en4 changes to 10.50.102.1.

How to make it work so both NICs gets different gateways.

Code:
# ifconfig -a
en0: flags=4e080863,80<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,PSEG,CHAIN>
        inet 10.50.102.25 netmask 0xffffff00 broadcast 10.50.102.255
en4: flags=4e080863,80<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,PSEG,CHAIN>
        inet 10.50.103.25 netmask 0xffffff00 broadcast 10.50.103.255
lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 65536 tcp_recvspace 65536
#

Code:
# netstat -nr
Routing tables
Destination      Gateway           Flags   Refs     Use  If   PMTU Exp Groups

Route Tree for Protocol Family 2 (Internet):
default          10.50.102.1       UGc       0        0  en0     -   -   =>
default          10.50.103.1       UGc       0        0  en4     -   -
10.50.102.0      10.50.102.25      UHSb      0        0  en0     -   -  =>
10.50.102/24     10.50.102.25      U         3        6  en0     -   -
10.50.102.255    10.50.102.25      UHSb      0        5  en0     -   -
10.50.103.0      10.50.103.25      UHSb      0        0  en4     -   -  =>
10.50.103/24     10.50.103.25      U         4      181  en4     -   -
10.50.103.25     127.0.0.1         UGHS      0        4  lo0     -   -
10.50.103.255    10.50.103.25      UHSb      0        0  en4     -   -
10.50.111.200    10.50.103.1       UGHW      1      452  en4     -   -
10.55.12.155     10.50.103.1       UGHW      0       26  en4  1500     1
10.55.68.10      10.50.102.1       UGHW      1       99  en0  1500   -
10.55.68.11      10.50.103.1       UGHW      0        3  en4     -     1
127/8            127.0.0.1         U         5      207  lo0     -   -

Route Tree for Protocol Family 24 (Internet v6):
::1              ::1               UH        0        0  lo0 16896   -

Can we enable both the gateways.

Regards
newaix
# 2  
Old 11-17-2011
well you have one default gateway, that needs to be in the same subnet as one interface ip, all machine traffic that goes to an ip not in the same subnet as your interface ips is sent over the default gateway

having more then one default gateway does not make sense to me, in case you want to reach different ip subnets over your non default gw interface, set static host or netroutes (smitty route)


in your case a standard configuration would be

en0 - 10.50.102.25 default gw 10.50.102.1
en4 - 10.50.103.25

packet goes to 84.34.21.57: sent to 10.50.102.1 over en0
packet goes to 10.50.103.199: sent over en4 directly to this ip without gw
packet goes to 10.50.102.199: sent over en0 directly to this ip without gw

maybe tell us what you want to accomplish with two default gateways?
cheers
# 3  
Old 11-17-2011
Here is the requirement

Server with two nic with below ip config

en0 :10.50.102.25 mask : 255.255.255.0 GW: 10.50.102.1
en4: 10.50.103.25 mask : 255.255.255.0 GW:10.50.103.1

Routing Table should have two default routes as below

Default Route 1 : pointing to 10.50.102.1
Default Route 2 : pointing to 10.50.103.1

Challenge : I configured both NICs without giving GW. Then I added the default routes. After this Both NIC is showing the GW as 10.50.102.1.

I agree that this is not a standard configuration, but we have one critical server in production with two nics. When we migrate this server behind firewalls we are facing some issues. We observed that with the configuration as per my requirement in a windows machine things works well. So we have arranged a test AIX box and trying to perform the same.

Any help is much appreciated.
# 4  
Old 11-17-2011
since aix 5.1 dead gateway detection was introduced, so you may have a fallback default gateway in case your primary one dies

look at this manual:

Help -
# 5  
Old 11-17-2011
Thanks for the response.

But i didnot understand why gw of en4 automatically changes from 10.50.103.1 to 10.50.102.1.

My intention is to configure en0 with gw 10.50.102.1 and en4 with 10.50.103.1

Please suggest

Regards\newaix

---------- Post updated at 01:26 PM ---------- Previous update was at 01:11 PM ----------

My plan is to reconfigure en4 with without gateway and to add a static route gateway 10.50.103.1 in routing table.
Regards
newaix
# 6  
Old 11-25-2011
Hi,

I don't understand how you have configured 2 default gateways in windows. As far as i know any os allows only one default gateway. For other network you have to manually add routes. In aix you have dead gateway detection but in windows there is no such option.
# 7  
Old 11-25-2011
Maybe try to explain why you need 2 default gateway then maybe we will be able to provide proper solution

How have you added it ?
try smitty route > add static gateway
over there you have possibility to select an interface have you did that ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Inconsistency between RedHat 6.5 global gateway and single gateway leads to loss of default gateway

Dear friends I use RedHat 6.5, which sets the gateway in the configuration file / etc / sysconfig / network as GATEWAY = 192.168.1.26, and the gateway in the configuration file / etc / sysconfig / network-scripts / ifcfg-eth11 as GATEWAY = 192.168.1.256. The two gateways are different.... (6 Replies)
Discussion started by: tanpeng
6 Replies

2. Solaris

Cannot add gateway

Hi, OS: Solaris 11.2 64bit IP address: 172.16.10.10 Netmask: 255.255.254.0 Gateway: 172.16.2.254 From windows box, i can set and ping gateway. IP address is same segment with windows box. But on solaris i cannot set gateway. route add default 172.16.2.254 add net default: gateway... (6 Replies)
Discussion started by: mzainal
6 Replies

3. Linux

GNUGK-How to setup static gateway to gateway routing

Dear Sir I am a newbie in the world of IP telephony. I have been working with Asterisk PBX (SIP) and Cisco Call Manager (MGCP) but now I am learning on how to work GNUGK for H.323 Gatekeeper. I am having a problem, configuring static call routing on GNUGK in the section ... (0 Replies)
Discussion started by: mfondoum
0 Replies

4. Solaris

Gateway

Hi all, Just now i had change the gateway for a server Go to /etc/defaultrouter, change to 10.86.33.1 route delete default 10.86.39.222 route add default 10.86.33.1 now cannot telnet to the server already.. any idea? (5 Replies)
Discussion started by: SmartAntz
5 Replies

5. AIX

Help with Default Gateway

Hi, I have two interfaces on m AIX 5.3 box. One going to 192.168.1.x and it has a gateway of 192.168.1.1. I configured the other gateway with 192.168.2.x and the default gateway as 192.168.2.1. But I can't get connectivity to the 192.168.2.1 network. Can someone help me out and let me know... (7 Replies)
Discussion started by: bbbngowc
7 Replies

6. Solaris

Add gateway

Hi Community, I've a question about network adaptors. I've installed Solaris 10 configuring the ce0 port with an IP(10.23.8.15) , an interface_name (first) and a gateway(10.23.8.1) . I need to change the name of the interface ce0 and to configure another interface (ce1) with another... (1 Reply)
Discussion started by: Sunb3
1 Replies

7. AIX

gateway

Dear folks, How can delete the gateway from smitty or by command, Because I have 2 gatway in the system and I tried to delete by smitty it gave me failed command (7 Replies)
Discussion started by: magasem
7 Replies

8. SCO

SCO Gateway

Hy everybody ! I'm new on your forum, i'm french and don't speak a good english, so scuse me please for it ! I would to know how modify a gateway on a SCO 5.06 We have a problem, we have multi "beach" adress, one is 192.1.1.x, an other is 192.1.4.x Actually, the computer on 192.1.4.x... (2 Replies)
Discussion started by: LB59
2 Replies

9. Red Hat

gateway

Hi, in which file and how shuold be decalred a gateway and its IP adresse ? Where and how add a gateway ? Many thanks before. (3 Replies)
Discussion started by: big123456
3 Replies

10. IP Networking

gateway

I used "route" to add the default gateway I wrote this: route add default 19x.x.x.x 0 but this is not permanent default gateway. Do I need to use another command? Thank a lot (2 Replies)
Discussion started by: lmena
2 Replies
Login or Register to Ask a Question