在linux中虚拟网卡,可以在/etc/network/interface里加,但是不能改MAC地址。在网上搜到了下面的文章,需要装一下vlan,挺好用的。
-------------------------------------------------------------------------------------
eth0.2
- Implements 802.1Q VLAN spec.
- Can support up to 4094 VLANs per ethernet interface.
- Scales well in critical paths: O(n), where n is the number of PHYSICAL ethernet interfaces, and that is only on ingress. O(1) in every other critical path, as far as I know.
- Supports MULTICAST
- Can change MAC address of VLAN.
- Multiple naming conventions supported, and adjustable at runtime.
- Optional header-reordering, to make the VLAN interface look
JUST LIKE an Ethernet interface. This fixes some problems with DHCPd and anything else that uses a SOCK_PACKET socket. Default setting is off, which works for every other protocol I know about, and is slightly faster.
本文介绍如何在Linux系统中通过mac-vlan技术实现在单一网卡上模拟多个具有不同MAC地址的虚拟网卡。主要步骤包括加载8021q模块、配置VLAN以及设置IP和MAC地址。

14万+

被折叠的 条评论
为什么被折叠?



