µ¥±Û·ÓÉ
¡¡¡¡Ä¿±ê£ºÍ¨¹ý·ÓÉÆ÷½øÐжà¸öVLAN»¥Áª
¡¡¡¡»·¾³£º1. ½»»»»úΪ¶þ²ã½»»»»ú£¬Ö§³ÖVLAN»®·Ö£»2. ·ÓÉÆ÷Ö»ÓÐ1¸öEthernet½Ó¿Ú
¡¡¡¡ÊµÊ©£º²ÉÓõ¥±Û·ÓÉ£¬¼´ÔÚ·ÓÉÆ÷ÉÏÉèÖöà¸öÂß¼×Ó½Ó¿Ú£¬Ã¿¸ö×Ó½Ó¿Ú¶ÔÓ¦ÓÚÒ»¸öVLAN¡£ÓÉÓÚÎïÀí·ÓɽӿÚÖ»ÓÐÒ»¸ö£¬¸÷×Ó½Ó¿ÚµÄÊý¾ÝÔÚÎïÀíÁ´Â·ÉÏ´«µÝÒª½øÐбê¼Ç·â×°¡£CiscoÉ豸֧³ÖISLºÍ802.1qÐÒé¡£»ªÎªÉ豸ֻ֧³Ö802.1q¡£
¡¡¡¡µ¥±Û·ÓɵÄÅäÖÃʵÀý
¡¡¡¡2600 IOSÐèÇó£ºIP Plus (c2600-ik8s-mz-122.15.T.bin)
¡¡¡¡Current configuration:
¡¡¡¡!
¡¡¡¡version 12.1
¡¡¡¡service timestamps debug uptime
¡¡¡¡service timestamps log uptime
¡¡¡¡no service password-encryption
¡¡¡¡!
¡¡¡¡hostname c2600
¡¡¡¡!
¡¡¡¡no logging console
¡¡¡¡enable password mysecret
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡ip subnet-zero
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡interface FastEthernet0/0
¡¡¡¡no ip address
¡¡¡¡duplex auto
¡¡¡¡speed auto
¡¡¡¡!
¡¡¡¡interface FastEthernet0/0.1
¡¡¡¡encapsulation isl 1
¡¡¡¡ip address 10.10.10.1 255.255.255.0
¡¡¡¡no ip redirects
¡¡¡¡!
¡¡¡¡!-- If 802.1Q is configured,
¡¡¡¡!-- you will instead see the following output
¡¡¡¡!-- under interface FastEthernet0/0.1:
¡¡¡¡!-- interface FastEthernet0/0.1
¡¡¡¡!-- encapsulation dot1Q 1 native
¡¡¡¡!-- ip address 10.10.10.1 255.255.255.0
¡¡¡¡!
¡¡¡¡!
¡¡¡¡interface FastEthernet0/0.2
¡¡¡¡encapsulation isl 2
¡¡¡¡ip address 10.10.11.1 255.255.255.0
¡¡¡¡no ip redirects
¡¡¡¡!
¡¡¡¡!-- If 802.1Q is configured,
¡¡¡¡!-- you will instead see the following output
¡¡¡¡!-- under interface FastEthernet0/0.2:
¡¡¡¡!-- interface FastEthernet0/0.2
¡¡¡¡!-- encapsulation dot1Q 2
¡¡¡¡!-- ip address 10.10.11.1 255.255.255.0
¡¡¡¡!
¡¡¡¡interface FastEthernet0/1
¡¡¡¡no ip address
¡¡¡¡shutdown
¡¡¡¡duplex auto
¡¡¡¡speed auto
¡¡¡¡!
¡¡¡¡ip classless
¡¡¡¡no ip http server
¡¡¡¡!
¡¡¡¡!
¡¡¡¡!
¡¡¡¡line con 0
¡¡¡¡transport input none
¡¡¡¡line aux 0
¡¡¡¡line vty 0 4
¡¡¡¡password mysecret
¡¡¡¡login
¡¡¡¡!
¡¡¡¡no scheduler allocate
¡¡¡¡end
¡¡¡¡»ªÎªÂ·ÓÉÆ÷µ¥±Û·ÓÉ
¡¡¡¡ÐèÇó:ÔÚ¾ÖÓòÍøÖÐ,ͨ¹ý½»»»»úÉÏÅäÖÃVLAN¿ÉÒÔ¼õÉÙÖ÷»úͨÐŹ㲥ÓòµÄ·¶Î§,µ±VLANÖ®¼äÓв¿·ÖÖ÷»úÐèҪͨÐÅ,µ«½»»»»ú²»Ö§³ÖÈý²ã½»»»Ê±,¿ÉÒÔ²ÉÓÃһ̨ Ö§³Ö802.1QµÄ·ÓÉÆ÷ʵÏÖVLANµÄ»¥Í¨.ÕâÐèÒªÔÚÒÔÌ«¿ÚÉϽ¨Á¢×Ó½Ó¿Ú,·ÖÅäIPµØÖ·×÷Ϊ¸ÃVLANµÄÍø¹Ø,ͬʱÆô¶¯802.1Q.
¡¡¡¡×éÍø:·ÓÉÆ÷E0¶Ë¿ÚÓë½»»»»úµÄÉÏÐÐtrunk¶Ë¿Ú(µÚ24¶Ë¿Ú)ÏàÁ¬,½»»»»úÏÂÐпڻ®·Ö3¸öVLAN,´øÈô¸ÉÖ÷»ú.
¡¡¡¡1.·ÓÉÆ÷µÄÅäÖÃ
¡¡¡¡[Router]
¡¡¡¡[Router]inter e0
¡¡¡¡[Router-Ethernet0]ip add 10.0.0.1 255.255.255.0
¡¡¡¡[Router-Ethernet0]inter e0.1 //¶¨Òå×Ó½Ó¿ÚE0.1
¡¡¡¡[Router-Ethernet0.1]ip add 172.16.1.1 255.255.255.0
¡¡¡¡[Router-Ethernet0.1]vlan-type dot1q vid 1 //Ö¸¶¨ÒÔÌ«Íø×Ó½Ó¿ÚÊôÓÚVLAN1,´ËÃüÁîÓ¦ÓÃÔÚÒÔÌ«Íø×Ó½Ó¿ÚÉÏ¡£Ö»ÓÐÅäÖÃÁ˸ÃÃüÁîÖ®ºó£¬ÒÔÌ«Íø×ӽӿڲŻá¸ù¾ÝÅäÖõÄVLAN ID ºÅÔÚÒÔÌ«ÍøÖ¡Í·ÖÐǶÈëVLAN ±êÇ©£¬Óë¸ÃÍø¿ÚÏàÁ¬µÄ½»»»»ú½Ó¿Ú²ÅÄÜÕýÈ·´¦Àí½ÓÊÕµ½µÄÖ¡¡£
¡¡¡¡[Router-Ethernet0.1]inter e0.2 //¶¨Òå×Ó½Ó¿ÚE0.2
¡¡¡¡[Router-Ethernet0.2]ip add 172.16.2.1 255.255.255.0
¡¡¡¡[Router-Ethernet0.2]vlan-type dot1q vid 2 //Ö¸¶¨ÒÔÌ«Íø×Ó½Ó¿ÚÊôÓÚVLAN2
¡¡¡¡[Router-Ethernet0.2]inter e0.3 //¶¨Òå×Ó½Ó¿ÚE0.3
¡¡¡¡[Router-Ethernet0.3]ip add 172.16.3.1 255.255.255.0
¡¡¡¡[Router-Ethernet0.3]vlan-type dot1q vid 3 //Ö¸¶¨ÒÔÌ«Íø×Ó½Ó¿ÚÊôÓÚVLAN3
¡¡¡¡[Router-Ethernet0.3]inter e0
¡¡¡¡[Router-Ethernet0]undo shut
¡¡¡¡% Interface Ethernet0 is up
¡¡¡¡[Router-Ethernet0] //ÓÃÍøÏß½«E0¶Ë¿ÚÁ¬µ½S3026µÚ24¶Ë¿Ú
¡¡¡¡%19:46:32: Interface Ethernet0 changed state to UP
¡¡¡¡%19:46:32: Line protocol ip on interface Ethernet0, changed state to UP
¡¡¡¡%19:46:32: Line protocol ip on interface Ethernet0.1, changed state to UP
¡¡¡¡%19:46:32: Line protocol ip on interface Ethernet0.2, changed state to UP
¡¡¡¡%19:46:32: Line protocol ip on interface Ethernet0.3, changed state to UP
¡¡¡¡2.½»»»»úµÄÅäÖÃ
¡¡¡¡<Quidway>
¡¡¡¡<Quidway>sys
¡¡¡¡Enter system view , return user view with Ctrl+Z.
¡¡¡¡[Quidway]vlan 1
¡¡¡¡[Quidway-vlan1]vlan 2
¡¡¡¡[Quidway-vlan2]port ethernet 0/17 to eth 0/19 eth 0/22 //½«µÚ17ÖÁ19¶Ë¿Ú£¬ºÍµÚ22¶Ë¿Ú¼ÓÈëVLAN2
¡¡¡¡[Quidway-vlan2]vlan 3
¡¡¡¡[Quidway-vlan3]port eth 0/21 //½«µÚ21¶Ë¿Ú¼ÓÈëVLAN2
¡¡¡¡[Quidway-vlan3]inter e0/24
¡¡¡¡[Quidway-Ethernet0/24]port link-type trunk //½«µÚ24¶Ë¿ÚÉèΪtrunk¿Ú
¡¡¡¡[Quidway-Ethernet0/24]port trunk permit vlan all¡¡//ÔÊÐíËùÓÐVLANÁ÷Á¿Í¨¹ý
¡¡¡¡Please wait........................................... Done.
¡¡¡¡[Quidway-Ethernet0/24]dis port trunk //¼ìÑéTRUNK¿ÚÅäÖÃ
¡¡¡¡Now, the following trunking ports exist:
¡¡¡¡Ethernet0/24
¡¡¡¡[Quidway-Ethernet0/24]dis vlan 2¡¡//¼ìÑéVLAN2µÄÅäÖÃ
¡¡¡¡VLAN ID: 2
¡¡¡¡VLAN Type: static
¡¡¡¡Route Interface: not configured
¡¡¡¡Description: VLAN 0002
¡¡¡¡Tagged Ports:
¡¡¡¡Ethernet0/24
¡¡¡¡Untagged Ports:
¡¡¡¡Ethernet0/17 Ethernet0/18 Ethernet0/19 Ethernet0/22
¡¡¡¡[Quidway-Ethernet0/24]dis vlan 3¡¡//¼ìÑéVLAN3µÄÅäÖÃ
¡¡¡¡VLAN ID: 3
¡¡¡¡VLAN Type: static
¡¡¡¡Route Interface: not configured
¡¡¡¡Description: VLAN 0003
¡¡¡¡Tagged Ports:
¡¡¡¡Ethernet0/24
¡¡¡¡Untagged Ports:
¡¡¡¡Ethernet0/21
¡¡¡¡3.ÔÚ¹¤×÷Õ¾Éϼì²éÍøÂçÊÇ·ñÁ¬Í¨¡£´Ë¹¤×÷Õ¾Á¬½ÓS3026µÚ21¶Ë¿Ú£¬ÊôÓÚVLAN2¡£
¡¡¡¡C:\Documents and Settings\Administrator>ipconfig
¡¡¡¡windows 2000 IP Configuration
¡¡¡¡Ethernet adapter ±¾µØÁ¬½Ó:
¡¡¡¡Connection-specific DNS Suffix . :
¡¡¡¡IP Address. . . . . . . . . . . . : 172.16.2.22
¡¡¡¡Subnet Mask . . . . . . . . . . . : 255.255.255.0
¡¡¡¡Default Gateway . . . . . . . . . : 172.16.2.1
¡¡¡¡C:\Documents and Settings\Administrator>ping 172.16.3.1
¡¡¡¡Pinging 172.16.3.1 with 32 bytes of data:
¡¡¡¡Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
¡¡¡¡Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
¡¡¡¡Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
¡¡¡¡Reply from 172.16.3.1: bytes=32 time<10ms TTL=255
¡¡¡¡Ping statistics for 172.16.3.1:
¡¡¡¡Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
¡¡¡¡Approximate round trip times in milli-seconds:
¡¡¡¡Minimum = 0ms, Maximum = 0ms, Average = 0ms
¡¡¡¡4.ÔÚ·ÓÉÆ÷Éϲ鿴·ÓÉ±í¡£¿ÉÒÔ·¢ÏÖ£¬ÓÉÓÚ172.16¸÷Íø¶Î¶¼ÊÇÖ±Á¬Â·ÓÉ£¬¹Ê²»ÐèÆôÓ÷ÓÉÐÒé»ò¾²Ì¬Â·Óɼ´ÄÜʵÏÖVLANÖ®¼äµÄͨѶ¡£
¡¡¡¡[Router]display ip routing-table
¡¡¡¡Routing Tables:
¡¡¡¡Destination/Mask Proto Pref Metric Nexthop Interface
¡¡¡¡10.0.0.0/24 Direct 0 0 10.0.0.1 Ethernet0
¡¡¡¡10.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
¡¡¡¡127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
¡¡¡¡127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
¡¡¡¡172.16.1.0/24 Direct 0 0 172.16.1.1 Ethernet0.1
¡¡¡¡172.16.1.1/32 Direct 0 0 127.0.0.1 LoopBack0
¡¡¡¡172.16.2.0/24 Direct 0 0 172.16.2.1 Ethernet0.2
¡¡¡¡172.16.2.1/32 Direct 0 0 127.0.0.1 LoopBack0
¡¡¡¡172.16.3.0/24 Direct 0 0 172.16.3.1 Ethernet0.3
¡¡¡¡172.16.3.1/32 Direct 0 0 127.0.0.1 LoopBack0
±¾´ÊÌõ¶ÔÎÒÓаïÖú23
²Î¿¼×ÊÁÏ£º
1.[url]http://www.net130.com/2004/6-24/233644.html[/url]
2.ʵÑéÎĵµ
[ÎÒÀ´ÍêÉÆ]Ïà¹Ø´ÊÌõ£º
¸ü¶à
¾²Ì¬Â·ÓÉ
¿ª·Å·ÖÀࣺ
CCIE£¬PREVLAN£¬µ¥±Û£¬Â·ÓÉ
ºÏ×÷±à¼Õߣº
eagleyang007¡¢Í¬·½_ÃÈÃÈ [/img]..