Sponsored Content
Special Forums IP Networking Route all traffic between two ethernet interfaces Post 302466774 by kontozebyoszuka on Wednesday 27th of October 2010 09:26:12 AM
Old 10-27-2010
Question Route all traffic between two ethernet interfaces

I have a Linux box with 3 ethernet cards:
- eth0 - connected to internet (dhcp)
- eth1 - 192.168.0.1 connected to embedded device1
- eth2 - 192.168.0.1 also connected to embedded device2
(both eth1/eth2 have to be in identical, though separate, private networks).

Also, on eth0 I have two tunnel endpoints:
- vlan1 - 192.168.1.1 - virtual lan dev (OpenVPN or n2n)
- vlan2 - 192.168.2.1 - like previous

I would like to have access (from internet) to one of the embedded devices at a time through one of vlan devices (i.e. if I want to work with device1 I'll connect to vlan1 and at the same time someone else could work with device2 using vlan2 tunnel). Ah - both embedded devices have the same MAC addresses (I know it is wrong, but I cannot change their MACs).

OpenVPN in bridge mode is working only partially - it forwards ICMP traffic, even FTP, but not TCP/UDP packets (I've tried 'fragment' option, so it's not a problem of too big packets). What is more, the tunnel fails when embedded device restarts.

Hence my question - how to route/transfer/bridge all traffic from one ethernet device to another (eth1 <-> vlan1, eth2 <-> vlan2)?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

interfaces

Hello, which network interface i must sellect during the solaris9 installation le0 or hme0 ? this system is part of the network, it is a standalone system and is not on any domain. thanks for your help, em (1 Reply)
Discussion started by: emsakopa
1 Replies

2. UNIX for Dummies Questions & Answers

NTP idle ports and ethernet interfaces

I did a netstat -an and saw that ntp was listening on 4 UDP ports for each interface. Is this insecure because they are UDP ports and I don't see them in a listen state, is that because they are just a client. Thank you. *.ntp Idle... (2 Replies)
Discussion started by: csross
2 Replies

3. Solaris

Zones and interfaces

Hello, can someone please suggest if is possible to use different net interfaces for non global zones ? for example , bash-3.00# uname -srv SunOS 5.10 Generic_137137-09 bash-3.00# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 ... (6 Replies)
Discussion started by: tonijel
6 Replies

4. UNIX for Dummies Questions & Answers

/etc/network/interfaces

i need a one liner command that writes in /var/log/net.log the date when i connect to the network and when i disconect ..i know that i need to write somethin in /etc/network/interfaces but idk what ! please help (1 Reply)
Discussion started by: g0dlik3
1 Replies

5. UNIX Desktop Questions & Answers

Could you explain these Interfaces????

Hi friends, I am abit confused regarding these interfaces, hope you could clearify everything, and differentiate between them, with examples? 1. Graphical User Interface(GUI) 2. Text User Interface(TUI) 3. Character User Interface(CUI) 4. Commandline Interface(CLI) 5. Text-based User... (1 Reply)
Discussion started by: gabam
1 Replies

6. AIX

vio server ethernet to vio client ethernet(concepts confusing)

Hi In the vio server when I do # lsattr -El hdisk*, I get a PVID. The same PVID is also seen when I put the lspv command on the vio client partition. This way Im able to confirm the lun using the PVID. Similarly how does the vio client partition gets the virtual ethernet scsi client adapter... (1 Reply)
Discussion started by: newtoaixos
1 Replies

7. Solaris

Interfaces and Virtual-interfaces queries

Hi Al, In course of understanding networking in Solaris, I have these doubts on Interfaces. Please clarify me. I have done fair research in this site and others but could not be clarified. 1. In the "ifconfig -a" command, I see many interfaces and their configurations. But I see many... (1 Reply)
Discussion started by: satish51392111
1 Replies

8. Solaris

can't see other interfaces

Hi Guys, I have a Netra240 server with four interfaces. However, when I ran this command dladm show-dev it showed only one interface bge0. Can someone please explain to me how to fix this problem? Thanks guys. (1 Reply)
Discussion started by: cjashu
1 Replies

9. UNIX for Dummies Questions & Answers

Solaris Logic to transmit traffic to physical interfaces ( eg ce0 and ce1)

Just wanted to understand what is the logic being used by Solaris(kernel) to transmit data/traffic on physical interfaces. I have seen most of the time traffic is being sent to interface ce0 and sometime to ce1. I have removed ip address from below command for some reason. netstat -rn ... (3 Replies)
Discussion started by: nadeemahmed
3 Replies

10. AIX

How to re-route traffic from one port to another?

Hi Friends, How to do port forwarding in AIX? We would like to re route traffic from port A to port B on AIX LPAR. for example: my application is using 8080 port on LPAR and would like to use the 8081 instead of 8080. By default application was configured with 8080. But instead of changing... (2 Replies)
Discussion started by: System Admin 77
2 Replies
Match-all classifier in tc(8)                                          Linux                                         Match-all classifier in tc(8)

NAME
matchall - traffic control filter that matches every packet SYNOPSIS
tc filter ... matchall [ skip_sw | skip_hw ] [ action ACTION_SPEC ] [ classid CLASSID ] DESCRIPTION
The matchall filter allows to classify every packet that flows on the port and run a action on it. OPTIONS
action ACTION_SPEC Apply an action from the generic actions framework on matching packets. classid CLASSID Push matching packets into the class identified by CLASSID. skip_sw Do not process filter by software. If hardware has no offload support for this filter, or TC offload is not enabled for the inter- face, operation will fail. skip_hw Do not process filter by hardware. EXAMPLES
To create ingress mirroring from port eth1 to port eth2: tc qdisc add dev eth1 handle ffff: ingress tc filter add dev eth1 parent ffff: matchall skip_sw action mirred egress mirror dev eth2 The first command creats an ingress qdisc with handle ffff: on device eth1 where the second command attaches a matchall filters on it that mirrors the packets to device eth2. To create egress mirroring from port eth1 to port eth2: tc qdisc add dev eth1 handle 1: root prio tc filter add dev eth1 parent 1: matchall skip_sw action mirred egress mirror dev eth2 The first command creats an egress qdisc with handle 1: that replaces the root qdisc on device eth1 where the second command attaches a matchall filters on it that mirrors the packets to device eth2. To sample one of every 100 packets flowing into interface eth0 to psample group 12: tc qdisc add dev eth0 handle ffff: ingress tc filter add dev eth0 parent ffff: matchall action sample rate 100 group 12 SEE ALSO
tc(8), iproute2 21 Oct 2015 Match-all classifier in tc(8)
All times are GMT -4. The time now is 10:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy