/etc/conf.d/net :
# Freedom config in /etc/conf.d/net
# not shown internal VLAN's for server network, IOT, PC's..., wireless, guest
# internal TV VLAN is shown => vlan102
# enp1s0 - External
# - vlan4
# - vlan6
# - ppp0
# enp2s0 - Internal
# - vlan102 - TVLAN
# select dhcpcd (not dhclient)
# dhcpcd can handle both IPv4 & IPv6 PD.
modules=dhcpcd
modules_enp1s0="!plug" # hardcoded dependency, no plugable interface.
modules_enp2s0="!plug"
#enp1s0 is external interface
#enp2s0 is internal interface
#declare VLAN's
vlans_enp1s0="4 6"
vlans_enp2s0="102 ......" # internal TVLAN and some others
vlan4_name="vlan4" #TV
vlan6_name="vlan6" #PPPoE
vlan102_name="vlan102"
# setup interface config
config_enp1s0="null" #no native VLAN1
config_enp2s0="null" #no native VLAN1
config_vlan4="dhcp" #freedom.TV ==>"dhcp"
config_vlan6="null" #freedom.internet pppoe
config_vlan102="192.168.102.1/24"
routes_vlan102="224.0.0.0/4 dev vlan102"
link_ppp0="vlan6" # PPPoE requires an ethernet interface
plugins_ppp0="pppoe"
username_ppp0='fake@freedom.nl'
password_ppp0='1234'
pppd_ppp0="
updetach
persist
debug
ipv6 ,
lock
noauth
lcp-echo-interval 30
lcp-echo-adaptive
lcp-echo-failure 6
"
routes_ppp0="::/0 dev ppp0
0.0.0.0/0 dev ppp0
10.0.0.0/8 reject
172.16.0.0/12 reject
192.168.0.0/16 reject
169.254.0.0/16 reject"
###
### In case it works you can setup for baby-jumboframes... if it doesn't work just comment them away.
###
mtu_enp1s0=1508 # baby-jumbo
mtu_vlan6=1508 # baby-jumbo
mtu_vlan4=1500 # no baby-jumbo
# ensure no hardware assisted checksumming is done.. mostly causes troubles on various network cards.
preup() {
if [ "${IFACE}" = "enp1s0" ] ; then
ethtool -K ${IFACE} tx off rx off gso off tso off rxvlan off txvlan off gro off # disable hardware assisted IP checksumming
fi
}
postup() {
# this is used to register some IPv6 addresses used to terminate on lo interface.
}
#Explicit control: dependencies during startup...
vlan_start_enp1s0="no"
vlan_start_enp2s0="no"
rc_net_vlan4_need="net.enp1s0"
rc_net_vlan6_need="net.enp1s0"
rc_net_vlan6_need="net.enp2s0"
rc_net_ppp0_need="net.vlan6"
# all these interface don't actually contribute to an available network
rc_net_enp1s0_provide="!net"
rc_net_enp2s0_provide="!net"
rc_net_vlan4_provide="!net"
rc_net_vlan6_provide="!net"
rc_net_vlan102_provide="!net"
daar buiten moeten: net.vlan4, net.ppp0, net.vlan102 gestart worden tijdens boot.
symlink van net.lo → genoemde procedures maken in /etc/init.d
(Zonder TV kunnen alle regels over vlan4 en vlan102 hierboven overal weg).
In geval van TV is er een extra instelling nodig voor multicast: (mcproxy)…
/etc/mcproxy.conf:
protocol IGMPv3;
pinstance CanalDigitaal: vlan4 ==> vlan102 ;
Ook deze moet tijdens boot gestart worden: rc-update add mcproxy
dhcpcd daemon heeft ook configuratie nodig voor tv vlan en IPv6 via pppoe
/etc/dhcpcd.conf :
hostname
clientid
persistent
option rapid_commit
option interface_mtu
require dhcp_server_identifier
noipv6rs
noipv4ll
noipv6
noipv4
nohook resolv.conf, wpa_supplicant
denyinterfaces *
allowinterfaces vlan4,ppp0
interface vlan4
ipv4
noipv6
option classless_static_routes
option subnet_mask
nooption routers # no default gateway
nooption time_offset # no NTP replacement
nooption time_servers # no NTP replacement
interface ppp0
ipv6only
noipv4
ipv6
ipv6ra_noautoconf
option dhcp6_ia_pd
option dhcp6_prefix
iaid 0
Voor begin gemist en stream is ook het volgende nodig:
echo "net.netfilter.nf_conntrack_helper = 1" >> /etc/sysctl.conf
Voor direct gebruik:
sysctl -p
en ervoor zorgen dat nf_conntrack_rtsp en nf_nat_rtsp modules geladen worden bij booten.
echo >>/etc/conf.d/modules 'modules="${modules} nf_conntrack_rtsp nf_nat_rtsp"'
Voor direct gebruik:
modprobe nf_nat_rtsp
Enjoy.