eigrp복습
Metric
EIGRP가 목적지 까지 비용을 계산한 것
- IGRP 메트릭과 동일한 개념
- • 다만 더 세부적인 표현을 위해 IGRP 메트릭에 256을 곱해서 표현
기본적인 Metric 계산
• BW는 목적지 까지 경로 중 가장 낮은 대역을 사용한다.
• BW는 인터페이스에서 결정된다.
• 비용은 낮을수록 좋다.
BW = (10^7/banwidth) * 256
ㄴ banwidth는 해당경로에서 가장느린것을 사용한다.
Delay는 경로 까지의 모든 지연을 합한 값이다. (중간에 거쳐가는 모든 딜레이의 값)
- delay : μs(micro-second), usec로 표기, 1/1,000,000(백만분의1초)
- 모든 지연의 합을 10으로 나누고 256을 곱한 값
Delay = (sum(delay)/10)*256
크리티컬패스 = 성능이 안좋은거 (전체 시스템을 결정함)
ㄴ 가장 중요한 경로
bw에서는
랜에서 : 포트의 속도를 결정하는 요인은 상대방속도랑 내속도에서 속도가 낮은거!
웹망에서 : 임대하는 라인의 속도(우리는 예산을 결정하는거. 돈 많이 주면 빠른걸 임대할수있음.)
RD는 FD보다 가는 비용이 적어야 한다.
실습
bw조정해서 썩세서 확인해보기
R0_1
en
conf t
hostname R0_1
no ip domain-lookup
int gig0/0
ip add 100.1.1.1 255.255.255.0
no shut
int s0/0/0
ip add 1.1.1.1 255.255.255.0
no shut
int s0/0/1
ip add 2.2.2.1 255.255.255.0
no shut
int s0/1/0
ip add 3.3.3.1 255.255.255.0
bandwidth 56
no shut
int s0/1/1
ip add 4.4.4.1 255.255.255.0
no shut
exit
router eigrp 100
passive-interface g0/0
no auto-summary
network 100.1.1.1 0.0.0.0
network 1.1.1.1 0.0.0.0
network 2.2.2.1 0.0.0.0
network 3.3.3.1 0.0.0.0
network 4.4.4.1 0.0.0.0
exit
exit
copy running-config startup-config
R0_2
en
conf t
hostname R0_2
no ip domain-lookup
int gig0/0
ip add 200.1.1.1 255.255.255.0
no shut
int s0/0/0
ip add 21.1.1.2 255.255.255.0
no shut
int s0/0/1
ip add 22.1.1.2 255.255.255.0
no shut
int s0/1/0
ip add 23.1.1.2 255.255.255.0
no shut
int s0/1/1
ip add 24.1.1.2 255.255.255.0
no shut
exit
router eigrp 100
passive-interface g0/0
no auto-summary
network 200.1.1.1 0.0.0.0
network 21.1.1.2 0.0.0.0
network 22.1.1.2 0.0.0.0
network 23.1.1.2 0.0.0.0
network 24.1.1.2 0.0.0.0
exit
exit
copy running-config startup-config
R1_1
en
conf t
hostname R1_1
no ip domain-lookup
int s0/0/0
ip add 1.1.1.2 255.255.255.0
no shut
int s0/0/1
ip add 11.1.1.1 255.255.255.0
no shut
exit
router eigrp 100
no auto-summary
network 1.1.1.2 0.0.0.0
network 11.1.1.1 0.0.0.0
exit
exit
copy running-config startup-config
R1_2
en
conf t
hostname R1_2
no ip domain-lookup
int s0/0/0
ip add 2.2.2.2 255.255.255.0
no shut
int s0/0/1
ip add 12.1.1.1 255.255.255.0
no shut
exit
router eigrp 100
no auto-summary
network 2.2.2.2 0.0.0.0
network 12.1.1.1 0.0.0.0
exit
exit
copy running-config startup-config
R1_3
en
conf t
hostname R1_3
no ip domain-lookup
int s0/0/0
ip add 3.3.3.2 255.255.255.0
bandwidth 56
no shut
int s0/0/1
ip add 13.1.1.1 255.255.255.0
no shut
exit
router eigrp 100
no auto-summary
network 3.3.3.2 0.0.0.0
network 13.1.1.1 0.0.0.0
exit
exit
copy running-config startup-config
R1_4
en
conf t
hostname R1_4
no ip domain-lookup
int s0/0/0
ip add 4.4.4.2 255.255.255.0
no shut
int s0/0/1
ip add 14.1.1.1 255.255.255.0
bandwidth 56
no shut
exit
router eigrp 100
no auto-summary
network 4.4.4.2 0.0.0.0
network 14.1.1.1 0.0.0.0
exit
exit
copy running-config startup-config
R2_1
en
conf t
hostname R2_1
no ip domain-lookup
int s0/0/0
ip add 21.1.1.1 255.255.255.0
no shut
int s0/0/1
ip add 11.1.1.2 255.255.255.0
no shut
exit
router eigrp 100
no auto-summary
network 21.1.1.1 0.0.0.0
network 11.1.1.2 0.0.0.0
exit
exit
copy running-config startup-config
R2_2
en
conf t
hostname R2_2
no ip domain-lookup
int s0/0/0
ip add 22.1.1.1 255.255.255.0
no shut
int s0/0/1
ip add 12.1.1.2 255.255.255.0
no shut
exit
router eigrp 100
no auto-summary
network 22.1.1.1 0.0.0.0
network 12.1.1.2 0.0.0.0
exit
exit
copy running-config startup-config
R2_3
en
conf t
hostname R2_3
no ip domain-lookup
int s0/0/0
ip add 23.1.1.1 255.255.255.0
no shut
int s0/0/1
ip add 13.1.1.2 255.255.255.0
no shut
exit
router eigrp 100
no auto-summary
network 23.1.1.1 0.0.0.0
network 13.1.1.2 0.0.0.0
exit
exit
copy running-config startup-config
R2_4
en
conf t
hostname R2_4
no ip domain-lookup
int s0/0/0
ip add 24.1.1.1 255.255.255.0
no shut
int s0/0/1
ip add 14.1.1.2 255.255.255.0
bandwidth 56
no shut
exit
router eigrp 100
no auto-summary
network 24.1.1.1 0.0.0.0
network 14.1.1.2 0.0.0.0
exit
exit
copy running-config startup-config
암호학
DES
순열(P)
표를보면서 암호를 섞어주고 다시 역전치를 시켜주면 암호문이 완성이 됩니다.
DES - Key
64비트의 키를 이용
• 64비트를 56비트로 축약하여 서브키를 생성
• 8번째 비트마다 패리트비트를 포함하여 64비트를 키로 이용
• 패리트비트를 제거하여 56비트로 이용
암호화 과정에 맞추어 16라운드를 실행
• 각 라운드마다 서브키를 생성
64비트 키를 pc-1을 사용해서 56비트로 축약합니다.
오버플로가 되면 뒤에 붙여줍니다.
DES의 작동 모드
ECB (Electronic Codebook) 모드
CBC (Cipher Block Chaining)
- DES 암호화를 거쳐 나온 암호문 C와 다음 원문 블록의 xor연산 값을 암호화하는 방식.
(대부분의 DES 암호 알고리즘이 작동하는 방식)
CFB (Cipher Feedback)
키를 저장할때 64비트 레지스터값을 저장해둡니다. 64비트 레지스터를 함호화하고, 뒤에 j비트를 선핵합니다. 원문이랑 j비트를 xor연산해서 암호문을 만듭니다.
OFB (Output Feedback)
CFB방식과 방식의 차이는 있지만 유의미한 차이가 아니라서 같다고 생각해도 됩니다.
PHP
Continue
- 반복문 내에서 쓰이는 제어문
- 현재 수행중인 반복을 종료하고 다음 반복으로 건너뛰는 기능
실습
값 n1,n2를 입력받아 1에서 n1까지 n2의 배수를 제외한 나머지의 합을 출력
3-7.html
<html>
<head>
<title>합 구하기 폼 파일</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<form method="post" action="3-7.php">
숫자를 입력하세요 : <input type="text" name="num1"><br>
숫자를 입력하세요 : <input type="text" name="num2"><br>
<input type="submit" name="확인" value="확인">
<input type="reset" name="취소" value="취소"><br>
</form>
</html>
3-7.php
<?
$num1 = $_POST["num1"];
$num2 = $_POST["num2"];
for($a=1, $sum=0; $a <= $num1; $a++) {
if ($a%$num2 == 0) continue;
$sum = $sum + $a;
}
echo("{$num1}까지의 합은 {$sum}입니다.");
echo("<hr>");
show_source(__FILE__);
?>
'kh교육' 카테고리의 다른 글
(20250805029)Redistribution활용 실습, FTP서버 (3) | 2025.08.05 |
---|---|
(20250804028)router-redistribute, 암호학 (3) | 2025.08.04 |
(20250731026)Redistribution&암호학 (2) | 2025.08.01 |
(20250730025)DUAL,암호학 (1) | 2025.07.30 |
(20250729024)암호학 (3) | 2025.07.29 |