Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a linux machine with 3 NIC cards on it.
I want to be able to forward packets from eth3 to eth2 .
I have ip forwarding enabled in the /sys/net/ipv4/ip_forward file.
IP address of eth2 : 1.1.1.1
IP address of eth3 : 2.2.2.2
I set up the routing table .
I have ethereal listening on eth1 . I used a traffic generator to send pkt to eth2.
But I dont see the pkt on eth1.
This is what I do to enable forwarding, I have 2 NICs, eth0 and eth1, and I forward packets back and forth between them (I'm running Fedora, don't know if it matters):
1. Modify in /etc/sysctl.conf:
net.ipv4.ip_forward = 0 to net.ipv4.ip_forward = 1
2. Create /etc/sysconfig/network-scripts/ifcfg-ethX:
The important entry is: GATEWAYDEV=ethY
Create /etc/sysconfig/network-scripts/ifcfg-ethY:
The important entry is: GATEWAYDEV=ethX
- where X and Y are the 2 interfaces you're forwarding packets between
3. Add to /etc/sysconfig/network:
FORWARD_IPV4 = yes
4. Modify /proc/sys/net/ipv4/ip_forward:
Change to 1
I will try this out. I can't connect the 2 interfaces using crossover (since I need to pump traffic into eth2 from a traffic generator). So can I connect the 2 interfaces through a switch?
And, I need to set up the routing table too, right?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.