-| | ${args}= | Traffic Script Gen Arg | ${dst_int} | ${src_int} | ${src_mac}
-| | | ... | ${dst_mac} | ${src_ip} | ${dst_ip}
+| | ${src_int_name}= | Get interface name | ${tg_node} | ${src_int}
+| | ${dst_int_name}= | Get interface name | ${tg_node} | ${dst_int}
+| | ${args}= | Traffic Script Gen Arg | ${dst_int_name} | ${src_int_name}
+| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip}
+| | ${args1}= | Run Keyword Unless | '${encaps}' == '${EMPTY}' | Catenate
+| | ... | --encaps ${encaps} | --vlan1 ${vlan1}
+| | ${args2}= | Run Keyword Unless | '${vlan2}' == '${EMPTY}' | Set Variable
+| | ... | --vlan2 ${vlan2}
+| | ${args}= | Run Keyword If | '${args1}' == 'None' | Set Variable | ${args}
+| | ... | ELSE IF | '${args2}' == 'None' | Catenate | ${args} | ${args1}
+| | ... | ELSE | Catenate | ${args} | ${args1} | ${args2}