I'm developing a Python script to work as a TCP client on a Windows PC in this way:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(5.0)
s.connect((Se9ver_Ip, 13400))
The outgoing Ethernat packet is of type 0x8000 (IPv4), while the opposite server shall receive the packet on a VLAN.
I need to add the VLAN tagging for the underlying Ethernet frame from the client script, so that all exchanges with the server shall be based on a VLAN.
- How can I configure the underlying Ethernet frames to have a VLAN tag?
- Does Windows support sending out VLAN-tagged Ethernet frames?
question from:
https://stackoverflow.com/questions/65906535/how-to-add-vlan-tag-to-outgoing-ethernet-frames-from-a-python-client 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…