配置eth0 ip 192.168.1.180 netmask 255.255.255.0和电脑(192.168.1.200)能正常通信,使用以下命令配置eth0.2的vlan后,电脑端修改网卡对应的ip(改为192.168.2.200)和vlan id(改为2)后,不能ping通,请帮忙分析一下,谢谢
ip link add link eth0 name eth0.2 type vlan id 2
ip link
ip -d link show eth0.2
ip addr add 192.168.2.180/24 brd 192.168.2.255 dev eth0.2
ip link set dev eth0.2 up
软件版本:
root@hobot:~# cat /etc/version
@c6aeb130-8c9f-47bc-b953-23e186fcaf11-8lwjt-vmjpx debug 20240409-130831


