Vconfig command to get through the directly connected network
The two networks of 192.168.1.0 amp 24 and 172.16.2.0 amp 24 are on the same switch and have different vlan. I want a machine on 192.168.1.0 amp 24 to be able to access the machines of 172.16.2.0max 24.
Use the vconfig command as follows:
Vconfig add eth0 1024
Ifconfig eth0.1024 172.16.2.9/24
Where 1024 is the corresponding vlan number of 172.16.2.0Compact 24 on the switch, and 172.16.2.9 is the ip that has not been assigned in this network segment.