Switch#conf t
Switch(config)#interface vlan 2
Switch(config-if)#no ip address
Switch(config-if)#ip add 192.168.2.2 255.255.255.0
Switch(config-if)#exit
Switch(config)#interface vlan 3
Switch(config-if)#no ip address
Switch(config-if)#ip add 192.168.3.2 255.255.255.0
Switch(config-if)#exit
Switch(config)#end
Switch#
//-------------------------------------Birinchi switch uchun----------------------------------
Switch#conf t
Enter
configuration commands, one per line. End with CNTL/Z.
Switch(config)#int range fastEthernet 0/2-6
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 2
Switch(config)#int gigabitEthernet 0/1
Switch(config-if)#switchport mode
trunk
Switch(config-if)#switchport trunk allowed vlan all
Switch(config)#ip dhcp pool sozlama1
Switch(dhcp-config)#network 192.168.2.0 255.255.255.0
Switch(dhcp-config)#default-router 192.168.2.2
Switch(dhcp-config)#dns-server 8.8.8.8
Switch(dhcp-config)#exit
Switch(config)#ip dhcp excluded-address 192.168.2.0 192.168.2.50
//----------------------------------Ikkinchi switch uchun------------------------------------
Switch(config)#int range fastEthernet 0/2-6
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 3
Switch(config)#int gigabitEthernet 0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan all
Switch(config)#ip dhcp pool sozlama2
Switch(dhcp-config)#network 192.168.3.0 255.255.255.0
Switch(dhcp-config)#default-router 192.168.3.2
Switch(dhcp-config)#dns-server 8.8.8.8
Switch(dhcp-config)#exit
Switch(config)#ip dhcp excluded-address 192.168.3.0 192.168.3.50
//-------------------------------------------------------------------------------------------------
Switch(config)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console