Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I have a problem of configuring two network cards in the same subnet with two different gateways. one card connects to the VPN router and the other card connects ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie amithad's Avatar
    Join Date
    Sep 2006
    Location
    Sri Lanka
    Posts
    160

    Lightbulb Configuring Two Network Cards with Two Gateways


    Hi,


    I have a problem of configuring two network cards in the same subnet with two different gateways.

    one card connects to the VPN router and the other card connects my mail server to the ADSL router.

    eth0 (192.168.101.33) --connects to--> 192.168.101.30(VPN)

    eth1 (192.168.101.32) --connects to--> 192.168.101.2(ADSL)

    When I activate both network cards, the first network card appears on the top of the ethernet card list get activated even though it shows both cards are active, and that first cards default gateway is functioning but the other card's default gateway is not functioning.

    What should I do to activate both card's default gateways? Help me please..

    Thanks

  2. #2
    Linux User
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    419
    I'm no network guru, but who's handing out these 192.168.101.* addresses. Perhaps the 2 cards need to get their addresses from different DHCP servers. The first from the VPN router, and the other from the ADSL modem. Then they would have separate gateways. I think they are both trying to talk to the same gateway.

  3. #3
    Linux Newbie amithad's Avatar
    Join Date
    Sep 2006
    Location
    Sri Lanka
    Posts
    160
    Thanks Miven,

    Those IPs are static. Not assigned by DHCP


  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2013
    Posts
    1
    There should only be one default gateway configured. Even though you can set it in the ifcfg-eth0 file, it is a 'machine wide' setting. The default gateway is only used if the machine is sending traffic to another network that it doesn't know about. Typically, the default gateway is set to the address of a router that is on one of the networks that the machine is connected to.

  6. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You need to rethink your network layout. This design is bad. Both networks should have their own broadcast domain and not be shared. Maybe break down the 192.168.101 network to allow for more broadcast domains.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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