SWITCH - VTP
SW 1설정
Switch(config)#interface range fa0/23 - 24
Switch(config-if-range)#switchport mode trunk
Switch(config)#vtp mode server
Switch(config)#vtp domain ccna
Switch(config)#vtp password cisco
Switch(config)#int
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
SW 2설정
Switch(config)#interface range fa0/23 - 24
Switch(config-if-range)#switchport mode trunk
Switch(config)#vtp mode client
Switch(config)#vtp domain ccna
Switch(config)#vtp password cisco
Switch(config)#int
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
SW 3 설정
Switch(config)#interface range fa0/23 - 24
Switch(config-if-range)#switchport mode trunk
Switch(config)#vtp mode transparent
Switch(config)#int
Switch(config)#vlan 30
Switch(config-vlan)#vlan 40
Switch(config-vlan)#int fa0/1
Switch(config)#interface range fa0/1 , fa0/10
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 30
SW 4 설정
Switch(config)#interface range fa0/23 - 24
Switch(config-if-range)#switchport mode trunk
Switch(config)#vtp mode transparent
Switch(config)#interface range fa0/1 , fa0/10
Switch(config-vlan)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 40
Router
R1 설정
(config)#int fa0/0
(config-if)#no shutdown
(config-if)#int fa0/0.10
(config-subif)#encapsulation dot1Q 10
(config-subif)#ip address 192.168.1.1 255.255.255.0
(config-subif)#exit
(config)#interface fa0/0.20
(config-subif)#encapsulation do
(config-subif)#encapsulation dot1Q 20
(config-subif)#ip address 192.168.2.1 255.255.255.0
(config-subif)#
R1(config)#interface serial 0/0
R1(config-if)#no shutdown
R1(config-if)#ip address 1.1.12.1 255.255.255.252
R1(config-if)#clo
R1(config-if)#clock ra
R1(config-if)#clock rate 64000
R2 설정
(config)#int fa0/0
(config-if)#no shutdown
(config-if)#int fa0/0.10
(config-subif)#encapsulation dot1Q 30
(config-subif)#ip address 172.16.1.1 255.255.255.0
(config-subif)#exit
(config)#interface fa0/0.20
(config-subif)#encapsulation do
(config-subif)#encapsulation dot1Q 40
(config-subif)#ip address 172.16.2.1 255.255.255.0
(config-subif)#
R1(config)#interface serial 0/1
R1(config-if)#no shutdown
R1(config-if)#ip address 1.1.12.2 255.255.255.252
R1(config-if)#clock rate 64000
--------------------------------------------------------
OSPF 설정 부분
R1 설정
Router(config)#interface loopback 0
Router(config-if)#ip address 2.2.2.3 255.255.255.0
Router(config-if)#exit
Router(config)#router ospf 4
Router(config-router)#network 2.2.2.3 0.0.0.0 area 0
Router(config-router)#network 1.1.12.1 0.0.0.0 area 0
Router(config-router)#network 192.168.1.1 0.0.0.0 area 0
Router(config-router)#network 192.168.2.1 0.0.0.0 area 0
Router(config-router)#exit
R2 설정
Router(config)#interface loopback 0
Router(config-if)#ip address 2.2.2.4 255.255.255.0
Router(config-if)#exit
Router(config)#router ospf 4
Router(config-router)#network 2.2.2.4 0.0.0.0 area 0
Router(config-router)#network 1.1.12.2 0.0.0.0 area 0
Router(config-router)#network 172.16.1.1 0.0.0.0 area 0
Router(config-router)#network 172.16.2.1 0.0.0.0 area 0
Router(config-router)#exit
Switch 1,3,4 설정
switchport mode trunk
SW1(config)#int fa0/10
SW1(config-if)#switchport mode trunk
-----------------------------------------
스위치 관리용 ip 집어 넣기
Switch(config)#int vlan 10
Switch(config-if)#ip address 192.168.1.254 255.255.255.0
Switch(config-if)#line vty 0 4
Switch(config-line)#login
% Login disabled on line 1, until 'password' is set
% Login disabled on line 2, until 'password' is set
% Login disabled on line 3, until 'password' is set
% Login disabled on line 4, until 'password' is set
% Login disabled on line 5, until 'password' is set
Switch(config-line)#password cisco
Switch(config)#ip default-gateway 192.168.1.1