<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
88.61連接到交換機的1口,作爲vlan服務器,88.60連接到交換機3口,作爲客戶機。
1)在88.61上安裝rh9,內核版本爲<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />2.4.20-8,下載並安裝vlan的安裝包。
2)在服務器端執行:
#vconfig add eth0 1
#ifconfig eth0.1 192.168.88.65
在交換機上以IEEE802.1Q劃分vlan,將1口選擇上tag 在3口上untag,並且1,3口都在vlan1中,此時使用ping命令在兩臺計算機之間相互通訊,顯示通訊正常。
其他:
ifconfig –a查看網卡狀態。
ifconfig –a | grep Hwaddr | grep ‘/.’ | awk ‘{print $1}’ 得到vlan狀態