2023-05-04 12:43:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. "$(dirname -- "$0")/netdev.sh"
|
|
|
|
|
|
|
|
# Physical
|
|
|
|
new_if_phys "phys0"
|
|
|
|
new_if_phys "phys1"
|
2023-09-03 10:47:28 +00:00
|
|
|
|
|
|
|
IFACE="phys2"
|
2023-05-04 12:43:14 +00:00
|
|
|
new_if_phys "phys2"
|
2023-09-03 10:47:28 +00:00
|
|
|
new_if_vlan "$IFACE-42"
|
|
|
|
new_if_vlan "$IFACE-66"
|
2023-05-04 12:43:14 +00:00
|
|
|
new_if_phys "phys3"
|
|
|
|
|
|
|
|
# Virtual
|
|
|
|
new_if_phys "vnet0"
|
|
|
|
new_if_phys "vnet1"
|
|
|
|
new_if_phys "vnet2"
|
|
|
|
new_if_phys "vnet3"
|
|
|
|
new_if_phys "vnet4"
|
|
|
|
new_if_phys "vnet5"
|
|
|
|
|
2023-09-03 10:47:28 +00:00
|
|
|
# VRFs
|
|
|
|
IFACE="vrf-dn42"
|
|
|
|
new_if_vrf "$IFACE" 20
|
2023-10-14 20:47:18 +00:00
|
|
|
if_route_vrf_default_unreach "$IFACE"
|
|
|
|
if_slave "$IFACE" "br-dn42"
|
|
|
|
if_slave "$IFACE" "famfo"
|
|
|
|
if_slave "$IFACE" "mark22k"
|
|
|
|
if_slave "$IFACE" "highdef"
|
|
|
|
if_slave "$IFACE" "kioubit"
|
|
|
|
if_slave "$IFACE" "lare"
|
|
|
|
if_slave "$IFACE" "vnet5"
|
2023-09-03 10:47:28 +00:00
|
|
|
|
|
|
|
IFACE="vrf-v6"
|
|
|
|
new_if_vrf "$IFACE" 10
|
2023-10-14 20:47:18 +00:00
|
|
|
if_route_vrf_default_interface "$IFACE" "intersix"
|
2023-10-15 12:21:58 +00:00
|
|
|
if_route_vrf_sink_unreach "$IFACE" "2a04:5b81:2060::/48"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_slave "$IFACE" "intersix"
|
|
|
|
if_slave "$IFACE" "b00b"
|
|
|
|
if_slave "$IFACE" "f33d"
|
|
|
|
if_slave "$IFACE" "d00d"
|
2023-09-03 10:47:28 +00:00
|
|
|
|
2023-05-04 12:43:14 +00:00
|
|
|
# Bridges
|
2023-09-03 10:47:28 +00:00
|
|
|
IFACE="home"
|
|
|
|
new_if_bridge "$IFACE"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_bridge_property 'stp_state' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_router' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_snooping' "$IFACE" '0' '' # TODO: Remove such entries when bridges play well with multicasting
|
|
|
|
if_bridge_property 'mcast_querier' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
2023-10-15 12:21:58 +00:00
|
|
|
if_dhcp "$IFACE"
|
|
|
|
if_forward "$IFACE"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_slave "$IFACE" "vnet1"
|
|
|
|
if_slave "$IFACE" "phys3"
|
|
|
|
if_slave "$IFACE" "phys2"
|
2023-05-04 12:43:14 +00:00
|
|
|
|
2023-09-03 10:47:28 +00:00
|
|
|
IFACE="br-dn42"
|
|
|
|
new_if_bridge "$IFACE"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_slave "$IFACE" "phys2-42"
|
2023-05-04 12:43:14 +00:00
|
|
|
|
2023-09-03 10:47:28 +00:00
|
|
|
IFACE="f33d"
|
|
|
|
new_if_bridge "$IFACE"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_bridge_property 'stp_state' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_router' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_snooping' "$IFACE" '0' ''
|
|
|
|
if_bridge_property 'mcast_querier' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
|
|
|
if_ether_address "$IFACE" '02:00:00:00:f3:3d'
|
|
|
|
if_ip_addr "$IFACE" "2a04:5b81:2060:f33d::1/64"
|
|
|
|
if_slave "$IFACE" "vnet2"
|
2023-05-04 12:43:14 +00:00
|
|
|
|
2023-09-03 10:47:28 +00:00
|
|
|
IFACE="b00b"
|
|
|
|
new_if_bridge "$IFACE"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_bridge_property 'stp_state' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_router' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_snooping' "$IFACE" '0' ''
|
|
|
|
if_bridge_property 'mcast_querier' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_stats_enabled' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
|
|
|
if_ether_address "$IFACE" '02:00:00:00:b0:0b'
|
|
|
|
if_ip_addr "$IFACE" "2a04:5b81:2060:b00b::1/64"
|
|
|
|
if_slave "$IFACE" "vnet0"
|
|
|
|
if_slave "$IFACE" "vnet4"
|
|
|
|
if_slave "$IFACE" "phys2-66"
|
2023-05-04 12:43:14 +00:00
|
|
|
|
2023-09-03 10:47:28 +00:00
|
|
|
IFACE="d00d"
|
|
|
|
new_if_bridge "$IFACE"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_bridge_property 'stp_state' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_router' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_snooping' "$IFACE" '0' ''
|
|
|
|
if_bridge_property 'mcast_querier' "$IFACE"
|
|
|
|
if_bridge_property 'mcast_mld_version' "$IFACE" '2' ''
|
|
|
|
if_ether_address "$IFACE" '02:00:00:00:d0:0d'
|
|
|
|
if_ip_addr "$IFACE" "2a04:5b81:2060:d00d::1/64"
|
|
|
|
if_slave "$IFACE" "vnet3"
|
2023-05-04 12:43:14 +00:00
|
|
|
|
|
|
|
# Wireguard
|
|
|
|
new_if_wg "famfo"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_ip_addr "famfo" "fe80::1422:1/64"
|
2023-05-04 12:43:14 +00:00
|
|
|
new_if_wg "kioubit"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_ip_addr "kioubit" "fe80::2/64"
|
2023-05-04 12:43:14 +00:00
|
|
|
new_if_wg "highdef"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_ip_addr "highdef" "fe80::2/64"
|
2023-05-04 12:43:14 +00:00
|
|
|
new_if_wg "mark22k"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_ip_addr "mark22k" "fe80::4546/64"
|
2023-05-04 12:43:14 +00:00
|
|
|
new_if_wg "lare"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_ip_addr "lare" "fe80::2/64"
|
2023-05-04 12:43:14 +00:00
|
|
|
new_if_wg "intersix"
|
2023-10-14 20:47:18 +00:00
|
|
|
if_ip_addr "intersix" "fe80::2/64"
|
|
|
|
if_ip_addr "intersix" "2a04:5b80:ffff:ff0b::2/64"
|