Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My question is similar to this question, however with some change.

I have a PPPoE connection on my Linux Machine (CentOS kernal 2.6.32) as a client, so that when I setup this connection, another virtual tunnel interface comes up, i.e., ppp0

This connection is setup over existing the physical interface eth0. Now what I want is to create another virtual interface (Ethernet type not ppp type) and somehow map it (bridge) to this ppp0 interface, so that if I route the traffic to this virtual interface, it is in turn routed to this ppp0 interface and vice versa.

EDIT:

Have a look at this scenario:
enter image description here
Now originally what is happenening is that traffic from eth0 (LAN) should be able to exit depending upon routing to ppp0 or eth1 interface. However due to some limitation what i want is having a virtual tap interface and then reroute traffic from this itnerface to ppp0, so that the routing rule will select either eth1 or tap0, while tap0 will inturn use ppp0 interface:
enter image description here
Can you please tell me how I can do this, thanks.

share|improve this question
    
What are you actually trying to do ? your virtual interface could send data, but will never be able to receive data: The kernel has to decide somehow if received packets should be received via ppp0 or via your virtual interface. Without any additional information, the kernel can't know. –  BatchyX Jan 24 '13 at 18:48
    
@BatchyX, so how can i do it? My problem is i am using openflow to control switching traffic between the ports and current standard does not support tunnels. I was thinking if i can come up with a tap device and somehow reroute all outgoing and incoming traffic from ppp0 to this and then using this tap device as outgoing port, won't it work? any other idea in this direction, all i need is an ether interface to send traffic which in turn should be fwded to ppp0 to outside and return vice versa, won't source NAT help here?? –  pppoe Jan 25 '13 at 13:37
    
From what i see on Wikipedia: "OpenFlow is a Layer 2 communications protocol". ppp gives you a layer 3 protocol: IP. You basically have a interface which can not carry layer 2 information. To go from layer 2 to layer 3 can be done by discarding the layer 2, but on the other way around, you have to actually fill the layer2 part, via routing or whatever. There are plenty of hacks to workaround that, but we need more information about openflow to know Whether it can actually work with these hacks. –  BatchyX Jan 25 '13 at 20:03
    
hi @BatchyX, actually openflow protocol has nothing to do with what i want here. Openflow is used between a controller (software running on linux e.g) and an openflow-switch (hardware switch or software switch e.g linux machine which i am using). It just send control commands to direct this switch (linux machine in my case) to perform actions on packets (based on mac addr, vlan tags, port, ip, etc etc). I just want to redirect traffic from tap0 (ethernet interface) to ppp interface and vice versa, pls look up the picture iv'e edited the question, hope it helps, thank you –  pppoe Feb 6 '13 at 14:13
add comment

1 Answer

The simplest way would be to assign your PPP Endpoints IP Adresses and set up OpenVPN with tap devices.

To answer the new/extented question in the comment to use openvpn without encryption:

The short answer is add "cipher none" to the config file disable decryption. To disable authentication, you'd add "auth none".

quoted from the very first hit when asking Google for "openvpn no encryption", quoting the man page. (cf. OpenVPN ML archive)

share|improve this answer
    
Thanks but is there any different way of dong it without encrypting the traffic inside pppoe tunnel? –  pppoe Jan 24 '13 at 15:14
    
can you give me little detail? if i understood correctly you are talking about setting up openvpn at ppp end points, meaning at my machine and the remote ppp server or anywhere at some remote destination on internet. However my situation is that i do not have access to ISP ppp server end, just that a tunnel origninates from my linux box to remote isp. So that i want to use ethernet instead of ppp interface as outgoing link on same machine, would in this scenario openvpn work? Is it like setting up vpn between two interfaces on same machine????? –  pppoe Jan 25 '13 at 13:50
    
Yes, a tunnel is always between two endpoints. If you do not want to connect two endpoints then what do you want to do with "another virtual interface (Ethernet type not ppp type)". What is wrong with your ppp0 device that you do not want to use it? –  Bananguin Jan 25 '13 at 14:42
    
there is nothing wrong with ppp0, only problem is i am creating a virtual switch (this linux machine with ppp0 interface), and current specs (www.opennetworking.org/standards/intro-to-openflow) do not support tunnels only ethernet interface. So what i want is to map ethernet to ppp0 and use this ethernet for switching purpose as workaround. I hope you understand the problem, in this scenario i want is to redirect traffic from this virtual ethernet to ppp0 interface and vice versa, do you think is there anyway to do it? –  pppoe Jan 25 '13 at 16:03
    
I think yes, but still need more information. Edit your question to include the entire setup: the internet, the box you want openflow on, the other box(es?) that generate flows. Is that a real research project? –  Bananguin Jan 25 '13 at 18:25
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.