Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to assign separate subnets for each interface?
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
fargred
n00b
n00b


Joined: 19 Oct 2010
Posts: 66

PostPosted: Wed May 28, 2014 12:07 am    Post subject: How to assign separate subnets for each interface? Reply with quote

I have eth1 — WAN interface, and br0 which binds eth0, wlan0 (with the help of hostapd) and tap0 (for virtual machines via vde_switch) And I have organized a LAN with NAT for these things. There are three ranges in dnsmasq config
Code:
dhcp-range=set:wired,192.168.0.2,192.168.0.6,255.255.255.248,12h
dhcp-range=set:virtual,192.168.0.10,192.168.0.14,255.255.255.248,12h
dhcp-range=set:wireless,192.168.0.18,192.168.0.30,255.255.255.240,12h

A compact network with two /29 subnets and one /28 (which actually spans over two /29 subnets). 6+6+12 hosts, enough for me. The problem is, it’s easier to set rules on the whole LAN in iptables having a bridge, but since all the gateways (192.168.0.1/29, 192.168.0.9/29 and 192.168.0.17/28) assigned to br0, dnsmasq gives out addresses randomly (though as far as I can see, it prefers the /28 network), so… how to set subnets per interface? I’d actually like to set up VLAN, but I am not sure which interface should I take to split the LAN (bridge or those it comprises?) and don’t quite understand how it should look like.

[IMG]http://images.netbynet.ru/thumbs/e73660761cf5326ef9873f66b1a31ac3.png[/IMG]
This is how the net looks now.

[IMG]http://images.netbynet.ru/thumbs/8a9850ffbf75df841913738f645dcf22.png[/IMG]
Is the bridge really needed? If not, what its VLAN alternative could be?

[IMG]http://images.netbynet.ru/thumbs/6ec9aca1854281e81be1f715392fdc44.png[/IMG]
Or we just assign segments of the /24 net to VLAN ports of br0, but how those parts would be linked to eth0, wlan0, tap0?
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