[On-premise] L3 스위치 / VLAN, Trunk, NAT

2024. 11. 14. 15:16·Network/Network[On-Premise]

 

설명: 여러개의 VLAN을 설정하고 DHCP, NAT 설정하여 네트워크를 구성하고, 외부 통신까지 해주는 네트워크를 구성해볼 것이다. 

역할: L3 스위치 포트 설정


# L2 스위치 작업 - SW1 / SW2

sw1(config)#int f0/1
sw1(config-if)#switch mode access
sw1(config-if)#switch access vlan 10

sw1(config)#int f02
sw1(config-if)#switch mode access
sw1(config-if)#switch access vlan 20

sw1(config)#int f0/3
sw1(config-if)#switchport mode trunk
sw1(config-if)#int f0/4
sw1(config-if)#switchport mode trunk

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

sw2(config)#int f0/1
sw2(config-if)#switch mode access
sw2(config-if)#switch access vlan 10

sw2(config)#int f02
sw2(config-if)#switch mode access
sw2(config-if)#switch access vlan 20

sw2(config)#int f0/3
sw2(config-if)#switchport mode trunk
sw2(config-if)#int f0/4
sw2(config-if)#switchport mode trunk

#L3 스위치 작업

L3-sw(config)#ip routing

L3-sw(config)# int g0/1
L3-sw(config-if)#no switchport
L3-sw(config-if)#ip add 192.168.10.1 255.255.255.0

L3-sw(config)#int g0/2
L3-sw(config-if)#no switchport
L3-sw(config-if)#ip add 192.168.20.1 255.255.255.0

L3-sw(config)#int g0/3
L3-sw(config-if)#no switchport
L3-sw(config-if)#ip add 172.16.10.2 255.255.255.252

* 정적 라우팅 설정
L3-sw(config)#ip route 10.100.102.0 255.255.255.0 172.16.10.1

 

L3 스위치와 R1 라우터 간 정적 라우팅 설정을 통해 네트워크 통신을 구성해야한다. 정적라우팅을 설정할 때 10.100.102.0/24 네트워크로의 트래픽을 R1 라우터의 172.16.10.1 인터페이스를 통해 전달하도록 경로를 설정해주었다. 


 

# 라우터

R1(config)#int f0/0
R1(config-if)#ip add 172.16.10.254
R1(config-if)#no sh

R1(config)#int f0/1
R1(config-if)#ip add 10.100.102.214
R1(config-if)#no sh

R1(config)#ip nat source list 10 int f0/1 overload
R1(config)#access-list 10 permit 172.16.10.0 0.0.0.3
R1(config)#access-list 10 permit 192.168.10.0 0.0.0.255
R1(config)#access-list 10 permit 192.168.20.0 0.0.0.255

 

#DHCP 설정

https://xoodongxoo.tistory.com/140

 

[Linux] eve - DHCP 설정

#DHCP Server 설정# rpm -qa | grep dhcp# rpm -ql dhcp# yum -y remove dhcp*# yum -y install dhcp # yum -y install dhcp-devel# cd /usr/share/doc/dhcp*# cp dhcpd .conf.sample /etc/dhcpd.conf# vi /etc/dhcpd.conf # service dhcpd restart# ifconfig eth0# cat /va

xoodongxoo.tistory.com


결과

 

'Network > Network[On-Premise]' 카테고리의 다른 글

[On-premise] Static Routing 설정  (3) 2024.11.17
[On-Premise] NAT (사설 IP = 외부 IP 연결)  (0) 2024.11.17
[On-premise] VTP 실습  (0) 2024.11.15
[On-premise] RIP(v2), EIGRP(서브넷팅, 키체인, 디폴트 라우팅, 축약, SSH 등)  (0) 2024.10.05
[On-Premise] RIP 동적 라우팅 실습  (0) 2024.09.19
'Network/Network[On-Premise]' 카테고리의 다른 글
  • [On-Premise] NAT (사설 IP = 외부 IP 연결)
  • [On-premise] VTP 실습
  • [On-premise] RIP(v2), EIGRP(서브넷팅, 키체인, 디폴트 라우팅, 축약, SSH 등)
  • [On-Premise] RIP 동적 라우팅 실습
Kouji
Kouji
Journey to Becoming a Data & Server Engineer
  • Kouji
    Kouji's Data & Server Journey
    Kouji
  • 전체
    오늘
    어제
    • 분류 전체보기
      • Programming
        • Python
        • SQL
      • Data & AI
        • Data Analysis
        • Ai
      • Cloud(AWS)
      • OS
        • Linux
        • Docker
        • Jenkins
        • Ubuntu
        • Window
        • Kubernates
        • Ansible
      • Network
        • NVIDIA
        • Network[이론]
        • Network[GNS3, Packet]
        • Network[On-Premise]
        • Network [L2, L3]
      • 트러블 슈팅
      • Life
        • My Career Stories
        • Personal
      • 개발 + OS 지식 함양
  • 블로그 메뉴

    • 홈
    • 관리 페이지
    • 글쓰기
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    보안
    서버엔지니어
    인프라
    스위치
    라우팅
    AWS
    VMware
    알고리즘
    docker
    Linux
    화이팅
    시스템엔지니어
    네트워크엔지니어
    OS
    네트워크
    IT
    오블완
    웹
    도커
    네트워크관리사
    인프라엔지니어
    티스토리챌린지
    CISCO
    dns
    L3
    네트워크엔지니어링
    서버
    리눅스
    ubuntu
    클라우드엔지니어
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
Kouji
[On-premise] L3 스위치 / VLAN, Trunk, NAT
상단으로

티스토리툴바