昨天在Cisco Router 2621 和 Cisco Switch 2950下配置VLAN,用两台电脑测试了一下。感觉还可以。
2950的和1900的配置Vlan的时候有点不一样。具体区别参考一下CCNA的书都可以了。
下面吧show Run出来了:
Router:
Router#show run              
Building configuration...                        

Current configuration : 865 bytes                                
!
version 12.3           
service timestamps debug datetime msec                                     
service timestamps log datetime msec                                   
no service password-encryption                             
!
hostname Router              
!
boot-start-marker                
boot-end-marker              
!
!
no network-clock-participate slot 1                                  
no network-clock-participate wic 0                                 
no aaa new-model               
ip subnet-zero             
ip cef     
!
!
!
ip audit po max-events 100                         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0                        
no ip address             
duplex auto           
speed auto          
!
interface FastE            
encapsulation dot1Q 3                     
ip address 192.168.0.1 255.255.255.0                                    
!
interface FastEthernet0/0.2                          
encapsulation dot1Q 2                     
ip address 192.168.1.1 255.255.255.0                                    
!
interface Serial0/0                  
no ip address             
shutdown        
no fair-queue             
!
interface FastEthernet0/1                        
no ip address
shutdown
duplex auto
speed auto
!
ip http server
no ip http secure-server
ip classless
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

Switch:
Switch#show run              
Building configuration...                        

Current configuration : 1663 bytes                                 
!
version 12.1           
no service pad             
service timestamps debug uptime                              
service timestamps log uptime                            
no service password-encryption                             
!
hostname Switch              
!
enable secret 5 $1$PI3N$pP0pSxrZsxj2tKau1dcdM0                                             
enable password thms                   
!
ip subnet-zero             
!
!
spanning-tree mode pvst                      
no spanning-tree optimize bpdu transmissi                                       
spanning-tree extend system-id                             
!
!
!
!
interface FastEthernet0/1                        
!
interface FastEthernet0/2                        
switchport access vlan 2                        
!
interface FastEthernet0/3                        
switchport access vlan 2                        
!
interface FastEthernet0/4                        
switchport access vlan 2                        
!
interface FastEthernet0/5                        
switchport access vlan 2                        
!
interface FastEthernet0/6                        
switchport access vlan 2                        
!
interface FastEthernet0/7                        
switchport access vlan 2                        
!
interface FastEthernet0/8                        
switchport access vlan 2                        
!
interface FastEthernet0/9                        
switchport access vlan 3                        
!
interface FastEthernet0/10                         
switchport access vlan 3                        
!
interface FastEthernet0/11                         
switchport access vlan 3                        
!
interface FastEthernet0/12                         
switchport access vlan 3                        
!
interface FastEthernet0/13                         
switchport access vlan 3                        
!
interface FastEthernet0/14                         
switchport access vlan 3                        
!
interface FastEthernet0/15                         
switchport access vlan 3                        
!
interface FastEthernet0/16                         
switchport access vlan 3                        
!
interface FastEthernet0/17                         
!
interface FastEthernet0/18                         
!
interface FastEthernet0/19                         
!
interface FastEthernet0/20                         
!
interface FastEthernet0/21                         
!
interface FastEthernet0/                      
!
interface FastEthernet0/23                         
!
interface FastEthernet0/24
switchport mode trunk
!
interface Vlan1
ip address 192.168.1.100 255.255.255.0
no ip route-cache
!
ip default-gateway 10.188.90.10
ip http server
!
line con 0
password thms
login
line vty 0 4
password thms
login
line vty 5 15
login
!
!
end

SHow Vlan Beirf:
Switch#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/17, Fa0/18, Fa0/19
                                                Fa0/20, Fa0/21, Fa0/22, Fa0/23
2    THMS_FY                          active    Fa0/2, Fa0/3, Fa0/4, Fa0/5
                                                Fa0/6, Fa0/7, Fa0/8
3    THMS_SJ                          active    Fa0/9, Fa0/10, Fa0/11, Fa0/12
                                                Fa0/13, Fa0/14, Fa0/15, Fa0/16
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

感觉比较简单。