Đặt địa chỉ IP cho các interface VLAN trên kèm theo câu lệnh yêu cầu cấp IP động cho các máy trạm từ máy chủ DHCP
CORE (config)#int vlan 3
CORE (config-if)#ip address 21.121.3.1 255.255.255.0 CORE (config-if)#exit
CORE (config)#int vlan 4
CORE (config-if)#ip address 21.121.4.1 255.255.255.0 CORE (config-if)#exit
CORE (config)#int vlan 11
CORE (config-if)#ip address 21.121.11.1 255.255.255.0 CORE (config-if)#ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 12
CORE (config-if)#ip address 21.121.12.1 255.255.255.0 CORE (config-if)#ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 13
CORE (config-if)#ip address 21.121.13.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 14
CORE (config-if)#ip address 21.121.14.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 20
CORE (config-if)#ip address 21.121.20.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 21
CORE (config-if)#ip address 21.121.21.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 22
CORE (config-if)#ip address 21.121.23.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 24
CORE (config-if)#ip address 21.121.24.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 30
CORE (config-if)#ip address 21.121.30.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 31
CORE (config-if)#ip address 21.121.31.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 32
CORE (config-if)#ip address 21.121.32.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 33
CORE (config-if)#ip address 21.121.33.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 34
CORE (config-if)#ip address 21.121.34.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 40
CORE (config-if)#ip address 21.121.40.1 255.255.255.0
CORE (config-if)# ip helper-add 21.121.4.2 CORE (config-if)#exit
CORE (config)#int vlan 41
CORE (config-if)#ip address 21.121.41.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 42
CORE (config-if)#ip address 21.121.42.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit CORE (config)#int vlan 43
CORE (config-if)#ip address 21.121.43.1 255.255.255.0 CORE (config-if)# ip helper-add 21.121.4.2
CORE (config-if)#exit
Cấu hình định tuyến OSPF
CORE (config)#ip routing CORE (config)#router ospf 1
CORE (config-router)#network 21.121.4.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.5.2 0.0.0.255 a 1 CORE (config-router)#network 21.121.3.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.11.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.12.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.13.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.14.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.20.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.21.1 0.0.0.255 a 1
CORE (config-router)#network 21.121.30.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.31.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.32.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.33.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.34.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.40.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.41.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.42.1 0.0.0.255 a 1 CORE (config-router)#network 21.121.43.1 0.0.0.255 a 1 CORE (config-router)#exit CORE (config)#do wr 3.2.2.2. Distribution Switch SWITCH Tầng 1 Switch>enable Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname Tang1
Tang1(config)#enable secret khanh Tang1(config)#vlan 11 Tang1(config-vlan)#name wifisanh Tang1(config-vlan)#exit Tang1(config)#vlan 12 Tang1(config-vlan)#name phongHCNS Tang1(config-vlan)#exit Tang1(config)#vlan 13 Tang1(config-vlan)#name phongtuyensinh Tang1(config-vlan)#exit Tang1(config)#vlan 14 Tang1(config-vlan)#name phongkhach 30
Tang1(config-vlan)#exit Tang1(config)#int f0/1
Tang1(config-if)#switchport mode access Tang1(config-if)#switchport access vlan 11 Tang1(config-if)#exit
Tang1(config)#int f0/2
Tang1(config-if)#switchport mode access Tang1(config-if)#switchport access vlan 14 Tang1(config-if)#exit
Tang1(config)#int f0/3
Tang1(config-if)#switchport mode access Tang1(config-if)#switchport access vlan 12 Tang1(config-if)#exit
Tang1(config)#int f0/4
Tang1(config-if)#switchport mode access Tang1(config-if)#switchport access vlan 13 Tang1(config-if)#exit
Tang1(config)#int f0/5
Tang1(config-if)#switchport mode trunk Tang1(config-if)#exit