我通过以下方式设置了一些虚拟IP:
~# ip link add link eth0 name eth0.1 address 11:22:33:44:55:66 type macvlan
~# ifconfig eth0.1 10.10.0.0/24
我使用以下代码从它连接:
^{pr2}$
如果IFACE是eth0,这很好,但它不会过去sTCP.连接在eth0.2上的bindtodevice(如预期)中失败。在
为什么eth0.1不起作用?这是python问题,还是linux网络实现中的问题?在
Tags:
我刚在我的Fedora13系统上试了一下,效果很好。我做了一些修改,使它在我的系统上工作,希望这能给你一些线索。使用的代码:
我用tcpdump向自己证明包是从eth0.1发出的。也许你遇到了VLAN问题?在客户机和服务器上运行数据包捕获,以查看网络上实际发生了什么。在
相关问题 更多 >
编程相关推荐