Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Exclamation Route traffic externally on two local interfaces

    I have a CentOS Linux machine with two ethernet cards ( ipadddresses and .

    eth2 ip address is
    eth3 ip adress is
    Both the ports are connected back to back using an ethernet cable.

    I want to route traffic externally( using an External Ethernet Cat5 cable) from one interface to another. Is it possible?

    I tried the following but that did not help

    >iproute add dev eth2
    >iproute add dev eth3
    >ping -I eth2

    This causes an ARP Request to go out from eth2. Eth3 receives this ARP Request but does not do anything with it . No ARP-REPLY ..

    Any help will be very highly appreciated.

  2. #2
    Do you mean you want to route traffic coming in from eth2 port out the eth3 port? if so, then the first thing i'd do is change one of the ip ranges to another private range, e.g.:


    then you'd have to enable IP forwarding in the kernel, e.g.:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    Note: this change is not permanent across reboots, for that use system tools like sysctl.

    then add a route forwarding traffic from one network to the other, e.g.:
    route add -net  XXX.XXX.XXX.0 netmask dev ethX
    substitute the right ip ranges and device name for whichever way you are routing. Note: i might have the syntax of that route command screwed up, it's been a while...

    then on a third machine you would need to make or your default router, and it should successfully be able to reach the network on the "other" side of your router.

  3. #3
    Thanks for your reply atreyu. No, I do not want to route/forward traffic from one interface to another. I want to send traffic from ETH1 <-> ETH2 but make sure it uses external wired connection instead of internal local interface ( .
    In other words : I have to probe the traffic I am sending from ETH1 <-> ETH2 on an external router.

  4. $spacer_open

Posting Permissions

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