. L3 Switch.pdf

multi layer

기본적으로 L3 switch는 ports들이 모두 L2로 되어있다.

  1. L3로 바꿔서 주소를 주는방법, routed port 는 no switchport 명령어를 이용하여 스위치 포트를 라우터 포트처럼 사용하는 방법

    [Routed]
    **ip routing**
    
    interface f1/0
    **no switchport**
    ip addres 1.1.1.1 255.255.255.0
    
  2. L2에 vlan 으로 주소를 준다. SVI(Switch Virtual Interface)는 interface vlan 명령어를 이용하여 스위치 VLAN에 IP 주소 할당하는 방법

    [SVI] access mode 
    **ip routing**
    
    vlan 10
    
    interface vlan 10
    ip address 1.1.12.1 255.255.255.0
    no shutdown 
    
    interface f1/0
    switchport mode access
    switchport access vlan 10
    
    [SVI] trunk mode 
    ip routing
    vlan 10  => vlan을 미리 생성해 주어야 한다.
    
    interface vlan 10
    ip address 1.1.12.1 255.255.255.0
    no shutdown
    
    interface f1/0
    switchport trunk encapsulation dot1q
    switchport mode trunk
    

■ L2스위치

■ L3스위치

<예제1>

23123123214.PNG

L3 Switch2
interface GigabitEthernet0/0
 no switchport
 ip address 192.168.20.2 255.255.255.0
 negotiation auto
!
interface GigabitEthernet0/1
 no switchport
 ip address 1.1.12.2 255.255.255.0
 negotiation auto

<vpc ip 입력하기>

ip [ip address]/subnet [default gate]
save

VPCS> ip 192.168.20.1/24 192.168.20.2
Checking for duplicate address...
PC1 : 192.168.20.1 255.255.255.0 gateway 192.168.20.2

<제대로 적었는지 확인하는 방법>
vpcs> show ip

<예제2- vlan 모드>

scx.PNG

L3 switch 
ip routing 

interface Vlan10
 ip address 192.168.10.2 255.255.255.0
 no sh 
!
interface Vlan20
 ip address 192.168.20.2 255.255.255.0
 no sh

interface GigabitEthernet0/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
L2 Switch
no ip routing

interface GigabitEthernet0/0
 switchport access vlan 10
 switchport mode access
!
interface GigabitEthernet0/1
 switchport access vlan 20
 switchport mode access

interface GigabitEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk

<종합>

si1.PNG

<L3-A>
ip routing
vlan 10
vlan 20

interface GigabitEthernet0/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 negotiation auto
!
interface GigabitEthernet0/1
 no switchport
 ip address 1.1.12.1 255.255.255.0
 negotiation auto
 
interface Vlan10
 ip address 192.168.10.254 255.255.255.0
!
interface Vlan20
 ip address 192.168.20.254 255.255.255.0
<L3-B>

interface GigabitEthernet0/0   => SVI VLAN 100
 switchport access vlan 100
 switchport mode access
 media-type rj45
 negotiation auto
!
interface Vlan100
 ip address 1.1.23.1 255.255.255.0
!
interface GigabitEthernet0/1   => routed
 no switchport
 ip address 1.1.12.2 255.255.255.0
 negotiation auto

<L3-C>
interface GigabitEthernet0/0
 switchport access vlan 30
 switchport mode access
 media-type rj45
 negotiation auto
!
interface GigabitEthernet0/1
 switchport access vlan 30
 switchport mode access
 media-type rj45
 negotiation auto
!
interface GigabitEthernet0/2
 switchport access vlan 100
 switchport mode access
 media-type rj45
 negotiation auto
!
interface GigabitEthernet0/3
 switchport access vlan 101
 switchport mode access
 media-type rj45
 negotiation auto
!
interface Vlan30
 ip address 192.168.30.254 255.255.255.0
!
interface Vlan100
 ip address 1.1.23.2 255.255.255.0
!
interface Vlan101
 ip address 1.1.34.1 255.255.255.0
<L3-D>
ip routing
vlan 40  => vlan 생성
vlan 50
vlan 60

interface GigabitEthernet0/1
 no switchport
 ip address 1.1.34.2 255.255.255.0
 negotiation auto
!
interface GigabitEthernet0/0
 switchport trunk encapsulation dot1q
 switchport mode trunk
 media-type rj45
 negotiation auto
!
 interface Vlan40
 ip address 192.168.40.254 255.255.255.0
!
interface Vlan50
 ip address 192.168.50.254 255.255.255.0
!
interface Vlan60
 ip address 192.168.60.254 255.255.255.0

. Trunk.pdf

L3 Switch.VLAN에 IP주소 입력 이해.jpg