본문 바로가기
ETC/실습 핵심 네트워크

VLAN 설정하기

by 계영수 2024. 1. 29.
728x90

실습 네트워크 (학습자가 직접 토폴로지를 구성할 것)

  • 다음 그림과 같은 토폴로지를 구성할 것
  • VLAN을 구성하기 전에 모든 PC간에 통신이 되는지 확인할 것
  • 같은 VLAN 간에만 통신이 되도록 설정할 것
Packet Tracer PC Command Line 1.0
C:\>ping 10.1.1.12

Pinging 10.1.1.12 with 32 bytes of data:

Reply from 10.1.1.12: bytes=32 time<1ms TTL=128
Reply from 10.1.1.12: bytes=32 time<1ms TTL=128
Reply from 10.1.1.12: bytes=32 time<1ms TTL=128
Reply from 10.1.1.12: bytes=32 time<1ms TTL=128

Ping statistics for 10.1.1.12:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>ping 10.1.1.13

Pinging 10.1.1.13 with 32 bytes of data:

Reply from 10.1.1.13: bytes=32 time=1ms TTL=128
Reply from 10.1.1.13: bytes=32 time<1ms TTL=128
Reply from 10.1.1.13: bytes=32 time=2ms TTL=128
Reply from 10.1.1.13: bytes=32 time<1ms TTL=128

Ping statistics for 10.1.1.13:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 2ms, Average = 0ms

C:\>ping 10.1.1.14

Pinging 10.1.1.14 with 32 bytes of data:

Reply from 10.1.1.14: bytes=32 time=1ms TTL=128
Reply from 10.1.1.14: bytes=32 time<1ms TTL=128
Reply from 10.1.1.14: bytes=32 time<1ms TTL=128
Reply from 10.1.1.14: bytes=32 time<1ms TTL=128

Ping statistics for 10.1.1.14:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\>

VLAN을 구성하는 절차는 다음과 같다.

첫째. 스위치에서 VLAN을 정의한다.

둘째. 스위치에서 컴퓨터가 연결된 포트를 적절한 VLAN에 할당한다.

세번째. 의도된대로 스위치 구성이 맞는지 전체적으로 확인한다.

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
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
Switch(config-if)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#int fa0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int fa0/4
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 20
Switch(config-if)#exit
Switch(config)#

 

Switch#show vlan

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

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
10   enet  100010     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0   
1003 tr    101003     1500  -      -      -        -    -        0      0   
1004 fdnet 101004     1500  -      -      -        ieee -        0      0   
1005 trnet 101005     1500  -      -      -        ibm  -        0      0   

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

Remote SPAN VLANs
------------------------------------------------------------------------------

Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------
Switch#

 

설정이 잘되었는지 확인하기 위해서 같은 VLAN 에 속한 PC 사이에만 통신이 되는지 확인

PC0에서 Ping 테스트 (같은 VLAN으로는 성공, 다른 VLAN으로는 실패)

C:\>ping 10.1.1.12

Pinging 10.1.1.12 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 10.1.1.12:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>ping 10.1.1.13

Pinging 10.1.1.13 with 32 bytes of data:

Reply from 10.1.1.13: bytes=32 time<1ms TTL=128
Reply from 10.1.1.13: bytes=32 time<1ms TTL=128
Reply from 10.1.1.13: bytes=32 time=1ms TTL=128
Reply from 10.1.1.13: bytes=32 time<1ms TTL=128

Ping statistics for 10.1.1.13:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\>
728x90

'ETC > 실습 핵심 네트워크' 카테고리의 다른 글

2진수를 10진수로 바꾸는 연습  (0) 2024.01.29
보다 복잡한 VLAN 구성  (0) 2024.01.29
Switch에서 Broadcast 영역 나누기 - VLAN 개념  (0) 2024.01.29
ARP 동작원리  (0) 2024.01.28
스위치의 동작원리  (0) 2024.01.28