Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems creating 2 tap devices and getting dhcp addresses
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
JohnnyGr
n00b
n00b


Joined: 22 Mar 2005
Posts: 5

PostPosted: Thu Mar 06, 2008 9:01 am    Post subject: Problems creating 2 tap devices and getting dhcp addresses Reply with quote

Hi, Im having some troubles when creating two tap devices and bridging them with eth0 wich is my internet interface.

The following is what im trying to accomplish:
Code:



                /---- tap0 (dhcp) --- iptables forward to eth1 --- Lan
              /
ISP --- eth0 (bridge with tap0/1)
              \
                \---- tap1 (dhcp) --- iptables forward to eth2 --- DMZ




My config looks like this:

Code:

tuntap_tap0="tap"
tuntap_tap1="tap"

mac_tap0="random-samekind"
mac_tap1="random-samekind"

config_eth0=( "null" )
bridge_br0="eth0 tap0 tap1"
config_br0=( "null" )

config_tap0=( "dhcp" )
config_tap1=( "dhcp" )
dhcp_tap1="release nodns nontp nonis"

RC_NEED_br0="net.eth0 net.tap0 net.tap1"

config_eth1=( "192.168.xx1.xxx netmask 255.255.255.0" )
config_eth2=( "192.168.xx2.xxx netmask 255.255.255.0" )



AFAIK this is the proper way to do it, but when requesting an ip and running tcpdump on eth0 i cant see any dhcp requests going out
if i tcpdump och tap1 for example i can see the dhcp requests on that interface.

If anyone have any idea on how to make things work i would appriciate any help i can get... Thank you.
Back to top
View user's profile Send private message
sf_alpha
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2002
Posts: 136
Location: Bangkok, TH

PostPosted: Thu Mar 06, 2008 10:11 am    Post subject: Reply with quote

I quite not understand how you forward tap1 to eth1 using iptables.

But you can only have DHCP enable on bridge interfaces (br0) not interfaces participating bridge.
_________________
Gentoo Mirrors in Thailand (and AP)
http://gentoo.in.th
Back to top
View user's profile Send private message
JohnnyGr
n00b
n00b


Joined: 22 Mar 2005
Posts: 5

PostPosted: Thu Mar 06, 2008 6:35 pm    Post subject: Reply with quote

Oh? After what i have read i was under the impression that the tap interfaces was virtual network adapters, and the bridge was a way to tell them wich interface they were connected to.

And by being virtual network adapters i thought i could just NAT traffic from tap0 or tap1 to any interface i wanted.

But since that doesnt seem to be the case, do you have any other suggestion on what i should look for to accomplish what i need?

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum