Je moet een switch hebben die IGMP Snooping ondersteunt. Ik heb een GS105E zo ingesteld dat de poorten op VLAN 4 zitten en getagged zijn. Daarachter zit mijn settop box.
Daarnaast 2x hetzelfde bestand in /config/scripts/post-config.d/tvroute.sh en
in /config/scripts/tvroute.sh (nieuwe file):
#!/bin/vbash
# configured static route
# target
CUR_IP=$(cat /config/config.boot | grep 213.75.112.0/21 -A1 | grep next-hop | awk '{ print $2}');
# static route target
NEW_IP=$(cat /var/run/dhclient_eth0.4_lease | grep new_routers | awk -F= '{print $2}' | tr -d \');
if [ "$CUR_IP" = "$NEW_IP" ]; then
echo Addresses the same
exit 1; fi
source
/opt/vyatta/etc/functions/script-template
configure
delete protocols static route 213.75.112.0/21 next-hop $CUR_IP
set protocols static route 213.75.112.0/21 next-hop $NEW_IP
commit
save
exit
restart igmp-proxy
Deze rechten +x geven
en
met
configure
set system task-scheduler task updateIPTVroute executable path /config/scripts/tvroute.sh
set system task-scheduler task updateIPTVroute interval 5m
commit
save
exit
automatisch laten draaien.
Mijn config.gateway.json
{
"interfaces": {
"ethernet": {
"eth0": {
"description": "eth0 - FTTH",
"duplex": "auto",
"speed": "auto",
"vif": {
"4": {
"address": [
"dhcp"
],
"description": "eth0.4 - IPTV",
"dhcp-options": {
"client-option": [
"send vendor-class-identifier "IPTV_RG";",
"request subnet-mask, routers, rfc3442-classless-static-routes;"
],
"default-route": "no-update",
"default-route-distance": "210",
"name-server": "update"
}
},
"6": {
"description": "eth0.6 - Internet",
"firewall": {
"in": {
"name": "WAN_IN"
},
"local": {
"name": "WAN_LOCAL"
},
"out": {
"name": "WAN_OUT"
}
},
"pppoe": {
"2": {
"default-route": "none",
"firewall": {
"in": {
"name": "WAN_IN"
},
"local": {
"name": "WAN_LOCAL"
},
"out": {
"name": "WAN_OUT"
}
},
"mtu": "1492",
"name-server": "none",
"password": "kpn",
"user-id": "macadress@internet"
}
}
}
}
},
"eth1": {
"description": "eth1 - LAN",
"address": [
"192.168.2.1/24"
],
"duplex": "auto",
"firewall": {
"in": {
"name": "LAN_IN"
},
"local": {
"name": "LAN_LOCAL"
},
"out": {
"name": "LAN_OUT"
}
},
"speed": "auto"
},
"eth2": {
"disable": "''",
"duplex": "auto",
"speed": "auto"
}
},
"loopback": {
"lo": "''"
}
},
"protocols": {
"igmp-proxy": {
"interface": {
"eth0.4": {
"alt-subnet": [
"0.0.0.0/0"
],
"role": "upstream",
"threshold": "1"
},
"eth1": {
"alt-subnet": [
"0.0.0.0/0"
],
"role": "downstream",
"threshold": "1"
}
}
},
"static": {
"interface-route": {
"0.0.0.0/0": {
"next-hop-interface": {
"pppoe2": {
"distance": "1"
}
}
}
},
"route": {
"213.75.112.0/21": {
"next-hop": {
"10.254.128.1": "''"
}
}
}
}
},
"port-forward": {
"auto-firewall": "enable",
"hairpin-nat": "enable",
"lan-interface": [
"eth1"
],
"wan-interface": "pppoe2"
},
"service": {
"nat": {
"rule": {
"5000": {
"description": "MASQ corporate_network to IPTV network",
"destination": {
"address": "213.75.112.0/21"
},
"log": "disable",
"outbound-interface": "eth0.4",
"protocol": "all",
"type": "masquerade"
},
"6001": {
"description": "MASQ corporate_network to WAN",
"log": "disable",
"outbound-interface": "pppoe2",
"protocol": "all",
"source": {
"group": {
"network-group": "corporate_network"
}
},
"type": "masquerade"
},
"6002": {
"description": "MASQ remote_user_vpn_network to WAN",
"log": "disable",
"outbound-interface": "pppoe2",
"protocol": "all",
"source": {
"group": {
"network-group": "remote_user_vpn_network"
}
},
"type": "masquerade"
},
"6003": {
"description": "MASQ guest_network to WAN",
"log": "disable",
"outbound-interface": "pppoe2",
"protocol": "all",
"source": {
"group": {
"network-group": "guest_network"
}
},
"type": "masquerade"
}
}
}
}
}
Voor voip moet je vergelijkbaar instellen alleen dan vlan 7. Vergelijkbaar instellen qua IGMP snooping en je sip-telefoon je instellingen configureren. Maar helaas wil KPN die nog steeds niet vrijgeven. Schijnbaar zijn deze met wireshark te achterhalen, maar het is mij nog niet gelukt. (al heb ik ook geen idee hoe wireshark werkt...)