1ãé¦å
æå¼æç§æ¨¡æå¨è½¯ä»¶ï¼æ¾åºä¸å°ä¸å±äº¤æ¢æºå两å°PCã
2ãå°ä¸å±äº¤æ¢æºå两å°PCç¨ç´é线è¿æ¥èµ·æ¥ã
3ãå¨ä¸å±äº¤æ¢æºä¸ååVLANï¼å½ä»¤æ¯ï¼
å¤å¶å
容å°åªè´´æ¿
Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int f0/5Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 1Switch(config-if)#int f0/6Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 2
4ãå¼å¯ä¸å±äº¤æ¢æºçä¸å±äº¤æ¢è·¯ç±åè½ï¼å½ä»¤æ¯ï¼ip routingã
5ãç»PCé
ç½®IPå°ååç½å
³ã
6ãè¿å
¥ä¸å±äº¤æ¢æºéé¢é
ç½®VLANï¼å½ä»¤æ¯ï¼
å¤å¶å
容å°åªè´´æ¿
Switch(config)#int vlan 1Switch(config-if)#no shutSwitch(config-if)#ip add 172.16.10.1 255.255.255.0Switch(config-if)#int vlan 2 Switch(config-if)#no shutSwitch(config-if)#ip add 172.16.20.1 255.255.255.0
7ãå©ç¨pingå½ä»¤å¯¹PCä¹é´è¿è¡éä¿¡æµè¯ï¼å¯ä»¥pingéçç»æã
注æäºé¡¹ï¼
1ãé
ç½®PCæ¶ä¸å®è¦è®©å®ä»¬å¤äºä¸åIPåç½å
³ã
2ãé
ç½®ä¸å±äº¤æ¢æºçVLANï¼è¦è®©å®ä»¬çVLAN为PCä¹é´çç½å
³ï¼åè®°ï¼è¿å¾éè¦ã
3ãä¸å±äº¤æ¢æºä¸å®è¦å¼å¯è·¯ç±åè½ï¼å½ä»¤æ¯âip routing"ã
4ãé
ç½®ä¸å±äº¤æ¢æºä¸å®è¦å¨å
¨å±æ¨¡å¼ä¸é
ç½®ã
温馨提示:答案为网友推荐,仅供参考