Networking Forums

Networking Forums > Computer Networking > Linux Networking > Packet Forwarding in Linux.

Reply
Thread Tools Display Modes

Packet Forwarding in Linux.

 
 
rramesh1@gmail.com
Guest
Posts: n/a

 
      10-30-2006, 06:49 PM
Hi.

I have a requirement like below:

(Host A)
Traffic Generator -> (eth0) Linux box with Two NICs (eth1)---->Router's
Interface

I have a 192.168.x.x /24 IP setup on the eth0, my requirement is to get
the traffic generated from Host 'A' to eth1 (ideally forwarded from
eth0). At this point I have two questions:

1) If I need to get the traffic from eth0 to eth1, should I setup eth1
to have a 192.168.x.x IP? and set a default route to eth1 IP ?

2) Is there any other approach (which will just fwd all packets on eth0
to eth1 irrespective of the IP - at the MAC level) to do this?

Thanks & Regards
Ramesh

 
Reply With Quote
 
 
 
 
dwed
Guest
Posts: n/a

 
      10-30-2006, 11:26 PM
Sounds like you want to look at iptables and read about the FORWARD
rules. Search Google for rc.firewall to get some examples, like:

http://iptables-tutorial.frozentux.n...c.firewall.txt

You probably wouldn't want to have both network cards with IP's on the
same network subnet. If eth0 and eth1 were both on the same subnet,
why pass through the Linux box?

(E-Mail Removed) wrote:
> Hi.
>
> I have a requirement like below:
>
> (Host A)
> Traffic Generator -> (eth0) Linux box with Two NICs (eth1)---->Router's
> Interface
>
> I have a 192.168.x.x /24 IP setup on the eth0, my requirement is to get
> the traffic generated from Host 'A' to eth1 (ideally forwarded from
> eth0). At this point I have two questions:
>
> 1) If I need to get the traffic from eth0 to eth1, should I setup eth1
> to have a 192.168.x.x IP? and set a default route to eth1 IP ?
>
> 2) Is there any other approach (which will just fwd all packets on eth0
> to eth1 irrespective of the IP - at the MAC level) to do this?
>
> Thanks & Regards
> Ramesh


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
packet forwarding query rahul8143 Linux Networking 0 04-14-2005 01:36 PM
Packet forwarding queries kernel.lover Linux Networking 0 01-30-2005 09:09 AM
Packet forwarding Manu J Linux Networking 5 09-14-2003 10:45 AM
packet forwarding luke Linux Networking 1 09-03-2003 06:11 PM
Packet forwarding Andy Zhang Linux Networking 3 08-02-2003 02:12 PM



1 2 3 4 5 6 7 8 9 10 11