Create 2 subnetworks

Report problems and success stories with Gargoyle on various hardware platforms.

Moderator: Moderators

Post Reply
nathan974
Posts: 28
Joined: Fri Jun 09, 2023 12:01 pm

Create 2 subnetworks

Post by nathan974 »

hello currently under gargoyle x86 1.14 I have 2 bridge connection interfaces but I would like to segment my network into 2 different subnetworks:
eth0 = wan ip of my router in 192.168.1.10
eth1 = lan1 in 10.0.0.1
eth2 = lan2 in 10.0.1.1

The problem is that when I do it it works for eth2 but eth1 loses the connection.
what should I do to make it work?
Thanks in advance .

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Create 2 subnetworks

Post by Lantis »

Well what have you tried? Can you share the config changes you've made?

You will need to make the following changes:
- Network
- Establish a bridge device "brlan2_dev", including the eth devices you want. Remove it from the regular brlan_dev
- Establish a new interface 'lan2' which uses br-lan2 as the device
- Set the appropriate ipaddr

- DHCP
- Establish a new dhcp stanza for 'lan2' (it can probably be a direct copy of 'lan', with the interface referencing 'lan2'

- Firewall
- If you want lan2 and lan to communicate with each other, add lan2 to the existing 'lan' zone (via list network). Otherwise set up a new zone for lan2
- Set up a forwarding config between lan2 and wan


That's the basics, i might have missed something but that's a start.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

nathan974
Posts: 28
Joined: Fri Jun 09, 2023 12:01 pm

Re: Create 2 subnetworks

Post by nathan974 »

Hello Lantis
What I did looks like this but it doesn't work.

DHCP:
config dhcp 'lan' 'lan2'
option interface 'lan' 'lan2'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'


BRIDGE:
config device 'brlan2_dev'
option name 'br-lan2'
option type 'bridge'
list ports 'eth2'


INTERFACE:
config interface 'lan2'
option device 'br-lan2'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '10.0.1.1'
option ip6ifaceid '::1'
option dns '8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844'

FIREWALL:
config zone
option name 'lan2'
list network 'lan2'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'

config forwarding
option src 'lan2'
option dest 'wan'

nathan974
Posts: 28
Joined: Fri Jun 09, 2023 12:01 pm

Re: Create 2 subnetworks

Post by nathan974 »

I am obliged to create a second bridge for it to work?? Can we do like in Debian??

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Create 2 subnetworks

Post by Lantis »

Yes you must create a second bridge.
Your DHCP config looks wrong.
Take a full copy of the default dhcp 'lan' stanza, paste it again and change it to refer to 'lan2' for the interface. It will also need another name for the second (lan2 will suffice).
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

nathan974
Posts: 28
Joined: Fri Jun 09, 2023 12:01 pm

Re: Create 2 subnetworks

Post by nathan974 »

ok thank,
I will try that and everything else is ok?

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Create 2 subnetworks

Post by Lantis »

It looked alright to me
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply