Find the answer to your Linux question:
Results 1 to 9 of 9
how do i put more than one gateways in our linux box (RH9)...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    INDIA
    Posts
    5

    two gateways


    how do i put more than one gateways in our linux box (RH9)

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,883
    Do you mean more than one network gateway? Does that mean you'll have one network card attached to your regular lan and two more connected to other lans?

    All you need to do really is make sure each card uses a different subnet and are configured correctly and working, then build up your routing tables to send packets to whichever network you want based on their ip addresses.

    Remember, you can only have one default gateway.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Linux User
    Join Date
    Jul 2005
    Posts
    369
    you may want to look in to load ballancing
    All i want for christmas is a new liver....a second chance to get afflicted with Cirrhosis

  4. #4
    Just Joined!
    Join Date
    Jan 2005
    Location
    INDIA
    Posts
    5
    i will explain my setup

    i have 2 lan cards in my linux box. 1 is for inernet and other is for
    local. I have one external router (DAX) also.
    The router is for lease line in which through i am accessing SAP
    PORTAL. Now my problem is that i can't access both internet and SAP portal at
    a time. Explain me how to access both the things

    The private ip starts from 172.35.1.1 and my linux box ip is
    172.35.1.9.

    The ip address of the router is 172.35.1.254.

    If i want to access SAP portal i will change the gateway (windows
    system) to 172.35.1.254 and if i want to access internet i will change the
    gateway to 172.35.1.9.

    I hope u people understand my setup.

    My distro is Whitbox

    Delete Reply

  5. #5
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    You can only have one Default Gateway, that is why it is called default. If yo place two DG's on a machine, how in the world will it know were to send packets??? You will also receive an error when trying to add such an configuration, or at least you should. To cure your problem, place a persistent route in your routing table. I would place an entry similar to this one on the router with IP 172.35.1.9: (ex. route add /t <your desired ip address> mask 255.255.255.0 172.35.1.254). The route add command will vary depending upon the type of router you are using. What this setup does, it keeps the 172.35.1.9 as your default gateway and within this router, it will have a persistent route so that if it receives an IP call for the IP address within the routing table, it knows where to send it, in this cae, it will forward the IP packets to 172.35.1.254 and on out the door.

  6. #6
    Linux User
    Join Date
    Jul 2005
    Posts
    369
    Quote Originally Posted by gtmtnbiker98
    You can only have one Default Gateway, that is why it is called default. If yo place two DG's on a machine, how in the world will it know were to send packets??? You will also receive an error when trying to add such an configuration, or at least you should. To cure your problem, place a persistent route in your routing table. I would place an entry similar to this one on the router with IP 172.35.1.9: (ex. route add /t <your desired ip address> mask 255.255.255.0 172.35.1.254). The route add command will vary depending upon the type of router you are using. What this setup does, it keeps the 172.35.1.9 as your default gateway and within this router, it will have a persistent route so that if it receives an IP call for the IP address within the routing table, it knows where to send it, in this cae, it will forward the IP packets to 172.35.1.254 and on out the door.
    If your SAP portal has a limited range of addresses it connects to set up a router betweern both gate ways and set up the correct routing to send packets with the destination to the SAP router and all other ip packets to the internet look below at the diagram to get an idea.
    Code:
    SAP----------------\
                    Router---------Local Lan
    Net gateway--------/
    This is a similar way, how I resolved a problem at work we have a net gateway and a idsn line to our supliers for software to send the orders

    look at monowall which is easy to use firewall and router distribution of freebsd which runs on 486DX(old PCs) and upwards systems
    All i want for christmas is a new liver....a second chance to get afflicted with Cirrhosis

  7. #7
    Just Joined!
    Join Date
    Jan 2005
    Location
    INDIA
    Posts
    5
    can u explain me the steps how to to add routing table

  8. #8
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    There are several ways to solve this problem, I suggested the easiest. Winter's method is the preferred method in a workplace environment.

  9. #9
    Linux User
    Join Date
    Jul 2005
    Posts
    369
    Quote Originally Posted by gtmtnbiker98
    There are several ways to solve this problem, I suggested the easiest. Winter's method is the preferred method in a workplace environment.
    apart from the one at my place is set up like so.
    Code:
    IDSN router----------------------\
                                      \
    Internet -------------firewall----Monowall----------Lan
                         Cisco PIX    As a router
    All i want for christmas is a new liver....a second chance to get afflicted with Cirrhosis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •