ip link add link enahisic2i3 name enahisic2i3.101 type vlan id 101
ip a add 192.168.12.81/24 dev enahisic2i3.101 ip a add 192.168.12.82/24 dev enahisic2i3.101
ip a add 192.168.12.81/24 dev enahisic2i3.101
[root@bogon ~]# ping 192.168.12.82 -i 2
PING 192.168.12.82 (192.168.12.82) 56(84) bytes of data.
64 bytes from 192.168.12.82: icmp_seq=1 ttl=64 time=0.073 ms
64 bytes from 192.168.12.82: icmp_seq=2 ttl=64 time=0.073 ms
64 bytes from 192.168.12.82: icmp_seq=3 ttl=64 time=0.056 ms
64 bytes from 192.168.12.82: icmp_seq=4 ttl=64 time=0.079 ms
64 bytes from 192.168.12.82: icmp_seq=5 ttl=64 time=0.084 ms
64 bytes from 192.168.12.82: icmp_seq=6 ttl=64 time=0.080 ms
^C
--- 192.168.12.82 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 10380ms
rtt min/avg/max/mdev = 0.056/0.074/0.084/0.010 ms
[root@kunpeng82 devuser]# tcpdump -i enahisic2i3 -env vlan 101 tcpdump: listening on enahisic2i3, link-type EN10MB (Ethernet), capture size 262144 bytes 15:09:58.933356 48:57:02:64:ea:1e > 48:57:02:64:e7:ae, ethertype 802.1Q (0x8100), length 102: vlan 101, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 34406, offset 0, flags [DF], proto ICMP (1), length 84) 192.168.12.81 > 192.168.12.82: ICMP echo request, id 39937, seq 4, length 64 15:10:01.013378 48:57:02:64:ea:1e > 48:57:02:64:e7:ae, ethertype 802.1Q (0x8100), length 102: vlan 101, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 34508, offset 0, flags [DF], proto ICMP (1), length 84) 192.168.12.81 > 192.168.12.82: ICMP echo request, id 39937, seq 5, length 64 ^C 2 packets captured 3 packets received by filter 0 packets dropped by kernel 4 packets dropped by interface
无法通信,