bxm's IT Story
어느 곳을 고쳐야할까? 라우터 스위치 문제. 본문
## Router On a Stick
** 모든 장비 기본 설정
ena
conf t
no ip domain lookup
line c 0
logg sy
exec-timeout 0
exit
line vty 0 4
password cisco
exit
hostname XX
SW1]
conf t
no ip routing
vlan 10
exit
vlan 20
exit
int f1/3
switchport mode access
switchport access vlan 10
exit
int f1/4
switchport mode access
switchport access vlan 20
exit
SW2]
conf t
no ip routing
vlan 10
exit
vlan 20
exit
int f1/1
switchport mode access
switchport access vlan 10
exit
int f1/2
switchport mode access
switchport access vlan 20
exit
int range f1/9
switchport trunk encapsulation dot1q
switchport mode trunk
end
wr
R1]
conf t
int f0/0
no shutdown
exit
int f0/0.10
encapsulation dot1q 10
ip address 1.1.10.254 255.255.255.0
exit
int f0/0.20
encapsulation dot1q 20
ip address 1.1.20.254 255.255.255.0
exit
PC1~4]
conf t
no ip routing
ip default-gateway 1.1.x.x
// PC 1과 3의 gateway -> 1.1.10.254
PC 2와 4의 gateway -> 1.1.20.254
!
int f0/0
no shutdown
ip add 1.1.x.x 255.255.255.0 (1-1.1.10.1 / 2-1.1.20.2 / 3-1.1.10.3 / 4-1.1.20.4)
end
wr
- verify -
show ip interface brief
show vlan-switch
show interface trunk
제일 먼저 해야할 것은 VLAN 확인이다.
SW1]
위의 모든 명령어를 전부 치고 show vlan-sw 로 확인해본 결과 VLAN 10-1번 / VLAN 20-2번이 들어가야하는데 각각 3/4번이 들어가있음.
이러면 인터페이스 들어가서 NO 명령어로 실행하면된다.
conf t
int f1/3
no switchport mode access
no switchport access vlan 10
exit
int f1/4
no switchport mode access
no switchport access vlan 20
int f1/1
switchport mode access
switchport access vlan 10
exit
int f1/2
switchport mode access
switchport access vlan 20
exit
SW2]
위의 모든 명령어를 전부 치고 show vlan-sw 로 확인해본 결과 VLAN 10-3번 / VLAN 20-4번이 들어가야하는데 각각 1/2번이 들어가있음.
SW1과 마찬가지로 NO 명령어를 통해 연결된 것을 풀어주면 된다.
conf t
int f1/1
no switchport mode access
no switchport access vlan 10
exit
int f1/2
no switchport mode access
no switchport access vlan 20
int f1/3
switchport mode access
switchport access vlan 10
exit
int f1/4
switchport mode access
switchport access vlan 20
exit
다음으로 확인할 것은 Trunk이다.
SW1]
show interface trunk (sw int tr로 축약 가능)
conf t
int f1/9
switchport trunk encapsulation dot1q
switchport mode trunk
SW2]
conf t
int f1/15
sw tr enc dot
sw mode tr
마지막으로 확인할 것은 IP이다.
R1]
show ip interface br
show run interface f0/0.10
모든 것을 마무리 후 PC1~PC4에서 각각 ping 1.1.10.254 / ping 1.1.20.254를 날렸을 때 (5/5) 모두 성공한 것을
볼 수 있다.
'Network > Cisco (KEDU)' 카테고리의 다른 글
PPP (0) | 2021.06.09 |
---|---|
Native VLAN 구현. (0) | 2021.06.09 |
GNS VLAN10, VLAN20 예제 관련하여 Switch와 Router 활용하여 통신망 연결하기(2), 라우터가 SW2랑 연결되어 있을때 (0) | 2021.06.09 |
정보기기운용기능사 기출 1번 (0) | 2021.06.08 |
GNS VLAN10, VLAN20 예제 관련하여 Switch와 Router 활용하여 통신망 연결하기. (1) | 2021.06.08 |