Skip to content

Instantly share code, notes, and snippets.

@stephanschuler
Last active April 14, 2021 03:22
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephanschuler/6f1e0ef82e0fe2451b9e817a04fb432e to your computer and use it in GitHub Desktop.
Save stephanschuler/6f1e0ef82e0fe2451b9e817a04fb432e to your computer and use it in GitHub Desktop.
Connect two OpenWRT by "gretap", make both primary for one vlan and dumb ap for another.
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd88:568f:bf94::/48'
config interface 'wan'
option proto 'dhcp'
option ifname 'eth1'
config interface 'crosslink'
option proto 'dhcp'
# Of course this is only for demonstration. Use wifi and wifi client instead. But wifi client isn't covered by my example.
option ifname 'eth2'
option defaultroute '0'
option peerdns '0'
config interface 'lan10'
option type 'bridge'
option proto 'static'
option delegate '0'
option ipaddr '10.41.10.1'
option netmask '255.255.255.0'
option ifname 'eth0.10 @trunk.10'
config interface 'lan20'
option type 'bridge'
option proto 'dhcp'
option delegate '0'
option defaultroute '0'
option peerdns '0'
option ifname 'eth0.20 @trunk.20'
config interface 'tunnel'
option proto 'gretap'
option ipaddr '172.28.128.3'
option peeraddr '172.28.128.4'
option network 'trunk'
option force_link '1'
config interface 'trunk'
option type 'bridge'
option bridge_empty '1'
option igmp_snooping '1'
option force_link '1'
option proto 'none'
option auto '1'
option delegate '0'
option stp '1'
config interface 'mgmt'
option proto 'static'
option ipaddr '10.41.100.10'
option netmask '255.255.255.0'
option type 'bridge'
option ifname 'eth0.100 @trunk.100'
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd88:568f:bf93::/48'
config interface 'wan'
option proto 'dhcp'
option ifname 'eth1'
config interface 'crosslink'
option proto 'dhcp'
# Of course this is only for demonstration. Use wifi and wifi client instead. But wifi client isn't covered by my example.
option ifname 'eth2'
option defaultroute '0'
option peerdns '0'
config interface 'lan10'
option type 'bridge'
option proto 'dhcp'
option delegate '0'
option defaultroute '0'
option peerdns '0'
option ifname 'eth0.10 @trunk.10'
config interface 'lan20'
option type 'bridge'
option proto 'static'
option delegate '0'
option ipaddr '10.41.20.1'
option netmask '255.255.255.0'
option ifname 'eth0.20 @trunk.20'
config interface 'tunnel'
option proto 'gretap'
option ipaddr '172.28.128.4'
option peeraddr '172.28.128.3'
option network 'trunk'
option force_link '1'
config interface 'trunk'
option type 'bridge'
option bridge_empty '1'
option igmp_snooping '1'
option force_link '1'
option proto 'none'
option auto '1'
option delegate '0'
option stp '1'
config interface 'mgmt'
option proto 'static'
option ipaddr '10.41.100.20'
option netmask '255.255.255.0'
option type 'bridge'
option ifname 'eth0.100 @trunk.100'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment