Results 1 to 7 of 7

Thread: routing between three ethernet cards

  1. #1
    Join Date
    Nov 2013
    Beans
    2

    routing between three ethernet cards

    I have three network cards installed in my Ubuntu10.04 system. please tell me how to enable routing between all the three and establish a communication between them??

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: routing between three ethernet cards

    Last edited by tgalati4; November 1st, 2013 at 07:00 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,304
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: routing between three ethernet cards

    Well, unless he needs to route among different subnets. I would never suggest bridging as the default solution with multiple interfaces.

    OP, what specifically are you trying to do? How you treat these interfaces depends on what applications and services you intend to do.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,050
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: routing between three ethernet cards

    Yes, that is true. If it was only two cards, then I would propose bonding--the ability to increase bandwidth by using 2 cards and combining the throughput of both. But with 3 cards, then there must be something else going on--so I assumed different networks.

    On bonding: https://help.ubuntu.com/community/UbuntuBonding

    I was banking on a 50/50 proposition. The OP would say, yes, that is what I want, or no that is not what I want. Of course the third option: I have no idea what I want is always in play.

    Maybe what the OP wants is two cards bonded together to increase bandwidth, and the third card bridged to support and isolate another network.
    Last edited by tgalati4; November 1st, 2013 at 07:50 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  5. #5
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    5,993
    Distro
    Xubuntu 15.10 Wily Werewolf

    Re: routing between three ethernet cards

    Assuming that you have the IP addressing for the three interfaces sorted out, just edit /etc/sysctl.conf and remove the # from the front of this line: "#net.ipv4.ip_forward=1" and reboot.

    You will of course need to make sure that all the devices on the three networks know that your server is the next-hop to be used to get to the other two networks. If you need help on doing that, you will need to be more specific about what you are setting up.

  6. #6
    Join Date
    Nov 2013
    Beans
    2

    Re: routing between three ethernet cards

    Thanks to all for your replies... I would like to further elaborate my problem. I have networks A, B and C. I want communication between B & C through A. I mean the services like mail and web of each network should be available to all the three and i want to monitor the services form network A using nagios3. please help.

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,304
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: routing between three ethernet cards

    If you attach each network to a separate adapter, and activate packet forwarding by uncommenting "net.ipv4.ip_forward=1" in /etc/sysctl.conf, all three networks will be able to exchange traffic if the common router is designated as their default gateways. So if 10.10.10.0/24 is connected to eth0 with address 10.10.10.1, all the machines on 10.10.10.0/24 should have 10.10.10.1 as their default gateway.

    If you need to route the private networks out to the Internet you'll have to add "masquerading" with an iptables rule. Suppose 10.10.10.1 connects upstream to an Internet-facing router. Then you can tell the machine to handle all the Internet traffic from the three networks with a rule like this:

    Code:
    /sbin/iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 10.10.10.1
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Bookmarks

Posting Permissions

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