본문 바로가기

카테고리 없음

Catalyst 4000-L3 Switch 구조와 setting


네트웍 왕초보자 제롭니다..^^;이글을 작성하기 위해 하루죙일 걸리다니...쩝..에궁.. 보기에따라서는 머 이런거 가지고 하루 죙일 걸리냐고 할수 도 있지만.. 모르는거 물어 물어서 정리하는데 그 정도의 시간은 필요하더군여.. 제가 하루죙일 걸려서 정리한 것인 만큼 다른 분들에게 많은 도움이 됐으면 합니다. 이글을

네트웍 왕초보자 제롭니다..^^;이글을 작성하기 위해 하루죙일 걸리다니...쩝..에궁.. 보기에따라서는 머 이런거 가지고 하루 죙일 걸리냐고 할수 도 있지만.. 모르는거 물어 물어서 정리하는데 그 정도의 시간은 필요하더군여.. 제가 하루죙일 걸려서 정리한 것인 만큼 다른 분들에게 많은 도움이 됐으면 합니다. 이글을 이해하기 전에 다음과 같은 사전지식이 필요합니다.

 

ether channel(sub-interface), vtp(router에서의 sub-interface를 이용한 trunk, negotiate), 이 스위치는

isl을 지원하지 않고 dot1.q만 지원합니다.

위에 나온것에 대해서 모르시는 분은 이 문서를 봐도 이해 못하는 부분이 많기에 위의 것을 먼저 공부한후 보시길 권합니다.

 

다음 설명은 Cisco Catalyst 4000serier switch에 L3 모듈이 포함된 경우를 말합니다.Catalyst 4000시리즈 스위치는 4003(3slot), 4006(6slot) 이렇게 두가지가 있습니다.Catalyst 4003 스위치에 L3모듈이 꽃혀 잇는 것을 기준으로 설명합니다.그리고 MGMT를 위한 포트는 설명에서 제외합니다. 아시다 시피 4003은 슬롯이 3개 있습니다. 1번은 Supervisior를 위한 슬롯입니다. 2,3번은 다른 카드들을 삽입하면 됩니다. Supervisior 슬롯이 RS-232 타입 콘솔 포트가 있습니다. 여기에 콘솔로 접속해서 보면 다음과 같슴다.

 

Conole>sh module Mod Slot Ports Module-Type Model Sub Status

 --- ---- ----- ------------------------- ------------------- --- --------

1 1 0   Switching Supervisor WS-X4012 no faulty

2 2 34 Router Switch Card WS-X4232-L3 no ok

 

1번 슬롯은 Supervisior가 들어가 있고 2번 슬롯에 L3 모듈이 들어가 있습니다.

오늘의 핵심은 바로 요거 L3 모듈이 들어가 있을때 어떻게 셋팅을 하느냐 입니다.

L3모듈이 없을때는 일반 set 명령어 방식의 셋팅 방식과 동일하므로.. 여기서 언급할 필요가 없습니다. L3 모듈이 포함된 4000스위치는 물리적으로 하나의 스위치이지만.. 논리적으로는 라우터 한대 + 스위치 한대 = 두대의 장비입니다. 물리와 논리의 차이점은 한번만 더 말하면 천번은 되는 것 같지만...^^; 물리는 눈에 보이는 모양이고 논리는 실제로 굴러가는 모양입니다. 일반적으로 허브는 물리적으로 star형이고 논리적으로 bus형입니다. 우리가 20기가 하드 한개를 C,D 이렇게 두개로 나누어 쓰지요.. 그럼 물리적으론 한개고 논리적으론 두개임다..

 

첫째, 물리적 측면 라우터 포트 Giga port 두개(1~2번), 100메가 스위치 포트 32개(3번~34번) 둘째, 논리적 측면 라우터 포트 : Giga 4개(1~4), 스위치 포트 : Giga 2개(1~2), 100M 32개

 

(3~34) 결론적으로 이 장비는 물리적으론 하나의 스위치 이지만.. 논리적으로는 Router(Giga 4개) + 스위치(Giga 두개, 100M 32개) 이렇다는 의미입니다. 되게 헷깔리죠? 저도 첨에 되게 헷깔렸슴다. 여기서 숨어있는 인터페이스라는 게 있습니다. 숨어 잇다는 것은 밖에서는 안 보이는데 존재하고 잇다는 것이져.. 라우터 Giga3번과 4번이 숨어잇고... 스위치 1,2번이 숨어 있는 포트 입니다. 즉, 내부에 잇는 것이라 밖으로 안 보인다는 것임다~!

Console> (enable) sh port PortName Status Vlan Level Duplex Speed Type

 -------- ------------- ---------- --------- ------- ----- ------------

2/1 connected trunk normal full 1000 No GBIC

 2/2 connected trunk normal full 1000 No GBIC

2/3 notconnect 10 normal auto auto 10/100BaseTX

2/4 notconnect 20 normal auto auto 10/100BaseTX

2/5 notconnect 20 normal auto auto 10/100BaseTX

... ...

2/32 notconnect 30 normal auto auto 10/100BaseTX

2/33 notconnect 40 normal auto auto 10/100BaseTX

2/34 notconnect 1 normal auto auto 10/100BaseTX .... ...

 

위의 내용은 스위치 콘솔로 들어가서 본 내용입니다. 여기서 우리는 다시한번 헷깔리게 됩니다.^^; (제로 생각) 우리 눈으로 보이는 밖의 기가 포트(GBIC)는 스위치 포트가 아니라 라우터 포트라는 것입니다. 증거를 대보겟습니다. 위의 상황에서 2/1-2는 NO GBIC이라고 나와있쪄.. 이말이 그 뜻입니다. 스위치에서 2/1-2는 눈에 보이는 GBIC가 아니라는 것임다~! 그럼 이번에 라우터로 들어가서 포트가 어떻게 잇는지 보겟슴다~!

 

Router#sh conf interface GigabitEthernet1 메렁 메렁

           interface GigabitEthernet2 궁시렁 궁시렁

           interface GigabitEthernet3 에구 에구

           interface GigabitEthernet4 까꿍 까꿍

ip classless line con 0 transport input none end  

 

보시다시피 기가 인터페이스가 4개입니다 분명히 우리가 바깥에서 볼수 잇는 것은 두개 뿐인데도 말입니다. 바깥에서 보이는 두개의 기가 포트에 1번과 2번이라고 써있습니다.

고로 3,4번이 내부 인터페이스라는 것이죠.. 우리가 연결을 보통 다음과 같이 합니다.

RouterA - SwitchA - SwitchB RouterA와 SwitchA의 역할을 4000L3모듈 스위치에서 수행한다는 것임다. 라우터 내부에 기가포트 두개, 스위치 내부에 기가포트 두개 연결하는 것은 내부 포트가지고 한다는 것이죠.. 라우터 기가 포트 3,4번과 스위치의 기가 포트 1,2번을 연결해야 된다는 것입니다. 우리가 할것은 내부를 이더채널로 묶어서 라우터와 스위치를 연결해 주는 것입니다. 스위치에서 vlan 설정을 하고 이더채널 셋팅을 하고 uplink port에서 trunk로 넘깁니다.

라우터에서는 이더채널 채팅을 하고 sub-interface에서 trunk적용 위의 두줄이 이해 안되시는 분은 제가 처음에 말씀드렸듯이.. 사전지식을 모르고 계신것이기에 이것에 대한 질문은 사양합니다.

수학 문제 푸는데 산수공부는 기본적으로 알고 있다는 가정하에서 하는 것이져.. 수학시간에 산수문제 풀어달라는 질문은 합당치 않기에 이것에 대한 질문은 일체 받지 않겠습니다.

 

스위치에서 설정(vlan 설정을 한후 다음 설정을 합니다.)

첫째, 내부 기가포트 ether-channel 지정과 mode 설정

set port channel 2/1-2 1

set port channel 2/1-2 mode on

 

둘째, trunk 설정

set trunk 2/1 nonegotiate dot1q 1-1005

set trunk 2/2 nonegotiate dot1q 1-1005

 

위의 숫자 1~1005는 모든 vlan을 뜻하는 것인데.. 트렁크 시키고자하는 vlan만 적어줘도 됩니다.

4000시리즈는 isl을 지원안하고 802.1Q 만을 지원합니다.

그리고 여기에 연결되는 장비가 negotiate를 지원하지 않는 장비이기에 nonegotiate라는 mode로 설정합니다. 참고적으로 negotiate를 지원하지 않는 장비는 라우터와 2900XL, 3500XL 시리즈 등입니다.

제로는 예전에 이것 땜쉬.. 일주일 정도 무지 헤멨었슴다..^^; vtp negotiate를 지원하는지 안하는지 어떻게 아느냐구요? trunk mode는 on, off, auto, desirable, nonegotiate등이 잇습니다.

 

라우터나 2900xl, 3500xl장비에 들어가서 trunk mode에서 위의 옵션을 선택하는 메뉴가 없다면..

당근히 negotiate를 지원하지 않는다고 보시면 됩니다.

유식한 말로 DTP 또는 DISL 프레임이라고 하지여.. 이제 라우터에서 트렁크 설정을 해야겟져..

지면 관계상 vlan1과 4개의 vlan이 있다고 가정하고..

interface Port-channel1.1 encapsulation dot1Q 1 ip address 10.10.1.1 255.255.255.0

interface Port-channel1.10 encapsulation dot1Q 10 ip address 10.10.10.1 255.255.255.0

interface Port-channel1.20 encapsulation dot1Q 20 ip address 10.10.20.1 255.255.255.0

interface Port-channel1.30 encapsulation dot1Q 30 ip address 10.10.30.1 255.255.255.0

interface Port-channel1.40 encapsulation dot1Q 40 ip address 10.10.40.1 255.255.255.0

interface FastEthernet1

no ip address

no ip directed-broadcast

interface GigabitEthernet1 ip address 메렁

interface GigabitEthernet2 ip address 메롱

interface GigabitEthernet3 no ip address channel-group 1

interface GigabitEthernet4 no ip address channel-group 1

 

위에서 interface FastEthernet1은 MGMT를 위한 것이므로 설명에서 제외시켰습니다.

이제 모든 것이 끝났습니다. 그렇다면 지금 현재 스위치에 접속해 있는데 라우터로 갈려면 콘솔을 빼서 라우터 콘솔에 다시 접속해야 되냐고 할지 몰라서 그러는데..

다른 L3스위치와 마찬가지로 session 번호 이렇게 하면 라우터로 들어갑니다.

맨 처음에

Conole>sh module Mod Slot Ports Module-Type Model Sub Status

--- ---- ----- ------------------------- ------------------- --- --------

1 1 0  Switching Supervisor WS-X4012 no faulty

2 2 34 Router Switch Card WS-X4232-L3 no ok

 

2번 슬롯이 L3 이므로.. Console> session 2 이렇게 하면 라우터로 들어가게 됩니다.  

지금 부터는 상세한 셋팅에 대해서 알아 봅니다.

우리가 지금부터 할것은 vlan 1(10.10.1.0/24)과 vlan 10(10.10.10.0/24),vlan20(10.10.20.0/24),

vlan30(10.10.30.0/24), vlan40(10.10.40.0/24) 그리고 각 vlan의 라우터 ip는 각 network의 1번입니다.

즉, vlan1의 라우터 ip는 10.10.1.1/24, vlan10은 10.10.10.1, vlan20은 10.10.20.1vlan 30은 10.10.30.1,

vlan 40은 10.10.40.1 이렇게 셋팅할려고 합니다.

보통 pc에서의 default gateway가 되는 라우터 이더넷 인터페이스 주소는 각 네트웍의 1번이나 254번

으로 셋팅하는 경우가 많은데..저 같은 경우는 예전 부터 1번으로 셋팅하는 것이 습관이 되어서..

1번이 편하더군여..그리고 다 아시는 말이겟지만.. vlan 20에 연결된 pc나 스위치가 없다면 20.1로는

ping이 안됩니다.

vlan20에 pc를 연결하면 다음과 같은 메세지가 뜨면서 20.1이 살아납니다.

2001 Jun 16 17:21:08 %PAGP-5-PORTTOSTP:Port 2/4 joined bridge port 2/4 01:02:32: %AUTOSTATE-6-BRING_UP: Taking interface Port-channel1.10 out of Autostate mode 01:02:32: %AUTOSTATE-6-SHUT_DOWN: Putting interface Port-channel1.10 into Autostate mode 01:02:32: %AUTOSTATE-6-BRING_UP: Taking interface Port-channel1.10 out of Autostate mode  [1]

 

Switch에서의 설정 @ switch ip 설정(sc0는 default vlan 1)

 

 Console> (enable) set int sc0 1.1.1.2/24 1.1.1.255

 @ vtp domain과 mode 설정(default server mode임)

Console> (enable) set vtp domain cyber VTP domain cyber modified

Console> (enable) set vtp mode ?

client VTP client mode server VTP server mode transparent VTP transparent mode

Console> (enable) set vtp mode server VTP domain cyber modified @ vlan 생성 및 이름지정 Console> (enable) set vlan 10 name 10.x Vlan 10 configuration successful

Console> (enable) set vlan 20 name 20.x Vlan 20 configuration successful

Console> (enable) set vlan 30 name 30.x Vlan 30 configuration successful

Console> (enable) set vlan 40 name 40.x Vlan 40 configuration successful @ vlan 할당

Console> (enable) set vlan 10 2/3-10 VLAN 10 modified. VLAN 1 modified.

             VLAN Mod/Ports ---- ----------------------- 10 2/3-10

Console> (enable) set vlan 20 2/11-18 VLAN 20 modified.

             VLAN 1 modified. VLAN Mod/Ports ---- ----------------------- 20 2/11-18

Console> (enable) set vlan 30 2/19-26 VLAN 30 modified.

             VLAN 1 modified. VLAN Mod/Ports ---- ----------------------- 30 2/19-26

Console> (enable) set vlan 40 2/27-34 VLAN 40 modified.

             VLAN 1 modified. VLAN Mod/Ports ---- ----------------------- 40 2/27-34

              @ vlan 할당 확인

Console> (enable) sh vlan VLAN Name Status IfIndex Mod/Ports, Vlans ---- -------------------------------- --------- ------- -----------------------

1 default active 147 10 10.x active 152 2/3-10 20 20.x active 153 2/11-18 30 30.x active 154 2/19-26 40 40.x active 155 2/27-34 1002 fddi-default active 148 1003 token-ring-default active 151 1004 fddinet-default active 149 1005 trnet-default active 150 ...... @ channel group 생성 및 mode 설정

Console> (enable) set port channel ? Port list (ex: 2/1-4 or 2/1-2 or 2/5,2/6) all All ports

Console> (enable) set port channel 2/1-2 10 Port(s) 2/1-2 are assigned to admin group 10. 2001 Jun 16 20:00:34 %PAGP-5-PORTFROMSTP:Port 2/1 left bridge port 2/1 2001 Jun 16 20:00:35 %PAGP-5-PORTFROMSTP:Port 2/2 left bridge port 2/2

Console> (enable)

Console> (enable)

Console> (enable) set port channel 2/1-2 mode ? auto Channel auto mode desirable Channel desirable mode off Turn off Channelling on Turn on Channelling

Console> (enable) set port channel 2/1-2 mode on Port(s) 2/1-2 channel mode set to on. Console> (enable)

Console> (enable) @ trunk 설정(default로 모든 vlan이 trunk됨)

Console> (enable) set trunk 2/1 nonegotiate dot1q

Console> (enable) set trunk 2/2 nonegotiate dot1q @ trunk 확인

Console> (enable) sh trunk * - indicates vtp domain mismatch Port Mode Encapsulation Status Native vlan -------- ----------- ------------- ------------ ----------- 2/1 nonegotiate dot1q trunking 1 2/2 nonegotiate dot1q trunking 1 Port Vlans allowed on trunk -------- --------------------------------------------------------------------- 2/1 1-1005 2/2 1-1005 Port Vlans allowed and active in management domain -------- --------------------------------------------------------------------- 2/1 1,10,20,30,40 2/2 1,10,20,30,40 Port Vlans in spanning tree forwarding state and not pruned -------- --------------------------------------------------------------------- 2/1 1,10,20,30,40 2/2 1,10,20,30,40  @ config 확인

Console> (enable) sh conf 어쩌구 저쩌구.. #vtp set vtp domain cyber set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 10 name 10.x type ethernet mtu 1500 said 100010 state active set vlan 20 name 20.x type ethernet mtu 1500 said 100020 state active set vlan 30 name 30.x type ethernet mtu 1500 said 100030 state active set vlan 40 name 40.x type ethernet mtu 1500 said 100040 state active ... !

#ip set interface sc0 1 1.1.1.2/255.255.255.0 1.1.1.255

#set boot command set boot config-register 0x10f set boot system flash bootflash:cat4000.5-5-1.bin !

#module 1 : 0-port Switching Supervisor !

#module 2 : 34-port Router Switch Card set vlan 10 2/3-10 set vlan 20 2/11-18 set vlan 30 2/19-26 set vlan 40 2/27-34 set trunk 2/1 nonegotiate dot1q 1-1005 set trunk 2/2 nonegotiate dot1q 1-1005 set port channel 2/1-2 mode on !

#module 3 empty end

Console> (enable)  

[2] 라우터에서의 설정 @ router로 들어간후 port-channel sub-interface에서 trunk 셋팅

Console> (enable) session 2 Trying IntlgLineCard-2... Connected to IntlgLineCard-2. Escape character is '^]'.

Router>en Router

# Router(config)#int port-channel 10.1

Router(config-subif)#encapsulation dot1q 1

Router(config-subif)#ip address 10.10.1.1 255.255.255.0

Router(config-subif)#int port-channel 10.10

Router(config-subif)#encapsulation dot1Q 10

Router(config-subif)#ip address 10.10.10.1 255.255.255.0

Router(config-subif)#int port-channel 10.20

Router(config-subif)#encapsulation dot1Q 20

Router(config-subif)#ip address 10.10.20.1 255.255.255.0 

Router(config-subif)#int port-channel 10.30

Router(config-subif)#encapsulation dot1q 30

Router(config-subif)#ip address 10.10.30.1 255.255.255.0

Router(config-subif)#int port-channel 10.40

Router(config-subif)#encapsulation dot1q 40

Router(config-subif)#ip address 10.10.40.1 255.255.255.0

Router(config-subif)#exit @ router port channel-group 참여(10은 앞에서 스위치 번호와 같게)

Router(config)#int gi3

 Router(config-if)#channel-group 10

Router(config-if)#int gi4

Router(config-if)#channel-group 10 @ router 전체 config 확인

Router#sh conf

    interface Port-channel10

     no ip address

     no ip directed-broadcast

     interface Port-channel10.1 encapsulation dot1Q 1 native

      ip address 10.10.1.1 255.255.255.0

      interface Port-channel10.10 encapsulation dot1Q 10

       ip address 10.10.10.1 255.255.255.0

     interface Port-channel10.20

     encapsulation dot1Q 20

     ip address 10.10.20.1 255.255.255.0

   interface Port-channel10.30

    encapsulation dot1Q 30

    ip address 10.10.30.1 255.255.255.0

   interface Port-channel10.40

   encapsulation dot1Q 40

   ip address 10.10.40.1 255.255.255.0

   interface FastEthernet1

   no ip address

   no ip directed-broadcast

   shutdown

  interface GigabitEthernet1

  no ip address

  no ip directed-broadcast

  shutdown interface

  GigabitEthernet2

   no ip address

   no ip directed-broadcast

   shutdown

  interface GigabitEthernet3

   no ip address

   no negotiation auto channel-group 10

  interface GigabitEthernet4

   no ip address

   no negotiation

   auto channel-group 10

  end

Router# @ Routing table 확인

Router#sh ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last

 

resort is not set C 127.0.0.0/8 is directly connected, INBAND0 10.0.0.0/24 is subnetted, 5 subnets

                       C 10.10.1.0 is directly connected, Port-channel10.1

                       C 10.10.10.0 is directly connected, Port-channel10.10

                       C 10.10.20.0 is directly connected, Port-channel10.20

                       C 10.10.30.0 is directly connected, Port-channel10.30

                       C 10.10.40.0 is directly connected, Port-channel10.40

Router#

 이해하기 전에 다음과 같은 사전지식이 필요합니다.

 

ether channel(sub-interface), vtp(router에서의 sub-interface를 이용한 trunk, negotiate), 이 스위치는

isl을 지원하지 않고 dot1.q만 지원합니다.

위에 나온것에 대해서 모르시는 분은 이 문서를 봐도 이해 못하는 부분이 많기에 위의 것을 먼저 공부한후 보시길 권합니다.

 

다음 설명은 Cisco Catalyst 4000serier switch에 L3 모듈이 포함된 경우를 말합니다.Catalyst 4000시리즈 스위치는 4003(3slot), 4006(6slot) 이렇게 두가지가 있습니다.Catalyst 4003 스위치에 L3모듈이 꽃혀 잇는 것을 기준으로 설명합니다.그리고 MGMT를 위한 포트는 설명에서 제외합니다. 아시다 시피 4003은 슬롯이 3개 있습니다. 1번은 Supervisior를 위한 슬롯입니다. 2,3번은 다른 카드들을 삽입하면 됩니다. Supervisior 슬롯이 RS-232 타입 콘솔 포트가 있습니다. 여기에 콘솔로 접속해서 보면 다음과 같슴다.

 

Conole>sh module Mod Slot Ports Module-Type Model Sub Status

 --- ---- ----- ------------------------- ------------------- --- --------

1 1 0   Switching Supervisor WS-X4012 no faulty

2 2 34 Router Switch Card WS-X4232-L3 no ok

 

1번 슬롯은 Supervisior가 들어가 있고 2번 슬롯에 L3 모듈이 들어가 있습니다.

오늘의 핵심은 바로 요거 L3 모듈이 들어가 있을때 어떻게 셋팅을 하느냐 입니다.

L3모듈이 없을때는 일반 set 명령어 방식의 셋팅 방식과 동일하므로.. 여기서 언급할 필요가 없습니다. L3 모듈이 포함된 4000스위치는 물리적으로 하나의 스위치이지만.. 논리적으로는 라우터 한대 + 스위치 한대 = 두대의 장비입니다. 물리와 논리의 차이점은 한번만 더 말하면 천번은 되는 것 같지만...^^; 물리는 눈에 보이는 모양이고 논리는 실제로 굴러가는 모양입니다. 일반적으로 허브는 물리적으로 star형이고 논리적으로 bus형입니다. 우리가 20기가 하드 한개를 C,D 이렇게 두개로 나누어 쓰지요.. 그럼 물리적으론 한개고 논리적으론 두개임다..

 

첫째, 물리적 측면 라우터 포트 Giga port 두개(1~2번), 100메가 스위치 포트 32개(3번~34번) 둘째, 논리적 측면 라우터 포트 : Giga 4개(1~4), 스위치 포트 : Giga 2개(1~2), 100M 32개

 

(3~34) 결론적으로 이 장비는 물리적으론 하나의 스위치 이지만.. 논리적으로는 Router(Giga 4개) + 스위치(Giga 두개, 100M 32개) 이렇다는 의미입니다. 되게 헷깔리죠? 저도 첨에 되게 헷깔렸슴다. 여기서 숨어있는 인터페이스라는 게 있습니다. 숨어 잇다는 것은 밖에서는 안 보이는데 존재하고 잇다는 것이져.. 라우터 Giga3번과 4번이 숨어잇고... 스위치 1,2번이 숨어 있는 포트 입니다. 즉, 내부에 잇는 것이라 밖으로 안 보인다는 것임다~!

Console> (enable) sh port PortName Status Vlan Level Duplex Speed Type

 -------- ------------- ---------- --------- ------- ----- ------------

2/1 connected trunk normal full 1000 No GBIC

 2/2 connected trunk normal full 1000 No GBIC

2/3 notconnect 10 normal auto auto 10/100BaseTX

2/4 notconnect 20 normal auto auto 10/100BaseTX

2/5 notconnect 20 normal auto auto 10/100BaseTX

... ...

2/32 notconnect 30 normal auto auto 10/100BaseTX

2/33 notconnect 40 normal auto auto 10/100BaseTX

2/34 notconnect 1 normal auto auto 10/100BaseTX .... ...

 

위의 내용은 스위치 콘솔로 들어가서 본 내용입니다. 여기서 우리는 다시한번 헷깔리게 됩니다.^^; (제로 생각) 우리 눈으로 보이는 밖의 기가 포트(GBIC)는 스위치 포트가 아니라 라우터 포트라는 것입니다. 증거를 대보겟습니다. 위의 상황에서 2/1-2는 NO GBIC이라고 나와있쪄.. 이말이 그 뜻입니다. 스위치에서 2/1-2는 눈에 보이는 GBIC가 아니라는 것임다~! 그럼 이번에 라우터로 들어가서 포트가 어떻게 잇는지 보겟슴다~!

 

Router#sh conf interface GigabitEthernet1 메렁 메렁

           interface GigabitEthernet2 궁시렁 궁시렁

           interface GigabitEthernet3 에구 에구

           interface GigabitEthernet4 까꿍 까꿍

ip classless line con 0 transport input none end  

 

보시다시피 기가 인터페이스가 4개입니다 분명히 우리가 바깥에서 볼수 잇는 것은 두개 뿐인데도 말입니다. 바깥에서 보이는 두개의 기가 포트에 1번과 2번이라고 써있습니다.

고로 3,4번이 내부 인터페이스라는 것이죠.. 우리가 연결을 보통 다음과 같이 합니다.

RouterA - SwitchA - SwitchB RouterA와 SwitchA의 역할을 4000L3모듈 스위치에서 수행한다는 것임다. 라우터 내부에 기가포트 두개, 스위치 내부에 기가포트 두개 연결하는 것은 내부 포트가지고 한다는 것이죠.. 라우터 기가 포트 3,4번과 스위치의 기가 포트 1,2번을 연결해야 된다는 것입니다. 우리가 할것은 내부를 이더채널로 묶어서 라우터와 스위치를 연결해 주는 것입니다. 스위치에서 vlan 설정을 하고 이더채널 셋팅을 하고 uplink port에서 trunk로 넘깁니다.

라우터에서는 이더채널 채팅을 하고 sub-interface에서 trunk적용 위의 두줄이 이해 안되시는 분은 제가 처음에 말씀드렸듯이.. 사전지식을 모르고 계신것이기에 이것에 대한 질문은 사양합니다.

수학 문제 푸는데 산수공부는 기본적으로 알고 있다는 가정하에서 하는 것이져.. 수학시간에 산수문제 풀어달라는 질문은 합당치 않기에 이것에 대한 질문은 일체 받지 않겠습니다.

 

스위치에서 설정(vlan 설정을 한후 다음 설정을 합니다.)

첫째, 내부 기가포트 ether-channel 지정과 mode 설정

set port channel 2/1-2 1

set port channel 2/1-2 mode on

 

둘째, trunk 설정

set trunk 2/1 nonegotiate dot1q 1-1005

set trunk 2/2 nonegotiate dot1q 1-1005

 

위의 숫자 1~1005는 모든 vlan을 뜻하는 것인데.. 트렁크 시키고자하는 vlan만 적어줘도 됩니다.

4000시리즈는 isl을 지원안하고 802.1Q 만을 지원합니다.

그리고 여기에 연결되는 장비가 negotiate를 지원하지 않는 장비이기에 nonegotiate라는 mode로 설정합니다. 참고적으로 negotiate를 지원하지 않는 장비는 라우터와 2900XL, 3500XL 시리즈 등입니다.

제로는 예전에 이것 땜쉬.. 일주일 정도 무지 헤멨었슴다..^^; vtp negotiate를 지원하는지 안하는지 어떻게 아느냐구요? trunk mode는 on, off, auto, desirable, nonegotiate등이 잇습니다.

 

라우터나 2900xl, 3500xl장비에 들어가서 trunk mode에서 위의 옵션을 선택하는 메뉴가 없다면..

당근히 negotiate를 지원하지 않는다고 보시면 됩니다.

유식한 말로 DTP 또는 DISL 프레임이라고 하지여.. 이제 라우터에서 트렁크 설정을 해야겟져..

지면 관계상 vlan1과 4개의 vlan이 있다고 가정하고..

interface Port-channel1.1 encapsulation dot1Q 1 ip address 10.10.1.1 255.255.255.0

interface Port-channel1.10 encapsulation dot1Q 10 ip address 10.10.10.1 255.255.255.0

interface Port-channel1.20 encapsulation dot1Q 20 ip address 10.10.20.1 255.255.255.0

interface Port-channel1.30 encapsulation dot1Q 30 ip address 10.10.30.1 255.255.255.0

interface Port-channel1.40 encapsulation dot1Q 40 ip address 10.10.40.1 255.255.255.0

interface FastEthernet1

no ip address

no ip directed-broadcast

interface GigabitEthernet1 ip address 메렁

interface GigabitEthernet2 ip address 메롱

interface GigabitEthernet3 no ip address channel-group 1

interface GigabitEthernet4 no ip address channel-group 1

 

위에서 interface FastEthernet1은 MGMT를 위한 것이므로 설명에서 제외시켰습니다.

이제 모든 것이 끝났습니다. 그렇다면 지금 현재 스위치에 접속해 있는데 라우터로 갈려면 콘솔을 빼서 라우터 콘솔에 다시 접속해야 되냐고 할지 몰라서 그러는데..

다른 L3스위치와 마찬가지로 session 번호 이렇게 하면 라우터로 들어갑니다.

맨 처음에

Conole>sh module Mod Slot Ports Module-Type Model Sub Status

--- ---- ----- ------------------------- ------------------- --- --------

1 1 0  Switching Supervisor WS-X4012 no faulty

2 2 34 Router Switch Card WS-X4232-L3 no ok

 

2번 슬롯이 L3 이므로.. Console> session 2 이렇게 하면 라우터로 들어가게 됩니다.  

지금 부터는 상세한 셋팅에 대해서 알아 봅니다.

우리가 지금부터 할것은 vlan 1(10.10.1.0/24)과 vlan 10(10.10.10.0/24),vlan20(10.10.20.0/24),

vlan30(10.10.30.0/24), vlan40(10.10.40.0/24) 그리고 각 vlan의 라우터 ip는 각 network의 1번입니다.

즉, vlan1의 라우터 ip는 10.10.1.1/24, vlan10은 10.10.10.1, vlan20은 10.10.20.1vlan 30은 10.10.30.1,

vlan 40은 10.10.40.1 이렇게 셋팅할려고 합니다.

보통 pc에서의 default gateway가 되는 라우터 이더넷 인터페이스 주소는 각 네트웍의 1번이나 254번

으로 셋팅하는 경우가 많은데..저 같은 경우는 예전 부터 1번으로 셋팅하는 것이 습관이 되어서..

1번이 편하더군여..그리고 다 아시는 말이겟지만.. vlan 20에 연결된 pc나 스위치가 없다면 20.1로는

ping이 안됩니다.

vlan20에 pc를 연결하면 다음과 같은 메세지가 뜨면서 20.1이 살아납니다.

2001 Jun 16 17:21:08 %PAGP-5-PORTTOSTP:Port 2/4 joined bridge port 2/4 01:02:32: %AUTOSTATE-6-BRING_UP: Taking interface Port-channel1.10 out of Autostate mode 01:02:32: %AUTOSTATE-6-SHUT_DOWN: Putting interface Port-channel1.10 into Autostate mode 01:02:32: %AUTOSTATE-6-BRING_UP: Taking interface Port-channel1.10 out of Autostate mode  [1]

 

Switch에서의 설정 @ switch ip 설정(sc0는 default vlan 1)

 

 Console> (enable) set int sc0 1.1.1.2/24 1.1.1.255

 @ vtp domain과 mode 설정(default server mode임)

Console> (enable) set vtp domain cyber VTP domain cyber modified

Console> (enable) set vtp mode ?

client VTP client mode server VTP server mode transparent VTP transparent mode

Console> (enable) set vtp mode server VTP domain cyber modified @ vlan 생성 및 이름지정 Console> (enable) set vlan 10 name 10.x Vlan 10 configuration successful

Console> (enable) set vlan 20 name 20.x Vlan 20 configuration successful

Console> (enable) set vlan 30 name 30.x Vlan 30 configuration successful

Console> (enable) set vlan 40 name 40.x Vlan 40 configuration successful @ vlan 할당

Console> (enable) set vlan 10 2/3-10 VLAN 10 modified. VLAN 1 modified.

             VLAN Mod/Ports ---- ----------------------- 10 2/3-10

Console> (enable) set vlan 20 2/11-18 VLAN 20 modified.

             VLAN 1 modified. VLAN Mod/Ports ---- ----------------------- 20 2/11-18

Console> (enable) set vlan 30 2/19-26 VLAN 30 modified.

             VLAN 1 modified. VLAN Mod/Ports ---- ----------------------- 30 2/19-26

Console> (enable) set vlan 40 2/27-34 VLAN 40 modified.

             VLAN 1 modified. VLAN Mod/Ports ---- ----------------------- 40 2/27-34

              @ vlan 할당 확인

Console> (enable) sh vlan VLAN Name Status IfIndex Mod/Ports, Vlans ---- -------------------------------- --------- ------- -----------------------

1 default active 147 10 10.x active 152 2/3-10 20 20.x active 153 2/11-18 30 30.x active 154 2/19-26 40 40.x active 155 2/27-34 1002 fddi-default active 148 1003 token-ring-default active 151 1004 fddinet-default active 149 1005 trnet-default active 150 ...... @ channel group 생성 및 mode 설정

Console> (enable) set port channel ? Port list (ex: 2/1-4 or 2/1-2 or 2/5,2/6) all All ports

Console> (enable) set port channel 2/1-2 10 Port(s) 2/1-2 are assigned to admin group 10. 2001 Jun 16 20:00:34 %PAGP-5-PORTFROMSTP:Port 2/1 left bridge port 2/1 2001 Jun 16 20:00:35 %PAGP-5-PORTFROMSTP:Port 2/2 left bridge port 2/2

Console> (enable)

Console> (enable)

Console> (enable) set port channel 2/1-2 mode ? auto Channel auto mode desirable Channel desirable mode off Turn off Channelling on Turn on Channelling

Console> (enable) set port channel 2/1-2 mode on Port(s) 2/1-2 channel mode set to on. Console> (enable)

Console> (enable) @ trunk 설정(default로 모든 vlan이 trunk됨)

Console> (enable) set trunk 2/1 nonegotiate dot1q

Console> (enable) set trunk 2/2 nonegotiate dot1q @ trunk 확인

Console> (enable) sh trunk * - indicates vtp domain mismatch Port Mode Encapsulation Status Native vlan -------- ----------- ------------- ------------ ----------- 2/1 nonegotiate dot1q trunking 1 2/2 nonegotiate dot1q trunking 1 Port Vlans allowed on trunk -------- --------------------------------------------------------------------- 2/1 1-1005 2/2 1-1005 Port Vlans allowed and active in management domain -------- --------------------------------------------------------------------- 2/1 1,10,20,30,40 2/2 1,10,20,30,40 Port Vlans in spanning tree forwarding state and not pruned -------- --------------------------------------------------------------------- 2/1 1,10,20,30,40 2/2 1,10,20,30,40  @ config 확인

Console> (enable) sh conf 어쩌구 저쩌구.. #vtp set vtp domain cyber set vlan 1 name default type ethernet mtu 1500 said 100001 state active set vlan 10 name 10.x type ethernet mtu 1500 said 100010 state active set vlan 20 name 20.x type ethernet mtu 1500 said 100020 state active set vlan 30 name 30.x type ethernet mtu 1500 said 100030 state active set vlan 40 name 40.x type ethernet mtu 1500 said 100040 state active ... !

#ip set interface sc0 1 1.1.1.2/255.255.255.0 1.1.1.255

#set boot command set boot config-register 0x10f set boot system flash bootflash:cat4000.5-5-1.bin !

#module 1 : 0-port Switching Supervisor !

#module 2 : 34-port Router Switch Card set vlan 10 2/3-10 set vlan 20 2/11-18 set vlan 30 2/19-26 set vlan 40 2/27-34 set trunk 2/1 nonegotiate dot1q 1-1005 set trunk 2/2 nonegotiate dot1q 1-1005 set port channel 2/1-2 mode on !

#module 3 empty end

Console> (enable)  

[2] 라우터에서의 설정 @ router로 들어간후 port-channel sub-interface에서 trunk 셋팅

Console> (enable) session 2 Trying IntlgLineCard-2... Connected to IntlgLineCard-2. Escape character is '^]'.

Router>en Router

# Router(config)#int port-channel 10.1

Router(config-subif)#encapsulation dot1q 1

Router(config-subif)#ip address 10.10.1.1 255.255.255.0

Router(config-subif)#int port-channel 10.10

Router(config-subif)#encapsulation dot1Q 10

Router(config-subif)#ip address 10.10.10.1 255.255.255.0

Router(config-subif)#int port-channel 10.20

Router(config-subif)#encapsulation dot1Q 20

Router(config-subif)#ip address 10.10.20.1 255.255.255.0 

Router(config-subif)#int port-channel 10.30

Router(config-subif)#encapsulation dot1q 30

Router(config-subif)#ip address 10.10.30.1 255.255.255.0

Router(config-subif)#int port-channel 10.40

Router(config-subif)#encapsulation dot1q 40

Router(config-subif)#ip address 10.10.40.1 255.255.255.0

Router(config-subif)#exit @ router port channel-group 참여(10은 앞에서 스위치 번호와 같게)

Router(config)#int gi3

 Router(config-if)#channel-group 10

Router(config-if)#int gi4

Router(config-if)#channel-group 10 @ router 전체 config 확인

Router#sh conf

    interface Port-channel10

     no ip address

     no ip directed-broadcast

     interface Port-channel10.1 encapsulation dot1Q 1 native

      ip address 10.10.1.1 255.255.255.0

      interface Port-channel10.10 encapsulation dot1Q 10

       ip address 10.10.10.1 255.255.255.0

     interface Port-channel10.20

     encapsulation dot1Q 20

     ip address 10.10.20.1 255.255.255.0

   interface Port-channel10.30

    encapsulation dot1Q 30

    ip address 10.10.30.1 255.255.255.0

   interface Port-channel10.40

   encapsulation dot1Q 40

   ip address 10.10.40.1 255.255.255.0

   interface FastEthernet1

   no ip address

   no ip directed-broadcast

   shutdown

  interface GigabitEthernet1

  no ip address

  no ip directed-broadcast

  shutdown interface

  GigabitEthernet2

   no ip address

   no ip directed-broadcast

   shutdown

  interface GigabitEthernet3

   no ip address

   no negotiation auto channel-group 10

  interface GigabitEthernet4

   no ip address

   no negotiation

   auto channel-group 10

  end

Router# @ Routing table 확인

Router#sh ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last

 

resort is not set C 127.0.0.0/8 is directly connected, INBAND0 10.0.0.0/24 is subnetted, 5 subnets

                       C 10.10.1.0 is directly connected, Port-channel10.1

                       C 10.10.10.0 is directly connected, Port-channel10.10

                       C 10.10.20.0 is directly connected, Port-channel10.20

                       C 10.10.30.0 is directly connected, Port-channel10.30

                       C 10.10.40.0 is directly connected, Port-channel10.40

Router#