728x90

리눅스 명령어 실습

 

uname [OPTION]

- 운영 체제 버전, 커널 버전 등을 확인하는 명령어

 

OPTION 설명
-s 운영체제 종류 확인
-r 커널 버전 확인

 

cal

- 달력 출력 명령어

 

OPTION 설명
cal 오늘 날짜의 달력 출력
cal MM YYYY 특정 연월 달력 출력
cal DD MM YYYY 특정 일의 달력 출력

 

 

여러 명령어를 한 줄에 입력($ COMMAND1;COMMAND2)

 - 명령어와 명령어 사이의 구분자로 세미콜론(;)을 사용하여 여러 명령어를 한 줄에 입력할 수 있음

 - 명령어를 입력한 순서대로 출력(COMMAND1 실행 > COMMAND2 실행)

728x90
728x90

계층 구조 소개

 

* 점선: 링크를 의미함

 

bin 일반 명령어
boot bootloader 관련 설정 파일, 초기 부팅 파일 시스템
dev 시스템의 장치(하드웨어 장치) 파일
etc 시스템 설정 파일
home 일반 사용자의 홈 디렉토리가 위치함
root 루트 사용자 디렉토리
tmp 모든 사용자들이 사용 가능한 디렉토리
usr 소프트웨어 설치 시 설치되는 파일들이 위치함
var 로그 파일 저장

 

작업 디렉토리와 파일 경로 지정

 

홈 디렉토리

 - 사용자가 파일 생성, 삭제 등의 작업을 할 수 있는 경로

 

작업 디렉토리

 - 사용자가 명령어를 실행할 때 기준이 되는 경로

 - 사용자 로그인 후 기본 작업 디렉토리는 사용자의 홈 디렉토리로 지정됨

 - 작업 디렉토리 변경 시 cd 명령어를 사용하여 변경할 수 있음

 - 현재 작업 디렉토리는 pwd 명령어로 확인할 수 있음

 

절대 경로

 - 최상위 디렉토리(/)부터 시작하는 전체 경로

 

상대 경로

- 작업 디렉토리로부터 대상 파일의 상대적인 경로

. : 현재 디렉토리

.. : 1단계 상위 디렉토리

 

728x90
728x90

리눅스 운영체제의 구조

 

 

1. 커널(Kernel)

 - 하드웨어를 직접적으로 컨트롤 할 수 있는 막강한 권한을 가짐

 - 운영체제의 핵심 구성 요소

 

2. 쉘(Shell)

 - 유닉스/리눅스 시스템에서 사용자와 커널 사이의 인터페이스를 담당하는 프로그램

 - 사용자가 명령을 전달하면 커널이 이해할 수 있는 명령어로 해석하여 커널로 전달함

 - 종류: Bourne Shell, Bash Shell, C Shell, Korn Shell, Z Shell 등

          (* 유닉스의 기본 쉘 : Bourne Shell, * 리눅스의 기본 쉘 : Bash Shell)

 

3. 디렉토리(Directory)

 - 파일을 포함하는 특수한 파일

 

 

명령어의 기본 구조

 

명령어의 기본 구조

 

command option argument

- command: 시스템에 설치되어 있는 프로그램 이름

- option: command를 실행했을 때 출력 값 조정

- argument: command를 실행할 때 적용이 되는 대상

 

명령어 사용법 확인 방법

1. --help 옵션 사용: 명령어의 간략한 사용법 확인(옵션 위주)

2. man 명령어(메뉴얼 페이지) 사용: 명령어에 대한 자세한 설명 확인

 

Section 별 메뉴얼 페이지

 

섹션을 지정하여 메뉴얼 페이지 확인

 $ man -s  SECTION  COMMAND

 

원하는 메뉴얼 페이지 검색(제목, 설명)

 $ man -k KEYWORD

 

원하는 메뉴얼 페이지 검색(제목)

 $ man -f KEYWORD

 

 

728x90
728x90

1. 가상 머신 생성

 

머신 > 새로 만들기

 

이름 및 운영체제 선택
메모리 할당
하드 디스크 생성 옵션 선택

 

하드 디스크 파일 형식 선택

 

하드 디스크 할당 방식 선택

* 동적 할당: 디스크에 저장한 데이터만큼 공간이 자동으로 늘어남

* 고정 크기: 처음부터 디스크의 공간을 고정된 크기로 차지함

 

생성할 하드 디스크 크기 지정 후 만들기

 

2. 가상 머신 환경 설정

 

생성한 가상 머신 선택 후 설정 클릭

 

1) 저장소 설정

설정 > 저장소 > 비어 있음 > 디스크 파일 선택 > 디스크에 장착된 것 확인

 

 

이미지 파일 선택
디스크에 장착된 것 확인

 

2) 네트워크 설정

 

네트워크 > 어댑터 1 >  NAT: 인터넷과 연결
네트워크 > 어댑터 2 > 호스트 전용 어댑터: 내부 네트워크와 연결

 

 

 

3) 시스템 설정

 

 

 

3. 가상 머신에 CentOS 7 설치

 

1) Install CentOS 7

 

Install CentOS 7 선택

 

사용할 언어 선택: English

 

2) DATE & TIME

 

시간 및 날짜 설정

 

서울 선택

 

3) SOFTWARE SELECTION

 

 

옵션에 따라 설치되는 패키지가 달라짐

 

4) INSTALLATION DESTINATION

 

디스크 설정

 

파티션 자동으로 구성

 

설정 값으로 구성 시작

 

5) ROOT PASSWORD

 

관리자 사용자 암호 설정

 

관리자 사용자 암호 설정(root ​/root )

 

6) USER CREATION

 

사용자 추가

 

사용자 추가(user/user)

* Make this user administrator : 관리자 사용자 권한을 빌림

 

 

7) LICENSE INFORMATION

 

 

 

 

8) NETWORK & HOST NAME

 

 

네트워크 카드 연결(Off > On)

 

 

 

 

 

 

8) 가상 머신 환경 설정(root/root 사용자 로그인, user/user 로그인)

 

 8-1) 네트워크 설정

 

 

 

재부팅 시 자동으로 네트워크 연결

 

enp0s8 > IPv4 192.168.56.101 255.255.255.0

 

 

8-2) 해상도 설정

 

Devices > Display > Resolution > 1280x800

 

8-3) 드래그 앤 드롭 설정

 

 

4. 스냅샷 생성

- 가상 머신의 현재 상태 저장

- 가상 머신의 전원을 종료 후에 찍는 것을 권장

- 추후 가상 머신에 문제가 생겼을 때 스냅샷을 이용해 복원 가능

 

 

스냅샷 이름 지정

 

스냅샷 생성 완료

728x90
728x90

토폴로지

 

1. PC IP 주소 설정

 

  PC0 PC1 PC2 PC3
IP Address 195.110.10.11 195.110.10.12 195.120.20.21 195.120.20.22
Subnet Mask 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0
Gateway 192.110.10.1 192.110.10.1 195.120.20.1 195.120.20.1

 

2. 같은 IP 대역 내에서 통신 확인

 

PC0에서 PC1로 통신 확인
PC2에서 PC3로 통신 확인

 

3. 라우터 인터페이스 설정

 

Router>
Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface gi0/0
Router(config-if)#ip address 195.110.10.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface gi0/1
Router(config-if)#ip address 195.120.20.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit

 

4. 라우팅 테이블 확인

 

Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip route
Codes: L - local, C - connected, S - static, 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, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     195.110.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.110.10.0/24 is directly connected, GigabitEthernet0/0
L       195.110.10.1/32 is directly connected, GigabitEthernet0/0
     195.120.20.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.120.20.0/24 is directly connected, GigabitEthernet0/1
L       195.120.20.1/32 is directly connected, GigabitEthernet0/1

 

5. 통신 확인

 

PC0에서 PC2로 통신 확인

 

PC3에서 PC1로 통신 확인

 

728x90
728x90

토폴로지

 

 

1. 라우터 인터페이스 설정

 

 1) R1 라우터 인터페이스 설정

 

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface gi0/0
R1(config-if)#ip address 203.230.7.1 255.255.255.0
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

R1(config-if)#exit
R1(config)#
R1(config)#
R1(config)#interface s0/2/0
R1(config-if)#ip address 203.230.8.1 255.255.255.0
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/2/0, changed state to down

 

Serial Interface 설정

 

R1(config-if)#clock rate ?
Speed (bits per second
  1200           
  2400           
  4800           
  9600           
  19200          
  38400          
  56000          
  64000          
  72000          
  125000         
  128000         
  148000         
  250000         
  500000         
  800000         
  1000000        
  1300000        
  2000000        
  4000000        
  <300-4000000>  Choose clockrate from list above
R1(config-if)#clock rate 72000
R1(config-if)#exit

 

 2) R2 인터페이스 설정

 

Router>enable
Router#configure terminal
Router(config)#interface g0/0
Router(config-if)#ip address 203.230.9.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#interface s0/2/1
Router(config-if)#ip address 203.230.8.2 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/2/1, changed state to up

Router(config-if)#clock ra
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/1, changed state to up
t
% Incomplete command.
Router(config-if)#clock rate 72000
This command applies only to DCE interfaces
Router(config-if)#
Router(config-if)#
Router(config-if)#exit
Router(config)#interface s0/2/0
Router(config-if)#ip address 203.230.10.1 255.255.255.0
Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/2/0, changed state to down
Router(config-if)#clock rate 72000
Router(config-if)#exit
Router(config)#

 

 3) R3 인터페이스 설정

 

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface gi0/0
Router(config-if)#ip address 203.230.11.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#exit
Router(config)#interface s0/2/1
Router(config-if)#ip address 203.230.10.2 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/2/1, changed state to up

Router(config-if)#clock rate 72000
This command applies only to DCE interfaces
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/1, changed state to up

Router(config-if)#exit
Router(config)#

 

 

2. 라우팅 테이블 설정

 

 1) R1 라우팅 테이블 설정

 

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip route 203.230.9.0 255.255.255.0 203.230.8.2
R1(config)#ip route 203.230.10.0 255.255.255.0 203.230.8.2
R1(config)#ip route 203.230.11.0 255.255.255.0 203.230.8.2

 

2) R2 라우팅 테이블 설정

 

R2(config)#ip route 203.230.7.0 255.255.255.0 203.230.8.1
R2(config)#ip route 203.230.11.0 255.255.255.0 203.230.10.2

 

 3) R3 라우팅 테이블 설정

 

R3(config)#ip route 203.230.7.0 255.255.255.0 203.230.10.1
R3(config)#ip route 203.230.9.0 255.255.255.0 203.230.10.1

 

 

3. 라우팅 테이블 확인

 

 1) R1 라우팅 테이블

 

R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console

R1#show ip route
Gateway of last resort is not set

     203.230.7.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.230.7.0/24 is directly connected, GigabitEthernet0/0
L       203.230.7.1/32 is directly connected, GigabitEthernet0/0
     203.230.8.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.230.8.0/24 is directly connected, Serial0/2/0
L       203.230.8.1/32 is directly connected, Serial0/2/0
S    203.230.9.0/24 [1/0] via 203.230.8.2
S    203.230.10.0/24 [1/0] via 203.230.8.2
S    203.230.11.0/24 [1/0] via 203.230.8.2

 

 2) R2 라우팅 테이블

 

R2(config)#exit
R2#show ip route

Gateway of last resort is not set

S    203.230.7.0/24 [1/0] via 203.230.8.1
     203.230.8.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.230.8.0/24 is directly connected, Serial0/2/1
L       203.230.8.2/32 is directly connected, Serial0/2/1
     203.230.9.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.230.9.0/24 is directly connected, GigabitEthernet0/0
L       203.230.9.1/32 is directly connected, GigabitEthernet0/0
     203.230.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.230.10.0/24 is directly connected, Serial0/2/0
L       203.230.10.1/32 is directly connected, Serial0/2/0
S    203.230.11.0/24 [1/0] via 203.230.10.2

 

 3) R3 라우팅 테이블

 

R3(config)#exit
R3#
%SYS-5-CONFIG_I: Configured from console by console

R3#show ip route
Gateway of last resort is not set

S    203.230.7.0/24 [1/0] via 203.230.10.1
S    203.230.9.0/24 [1/0] via 203.230.10.1
     203.230.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.230.10.0/24 is directly connected, Serial0/2/1
L       203.230.10.2/32 is directly connected, Serial0/2/1
     203.230.11.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.230.11.0/24 is directly connected, GigabitEthernet0/0
L       203.230.11.1/32 is directly connected, GigabitEthernet0/0

 

 

4. 통신 확인

 

PC 1에서 PC2로 통신되는 것 확인

 

PC1에서 PC3로 통신되는 것 확인

728x90
728x90

토폴로지

 

1. PC IP 주소 설정

 

 

  PC0 PC1 PC2 PC3
IP Address 195.110.10.11 195.110.10.12 195.120.20.21 195.120.20.22
Subnet Mask 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0
Gateway 192.110.10.1 192.110.10.1 195.120.20.1 195.120.20.1

 

2. 라우터 인터페이스 설정

 

R1 라우터 인터페이스 설정

 

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface gi0/0
R1(config-if)#ip address 195.110.10.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

R1(config-if)#exit
R1(config)#
R1(config)#interface gi0/1
R1(config-if)#ip address 195.100.0.1 255.255.255.0
R1(config-if)#no shutdown

R1(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

R1(config-if)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console

 

R2 라우터 인터페이스 설정

 

Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface gi0/0
R2(config-if)#ip address 195.120.20.1 255.255.255.0
R2(config-if)#no shutdown

R2(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

R2(config-if)#exit
R2(config)#interface gi0/1
R2(config-if)#ip address 195.100.0.2 255.255.255.0
R2(config-if)#no shutdown

R2(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

R2(config-if)#exit

 

3. 라우팅 테이블 확인 (show ip route)

 

R1 라우팅 테이블

 

R1#show ip route
Codes: L - local, C - connected, S - static, 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, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     195.100.0.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.100.0.0/24 is directly connected, GigabitEthernet0/1
L       195.100.0.1/32 is directly connected, GigabitEthernet0/1
     195.110.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.110.10.0/24 is directly connected, GigabitEthernet0/0
L       195.110.10.1/32 is directly connected, GigabitEthernet0/0

 

R2 라우팅 테이블

 

R2(config)#exit
R2#
%SYS-5-CONFIG_I: Configured from console by console

R2#show ip route
Codes: L - local, C - connected, S - static, 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, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     195.100.0.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.100.0.0/24 is directly connected, GigabitEthernet0/1
L       195.100.0.2/32 is directly connected, GigabitEthernet0/1
     195.120.20.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.120.20.0/24 is directly connected, GigabitEthernet0/0
L       195.120.20.1/32 is directly connected, GigabitEthernet0/0

 

Request timed out 이유(PC0 > PC2)

- 라우팅 테이블에 정보가 없음

- R1에서 195.120.20.0 대역 업데이트 필요

- R2에서 195.110.10.0 대역 업데이트 필요

 

4. Static Routing 설정

 

R1 라우터

 

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip route 195.120.20.0 255.255.255.0 ?
  A.B.C.D          Forwarding router's address
  Dialer           Dialer interface
  Ethernet         IEEE 802.3
  FastEthernet     FastEthernet IEEE 802.3
  GigabitEthernet  GigabitEthernet IEEE 802.3z
  Loopback         Loopback interface
  Null             Null interface
  Serial           Serial
  Vlan             Catalyst Vlans
R1(config)#ip route 195.120.20.0 255.255.255.0 195.100.0.2
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console

 

R2 라우터

 

R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#ip route 195.110.10.0 255.255.255.0 195.100.0.1
R2(config)#exit
R2#
%SYS-5-CONFIG_I: Configured from console by console

 

 

5. 라우팅 테이블 확인

 

R1 라우팅 테이블

 

R1#show ip route
Codes: L - local, C - connected, S - static, 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, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     195.100.0.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.100.0.0/24 is directly connected, GigabitEthernet0/1
L       195.100.0.1/32 is directly connected, GigabitEthernet0/1
     195.110.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.110.10.0/24 is directly connected, GigabitEthernet0/0
L       195.110.10.1/32 is directly connected, GigabitEthernet0/0
S    195.120.20.0/24 [1/0] via 195.100.0.2

 

R2 라우팅 테이블

 

R2#show ip route
Codes: L - local, C - connected, S - static, 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, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     195.100.0.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.100.0.0/24 is directly connected, GigabitEthernet0/1
L       195.100.0.2/32 is directly connected, GigabitEthernet0/1
S    195.110.10.0/24 [1/0] via 195.100.0.1
     195.120.20.0/24 is variably subnetted, 2 subnets, 2 masks
C       195.120.20.0/24 is directly connected, GigabitEthernet0/0
L       195.120.20.1/32 is directly connected, GigabitEthernet0/0

 

6. 통신 확인

 

PC0에서 PC2로 통신되는 것을 확인할 수 있음

728x90
728x90

Cisco IOS 구조

Cisco IOS(Internetworking OS) 모드

User Exec Mode 최소한의 기능을 가진 모드로 Router, Switch의 초기 모드  [Privileged Mode로 진입]
 Router> enable
 Router#
Privileged Mode(관리자 모드) 네트워크 장비의 상태를 확인하거나 설정 내용을 확인할 수 있는 모드  [Global Configuration Mode로 진입]
 Router# configure terminal
 Router(config)# 
Global Configuration Mode



네트워크 장비의 전역적인 설정을 하는 모드



Interface Mode : 네트워크 장비의 인터페이스를 설정하는 모드
Line Interface Mode : Console, VTY  등을 설정할 수 있는 모드
Router Mode : Routing Protocol을 설정하는 모드
VLAN : VLAN 설정 모드

 

명령어

 

네트워크 장비 설정

running-config
현재 동작 중인 설정
startup-config  영구 설정
show running-config
현재 동작중인 설정 확인
show startup-config
영구 설정 확인
erase startup-config 영구 설정 삭제(장비 초기화)

 

Routing

show ip route 라우팅 테이블 확인
show ip interface brief 라우팅 테이블 확인
Global Configuration 모드에서 설정 Static Routing 설정
 ip route IP_주소 서브넷마스크 NEXT_HOP_IP
Static Routing 구성 명령어
ip route 0.0.0.0 0.0.0.0 NEXT_HOP_IP
Static Default Route 설정

 

Router 설정 단계

1. 인터페이스 설정

Router> enable

Router# configure terminal

Router(config)# interface FastEthernet 0/0

Router(config-if)# ip address IP_주소 서브넷마스크

Router(config-if)# no shutdown

Router(config-if)# exit

 

2. Static Routing 설정

Router# show ip route

Router# configure terminal

Router(config)# ip route IP_주소 서브넷마스크 NEXT_HOP_IP주소

Router(config)# exit

Router# show ip route

 

3. 설정 영구 저장

Router# copy running-config startup-config

 

 

728x90

+ Recent posts