becool

20210520 (목) 본문

네트워크 기초

20210520 (목)

gusalstm 2021. 5. 20. 17:09
반응형

 

패킷트레이서 부팅과정

POST

ROM(Bootstrap)

IOS(Flash, ROM, TFTP)

OS Image Loading

startup-config(NVRAM) → running-config(RAM)  로드

 ▶ startup-config가 없으면 Setup-mode(이니셜다이얼로그) 시작

 

 

패킷트레이서 인터페이스 모드

 스위치는 기본상태가 up

 라우터는 기본상태가 down ( 따라서, 아래와 같이 up해줘야함 )

 

Router(config)#interface fastEthernet 0/0
Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#exit

Router#show ip interface brief → 확인

 

패킷트레이서 rommon 모드 (비밀번호 잊어버렸을 때 초기화)

 부팅중 ctrl + c 또는 ctrl + pause break

rommon 1 > 
rommon 1 > ?
boot                boot up an external process
confreg             configuration register utility
dir                 list files in file system
help                monitor builtin command help
reset               system reset
set                 display the monitor variables
tftpdnld            tftp image download
unset               unset a monitor variable
rommon 2 > confreg 0x2142  → 컨픽 레지스트 메모리 위치를 변경
rommon 3 > boot

Router>enable
Router#copy running-config startup-config

 ▶ 단점 : 비밀번호 뿐만 아니라 다른 설정값들도 초기화 (설정값을 살릴 수 있는 방법 아래 방법 추천)

 

Router>enable

Router#copy startup-config running-config  → 기존 설정값을 복사(기존 비밀번호포함)

Router#configure terminal  

Router(config)#enable secret network  → 신규 비밀번호 설정

Router(config)#config-register 0x2102 → 컨픽 레지스트 원상복구

Router(config)#exit

Router#copy running-config startupconfig → 런타임설정을 영구 설정으로 변경

Router#reload

 ▶ startup에서 모든 설정을 붙혀오고, 신규 비밀번호를 설정한 후에 해당 부분은 영구설정으로 반영하여 기존 비밀번호를 덮어씌움. 새로 부팅하면서 수정한 confreg 를 config-register 명령어로 원상복구까지 완료.

 

 

========

Routing

 static routing

   routing table 의 routing 경로를 네트워크 관리자가 수동으로 지정하는 routing 구성 방법

   경로 계산에 대해 별도로 리소스를 사용하지 않음

   정보를 교환하지 않음

   큰 규모의 라우팅을 세팅하기가 어려움

 

 dynamic routing

   routing protocol에 의해서 동적으로 routing table의 routing 경로를 계산하고 학습하여 routing을 구성하는 방법

   경로 계산에 대해 별도로 리소스를 사용하여 일정부분 부하가 발생함

   정보교환특성으로 인하여 일정부분 대역폭 bandwidth 를 차지함. 

   큰 규모의 라우팅도 쉽게 세팅할 수 있음.

 

 

 

 

==============================

static routing 실습

 

네트워크의 구성상태 및 PC IP설정값

①네트워크 1 : R1+R2 (192.168.10.1 192.168.10.2)

②네트워크 2 : R1~PC1 (192.168.11.1 192.168.11.10)

③네트워크 3 : R2~PC3 (192.168.12.1 192.168.12.10)

 

 

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface gigabitEthernet 0/0  → 기가빗이더넷 0/0
R1(config-if)#ip address ?
  A.B.C.D  IP address
  dhcp     IP Address negotiated via DHCP

R1(config-if)#ip address 192.168.11.1 255.255.255.0  → ip설정

R1(config-if)#no shutdown → up

R1(config-if)#exit

R1(config)#interface gigabitEthernet 0/1  → 기가빗이더넷 0/01

R1(config-if)#ip address 192.168.10.1 255.255.255.0  → ip설정

R1(config-if)#no shutdown → up

R1(config)#

 

Router(config)#hostname R2
R2(config)#interface gigabitEthernet 0/0
R2(config-if)#ip address 192.168.12.1 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit
R2(config)#interface gigabitEthernet 0/1

R2(config-if)#ip address 192.168.10.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#

 

각 네트워크의 PC 아이피 설정 (그림 참조)

이 상태로는 ping이 안됨. (routing table 구성 필요)

R1#show ip route  → 현재 상태 체크

R1#configure terminal

R1(config)#ip route 192.168.12.0 255.255.255.0 192.168.10.2

 

R2#configure terminal
R2(config)#ip route 192.168.11.0 255.255.255.0 192.168.10.1

 

 

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

 

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

     192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.10.0/24 is directly connected, GigabitEthernet0/1
L       192.168.10.1/32 is directly connected, GigabitEthernet0/1
     192.168.11.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.11.0/24 is directly connected, GigabitEthernet0/0
L       192.168.11.1/32 is directly connected, GigabitEthernet0/0
S    192.168.12.0/24 [1/0] via 192.168.10.2

 

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

     192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.10.0/24 is directly connected, GigabitEthernet0/1
L       192.168.10.2/32 is directly connected, GigabitEthernet0/1
S    192.168.11.0/24 [1/0] via 192.168.10.1
     192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.12.0/24 is directly connected, GigabitEthernet0/0
L       192.168.12.1/32 is directly connected, GigabitEthernet0/0

 

종료되면 ping 테스트

PC1

C:\>ping 192.168.12.10

 

PC2

C:\>ping 192.168.11.10

 

완료

728x90

'네트워크 기초' 카테고리의 다른 글

20210527 (목) eigrp, ospf  (0) 2021.05.27
20210526 (수) rip, eigrp  (0) 2021.05.26
20210517 (월)  (0) 2021.05.17
20210514 wireshark  (0) 2021.05.14
20210510 (월)  (0) 2021.05.10
Comments