|
|
@ -10,13 +10,14 @@ def get_onu_template(vlan_id: int, mac_addr: str): |
|
|
'tcont 1 profile HSI_100', |
|
|
'tcont 1 profile HSI_100', |
|
|
'gemport 1 unicast tcont 1 dir both', |
|
|
'gemport 1 unicast tcont 1 dir both', |
|
|
'switchport mode hybrid vport 1', |
|
|
'switchport mode hybrid vport 1', |
|
|
'switchport vlan %d tag vport 1' % vlan_id, |
|
|
|
|
|
|
|
|
'service-port 1 vport 1 user-vlan %d vlan %d' % (vlan_id, vlan_id), |
|
|
'port-location format flexible-syntax vport 1', |
|
|
'port-location format flexible-syntax vport 1', |
|
|
'port-location sub-option remote-id enable vport 1', |
|
|
'port-location sub-option remote-id enable vport 1', |
|
|
'port-location sub-option remote-id name %s vport 1' % mac_addr, |
|
|
'port-location sub-option remote-id name %s vport 1' % mac_addr, |
|
|
'dhcp-option82 enable vport 1', |
|
|
'dhcp-option82 enable vport 1', |
|
|
'dhcp-option82 trust true replace vport 1', |
|
|
'dhcp-option82 trust true replace vport 1', |
|
|
'ip dhcp snooping enable vport 1' |
|
|
|
|
|
|
|
|
'ip dhcp snooping enable vport 1', |
|
|
|
|
|
'ip-service ip-source-guard enable sport 1' |
|
|
) |
|
|
) |
|
|
return template |
|
|
return template |
|
|
|
|
|
|
|
|
|