본문 바로가기
학교 수업/데이터통신

[데이터통신] 연습문제 9장, 10장, 11장 레포트

by five-sun 2021. 12. 23.
728x90

[1] 9, 10, 11Key Term에서 전체 10개 용어를 선택하여 설명하시오.

frame: 어떤 것을 담아내는 틀

nodes: 대상 개체를 표현

data link control: 데이터 계층 제어

check sum: 간단하게 에러검출을 하는 방법, 송신 측에서, 전송할 모든 데이터를 16비트 워드 단위로 구분하고, 1의 보수를 취하고, 그 합에 관한 결과를 전송하면, 수신 측에서, 같은 합을 해보아서 오류를 검출하는 방식.

CRC: 에러검출 능력이 우수한 `순회부호`의 일종

parity-check code: 정보 비트 수가 적고, 에러발생 확률이 낮은 경우에, 주로 사용하는 에러검출 방식

modular arithmetic: 유한개 원소만으로 산술 연산을 하는 것

bit stuffing: 데이터를 실은 프레임들의 경계를 구분하기 위해 통상 특정한 비트 배열을 갖는 플래그 바이트(01111110)라 불리는 경계를 나타내는 바이트를 사용하는데, 만일 실제 데이터 내부에 같은 비트 배열이 있게 되는 경우를 방지하려고 일부러 5개의 1을 보내면서 다음 비트에 0을 삽입하는 비트 채우기(bit stuffing) 실시

byte stuffing: ASCII 코드 중에 DLE STX DLE ETX 라는 특정 문자들을 사용하는데, 실제 데이터 몸체에서도 동일 문자가 나오는 것을 방지하기 위해, 송신 측에서 우연히 나타나는 DLE 문자 바로 직전에 여분의 DLE (extra DLE)를 삽입하게 되는데 이를 바이트 스터핑(Byte Stuffing)이라고함

HDLC: 컴퓨터 데이터통신에 적합한 전송제어방식, 점대점, 다중점 링크 상에서 반이중, 전이중 통신을 모두 지원하도록 설계됨

 

[2] 문제를 해석하고 구체적으로 답(이유/설명 포함) 하시오.

 

1. Distinguish between communication at the network layer and communication at the data-link layer.

네트워크 계층의 통신은 호스트 대 호스트

데이터링크 계층의 통신은 노드 대 노드

 

2. What is the size of an ARP packet when the protocol is IPv4 and the hardware is Ethernet?

hardware address (6byte) / protocol address (4byte) 이므로 2 + 2 + 4 + 4 + 6 + 6 + 4 + 4 = 28byte 이다.

 

3. Figure 9.7 in page 246 shows a system as either a host or a router. What would be the actual entity (host or router) of system A and B in each of the following cases:

a. If the link is the first one in the path?

A: Host / B: Router

b. If the link is the middle one in the path?

A: Router / B: Router

c. If the link is the last one in the path?

A: Router / B: Host

d. If there is only one link in the path (local communication)?

A: Host / B: Host

4. In Figures 9.11 to 9.13, both the forwarding table and ARP are doing a kind of mapping. Show the difference between them by listing the input and output of mapping

for a forwarding table and ARP.

포워딩테이블: 입력 포트의 수신 패킷을 어느 출력 포트로 보낼 것인가를 나타낸 표 테이블

입력: 패킷의 목적지 네트워크 계층 주소

출력: 다음 시스템의 네트워크 계층 주소

ARP

입력: 다음 시스템의 네트워크 계층 주소

출력: 다음 시스템의 데이터링크 계층 주소

 

5. In CRC, if the dataword is 5 bits and the codeword is 9 bits, how many 0s need to be added to the dataword to make the dividend? What is the size of the remainder?

What is the size of the divisor?

dataword (5 bits), codeword ( 9 bits) 인 경우에 CRC4bits이다. divisor4 + 1 = 5bits 이고 remainder4bits이다.

 

6. Given the dataword 101001111 and the divisor 10111, show the generation of the CRC codeword at the sender site (using binary division).

1010011114bits0을 붙이고 divisor 10111로 이진 분할할 경우 0101이 붙어 1010011110101

 

7. Assuming even parity, find the parity bit for each of the following data units.

a. 1001011 b. 0001100 c. 1000000 d. 1110111

a. 1001011 -> 0

b. 0001100 -> 0

c. 1000000 -> 1

d. 1110111 -> 0

- 1인 비트가 짝수 개가 되도록 패리티 비트를 붙여준다.

 

8. Assume a packet is made only of four 16-bit words (A7A2)16, (CABF)16, (903A)16, and (A123)16. Find the checksum in the sender site.

1010011110100010 + 1100101010111111 + 1001000000111010 + 1010000100100011 = 42914+ 51903 + 36922 + 41251 = 2A3BE 일 때, 1의 보수 덧셈을 하므로 0002 + A3BE = A3C0, Checksum A3C01의 보수화 하면 5C3F가 된다.

 

 

9. Compare and contrast flow control and error control.

Flow Control : 데이터 항목 손실을 방지하기 위해서 producerconsumerframe을 보내고 이를 받는 쪽은 flow control을 보내 buffers를 조절한다.

- Error Control: producerconsumber에게 보낸 frame이 문제가 없는 경우 acknowledgement( combination of flow and error control )producer에게 보낸다.

 

10. A simple parity-check bit, which is normally added at the end of the word (changing a 7-bit ASCII character to a byte), cannot detect even numbers of errors. Forexample, two, four, six, or eight errors cannot be detected in this way. A better solution is to organize the characters in a table and create row and column parities. The bit in

the row parity is sent with the byte, the column parity is sent as an extra byte (See the following figure).

Show how the following errors can be detected:

a. An error at (R3, C3).

1개의 에러 발생, row paritycolumm parity를 통해 에러를 발견할 수 있다.

b. Two errors at (R3, C4) and (R3, C6).

2개의 에러는 columm parity를 통해 감지가 되지만 row parity에서는 감지하지 못해 에러의 위치를 찾을 수 없어 메시지 전체를 버리야 한다.

c. Three errors at (R2, C4), (R2, C5), and (R3, C4).

3개의 에러 발생시 row paritycolumm parity가 각각 하나의 에러를 찾았지만 그것을 통해 3개 에러의 위치를 찾을 수 없어 메시지 전체를 버리게 된다.

d. Four errors at (R1, C2), (R1, C6), (R3, C2), and (R3, C6).

- 다음과 같이 발생 시 parity check를 통해 에러를 찾을 수 없다.

11. Byte-stuff the following frame payload in which E is the escape byte, F is the flag byte, and D is a data byte other than an escape or a flag character.

FH + DEEDDEFDDEEEEDEFD + TF

flag byteescape byte앞에 escape character을 추가하여 byte stuffing을 해줘야하고 최종 프레임은 다음과 같은 형태가 될 것이다.

12. Bit-stuff the following frame payload:

- 00011111011001111100100011111011111010000111

15번 반복되는 부분 뒤에 0을 추가해 Bit-stuffing을 해준다.

728x90