네트워크 망/ 서버 구축 실습 1 - Switch L2,L3
- 가상의 회사 네트워크 망 구성 및 각 서버 구축 실습 과정입니다.
1. 구성도
1) 기초 구성
망 구성도에서 왼쪽 서버가 있는 망이 DMZ
아래 PC가 있는 곳이 Internal
오른쪽 공유기를 지난 곳이 External
2) 내부에서 외부로 MASQUERADE, 외부에서 DMZ로 DNAT를 설정하여 통신 할 수 있도록 한다.
3) 중간에 IPTABLES에서 설정하며 ROUTING 역할도 담당 한다.
4) L2, L3 VLAN 10 , 20 통신 가능하도록 하며 실제 실습은 PVST, L3 1개 L2 4개로 실습 하였다.
5) 외부 망은 AZURE, AWS 등의 실제 클라우드를 사용한다.
2. Switch 설정
L3 설정
FastEthernet 1/0
L3# configure terminal
L3(Config)# ip routing
L3(Config)# ip route 0.0.0.0 0.0.0.0 172.16.12.254(eth3)
L3(Config-f1/0) no switchport
ip address 172.16.12.200 255.255.255.0
FastEthernet 0/1
L3#configure terminal
L3(Config)# fastethernet f0/1.10
L3(Config-subf0/1.10)#encapsulation dot1q 10
L3(Config-subf0/1.10)#ip address 10.10.10.254 255.255.255.0
L3(Config-subf0/1.10)$no shutdown
L3(Config)# fastethernet f0/1.20
L3(Config-subf0/1.20)#encapsulation dot1q 20
L3(Config-subf0/1.20)#ip address 10.10.20.254 255.255.255.0
L3(Config-subf0/1.20)$ip helper-address 10.10.10.11
L3(Config-subf0/1.20)$no shutdown
L3(Config)# fastethernet f0/1.30
L3(Config-subf0/1.20)#encapsulation dot1q 30
L3(Config-subf0/1.20)#ip address 10.10.30.254 255.255.255.0
L3(Config-subf0/1.20)$ip helper-address 10.10.10.11
L3(Config-subf0/1.20)$no shutdown
L2 설정
L2#configure terminal
L2(Config)#vlan 10
L2(Config)#vlan 20
L2(Config)#vlan 30
FastEthernet 1/1
L2(Config)# fastethernet f1/1
L2(Config)-f1/1)#switchport mode access
L2(Config)-f1/1)#switchport access vlan 20
FastEthernet 1/2
L2(Config)# fastethernet f1/2
L2(Config)-f1/2)#switchport mode access
L2(Config)-f1/2)#switchport access vlan 10
FastEthernet 1/3
L2(Config)# fastethernet f1/3
L2(Config)-f1/3)#switchport mode access
L2(Config)-f1/3)#switchport access vlan 10
FastEthernet 1/4
L2(Config)# fastethernet f1/4
L2(Config)-f1/4)#switchport mode access
L2(Config)-f1/4)#switchport access vlan 30
L2(config)#fastethernet f1/0
L2(Config-f1/0)#switchport mode trunk
L2(Config-f1/0)#switchport trunk allowed vlan 10-30
L2(Config-f1/0)#switchport trunk encapsulation dot1q