Download presentation
Presentation is loading. Please wait.
Published byAllen Norman Modified over 8 years ago
1
Computer Network Lab. 1 제 11 장 사용자 데이터그램 프로토콜
2
Computer Network Lab. 2 Content n Introduction n UDP Header n UDP Checksum n IP Fragmentation n ICMP 도달불가 에러 [ 단편화 요구 ] n Traceroute 를 이용한 Path MTU 결정 n UDP 를 이용한 Path MTU 발견 n UDP 와 ARP 간의 상호 작용 n UDP 데이터그램 크기의 최대값 n ICMP 발신지 억제 에러 n UDP 서버 설계 n Summary
3
Computer Network Lab. 3 Introduction n Simple, datagram-oriented, transport layer protocol n 프로세스에 의한 output 으로 하나의 UDP datagram 을 생성 l stream-oriented protocol 인 TCP 와 다름 n No reliability l 목적지에 도착을 보장하지 못함
4
Computer Network Lab. 4 UDP Header n Port number l sending process 와 receiving process 구별 l UDP 와 TCP port 는 IP 로부터 구별 됨 (figure 1.8) n UDP length: UDP header+data 의 길이 l 최소 크기 8 바이트 (data 가 0 일 경우 ) l IP datagram total length - IP header length
5
Computer Network Lab. 5 UDP Header 16-bit source port number16-bit destination port number 16-bit UDP length16-bit UDP checksum Data(if any) Figure 11.2 UDP header
6
Computer Network Lab. 6 UDP Checksum n UDP header 와 UDP data 를 체크 l IP checksum 은 IP header 만 체크 n IP header checksum 과 유사하지만 차이점이 있음 l UDP datagram 의 길이는 홀수일 수 있지만, checksum algorithm 은 16-bit word ä0 값의 pad byte 를 붙임으로서 해결 l 12-byte pseudo-header 포함 ä 데이터가 보내질 올바른 목적지를 2 번 체크
7
Computer Network Lab. 7 UDP Checksum n UDP checksum 계산 필드 32-bit source IP address 16-bit UDP lengthzero8-bit protocol 16-bit source port number16-bit dest port number 16-bit UDP length16-bit UDP checksum data Pad byte(0)
8
Computer Network Lab. 8 UDP Checksum n TCP 와 UDP 는 헤더에 checksum 을 가짐 l UDP 는 optional, TCP 는 mandatory l UDP 는 optional 이지만, 항상 checksum 을 사용해야 함 n tcpdump Output 1 0.0 sun.1900 > gemini.echo: udp 9 (UDP cksum=6e90) 2 0.303755(0.3038)gemini.echo > sun.1900: udp 9 (UDP cksum =0) 3 17.392480(17.0887) sun.1904 > aix.echo: udp 9 (UDP cksum=6e3b) 4 17.614371(0.2219) axi.echo > sun.1904:udp 9 (UDP cksum=6e3b)
9
Computer Network Lab. 9 IP Fragmentation n IP fragmentation 을 하는 이유 l 데이터 그램의 크기가 물리적인 네트워크 계층이 전송할 수 있는 frame 의 최대 크기보다 클때 n Fragmentation 과정 l IP 는 상위계층에서 전달받은 IP datagram 을 어느 local interface 를 통해 전달할 것인지를 결정 (MTU 를 질의 ) l MTU 와 IP datagram 을 비교 ä if ( IP datagram > MTU ) then Fragmentation n Fragmentation 발생 위치 l 송신 host 또는 중간 router
10
Computer Network Lab. 10 IP Fragmentation n Reassemble l 최종 목적지에 도달 후, reassemble 됨 l 몇몇 다른 네트워크 프로토콜은 최종 목적지가 아닌 다음 hop 에 서 reassemble 하기도 함 l 목적지의 IP Layer 가 수행 n Fragmentation & Reassemble 목적 l 처리 속도를 저하시키지 않는 범위에서 transport layer 에서 transparency 을 제공하기 위함 n Fragmentation 의 재 fragmentation 이 가능 l IP header 에 reassemble 을 위한 정보를 유지
11
Computer Network Lab. 11 IP Fragmentation n IP header field l Identification field : 송신자가 전송하는 각 IP 데이터그램에 대하 여 유일한 값을 포함, 번호는 해당 데이터그램의 각 단편에 복사 l Flags field ämore fragment bit : fragment 가 더 있다는 것을 의미하기 위함, 마지막 fragment 를 제외하고 각 fragment 는 이 비트를 set ädon’t fragment bit : IP 는 datagram 을 단편화하지 못함, 그러나 ICMP error 를 본래 전송자에게 보냄 (ICMP error : fragmentation 이 필요한데 don’t fragment bit 가 set 되어 있음을 의미 ) l Fragment offset field : 해당 fragment 의 offset 을 나타냄
12
Computer Network Lab. 12 IP Fragmentation n Routing of Fragments l 각각의 fragment 는 자신의 IP header 를 갖는 독립된 패킷 l 다른 패킷과 독립적으로 전송, 최종 목적지에 다른 순서로 도착 할 수 있지만 IP header 정보로 재조립 n Fragmentation 의 단점 l fragment 를 하나라도 분실하면 datagram 의 모든 fragment 를 재전 송 l fragmentation 이 중간 router 에서 이루어진 경우 발신지는 datagram 의 fragmentation 정보를 알 수 없음
13
Computer Network Lab. 13 IP Fragmentation n Example l sock 프로그램을 이용해서 fragmentation 이 일어날 때까지 datagram 의 크기를 증가시킨다. l Ethernet 의 MTU = 1500 bytes l user data = 1500 - 20(IP header) - 8(UDP header) = 1472 bytes bsdi % sock -u -I -n1 -w1471 svr4 discard bsdi % sock -u -I -n1 -w1472 svr4 discard bsdi % sock -u -I -n1 -w1473 svr4 discard bsdi % sock -u -I -n1 -w1474 svr4 discard
14
Computer Network Lab. 14 IP Fragmentation n tcpdump output 1 0.0 bsdi.1112 >svr4.discard: udp 1471 2 21.008303 (21.0083) bsdi.1114 >svr4.discard: udp 1472 3 50.449704 (29.4414) bsdi.1116 >svr4.discard: udp 1473 (frag 26304:1480@0+) 4 50.450040 ( 0.0003) bsdi>svr4: (frag 26304:1@1480) 5 75.328650 (24.8786) bsdi.1118>svr4.discard: udp 1474 (frag 26313:1480@0+) 6. 75.328982 ( 0.0003) bsdi>svr4: (frag 26313:2@1480) l line 1, 2 : not fragmented l line 3, 4, 5, 6 : fragmented l identification number : 26304, 26313 l 1480= 1472(user data)+8(UDP header) - excluding IP header l ‘@’ 다음의 number : offset l + : more fragment, if (not +) then last fragment
15
Computer Network Lab. 15 IP Fragmentation n 생성된 fragment 의 크기는 마지막 fragment 를 제외하고 8 의 배수가 되어야 함 n 첫번째 fragment 를 제외한 나머지는 프로토콜과 source, destination 의 port number 를 생략함 n terminology l IP datagram : IP Layer 에서 종단간 전송의 단위 l packet : IP Layer 와 Link layer 간에 전달되는 데이터의 단위 packet 은 하나의 IP datagram 이 되거나 fragment 가 될 수 있음
16
Computer Network Lab. 16 IP header UDP header UDP data (1473 bytes) 20 byte8 byte UDP datagram IP header UDP header 1472 bytes 20 byte8 byte IP header 20 byte1 byte packet Figure 11.8 Example of UDP Fragmentation
17
Computer Network Lab. 17 ICMP Unreachable Error (Fragmentation Required) n router 가 fragmentation 이 필요한 datagram 을 받은 경우, DF flag 가 set 되어 있을 때 발생 n 목적지까지의 경로에서 가장 작은 MTU 를 결정할 필요가 있는 프로그램은 이러한 error 를 이용 l (path MTU discovery Mechanism)
18
Computer Network Lab. 18 type(3)code(4)checksum Unused (must be 0) MTU of next-hop network IP header(including options) + first 8bytes of original IP datagram data 078151631 8 bytes Figure 11.9 ICMP unreachable error options)+first 8bytes of original IP datagram data Newer Format of ICMP Unreachble Error
19
Computer Network Lab. 19 MTU=1500 bsdi MTU=1500 sunnetbsolaris MTU=1500 SLIP MTU=552MTU=? fragment watch with tcpdump fragmentation ping ICMP echo request Figure 11.10 Systems being used to determine MTU of SLIP link from netb to sun
20
Computer Network Lab. 20 ICMP Unreachable Error (Fragmentation Required) n tcpdump output on bsdi 1 0.0solaris > bsdi : icmp : echo request (DF) 2. 0.000000(0.0000)bsdi>solaris : icmp : echo reply (DF) 3. 0.000000(0.0000)sun>bsdi icmp : solaris unreachable - need to frag, mtu = 0 (DF) 4 0.738400(0.7384)solaris > bsdi : icmp : echo request (DF) 5. 0.748800(0.0104)bsdi>solaris : icmp : echo reply (DF) 5. 0.748800(0.0000)sun>bsdi icmp : solaris unreachable - need to frag, mtu = 0 (DF) l Solaris 2.2 는 대개 DF 를 set 한다. 이는 path MTU discovery mechanism 의 한 부분 이다.
21
Computer Network Lab. 21 MTU=1500 bsdi MTU=1500 sunnetbsolaris MTU=1500 SLIP MTU=552MTU=? ICMP echo request ICMP echo request ICMP echo request ICMP echo reply ICMP unreachable fragmentation required and DF set Figure 11.12 Packets exchanged in example
22
Computer Network Lab. 22 Determining the path MTU using Traceroute n path MTU discovery 성질이 없다고 해도, path MTU 를 결 정하기 위해 traceroute version 을 수정할 수 있다. n example scenario l DF set packet 을 보냄 l 1 번 packet 의 크기 = sending interface 의 MTU l ICMP “can’t fragment” error 를 받을 때 마다 packet 의 크기를 줄임 l 만약 ICMP error 를 보내는 router 가 sending interface 의 MTU 를 포 함하는 새로운 version 을 보내면, 이 값을 사용할 것이다. 그렇지 않으면, 다음 작은 MTU 를 시도 äRFC 1191 에서는 MTU 의 수를 제한 -> 본 프로그램은 유사한 테이블을 갖고 있어서 다음 작은 값으로 시도 l sun -> slip (SLIP link MTU = 295)
23
Computer Network Lab. 23 Determining the path MTU using Traceroute n traceroute output (sun -> slip) sun % traceroute.pmtu slip traceroute to slip (140.252.13.65), 30 hop max outgoing MTU =1500 1 bsdi (140.252.13.35)15 ms6ms6ms 2 bsdi (140.252.13.35)6 ms fragmentation required and DF set, trying new MTU = 1492 fragmentation required and DF set, trying new MTU = 1006 fragmentation required and DF set, trying new MTU = 576 fragmentation required and DF set, trying new MTU = 552 fragmentation required and DF set, trying new MTU = 544 fragmentation required and DF set, trying new MTU = 512 fragmentation required and DF set, trying new MTU = 508 fragmentation required and DF set, trying new MTU = 296 2 slip(140.252.13.65)377 ms 377 ms 377ms
24
Computer Network Lab. 24 n Modify ICMP code on bsdi n sun % traceroute.pmtu slip traceroute to slip (140.252.13.65), 30 hop max outgoing MTU = 1500 1bsdi(140.252.13.35)53ms6ms6ms 2 bsdi (140.252.13.35)6ms fragmentation required and DF set, Next hop MTU = 296 2 slip (140.252.13.65)377ms378MS377 MS n 올바른 MTU 를 찾기 전에 8 개의 다른 값으로 시도할 필요없다. n router 는 제대로 된 값을 전달한다. Determining the path MTU using Traceroute
25
Computer Network Lab. 25 Path MTU Discovery with UDP n UDP 를 이용하는 application 과 path MTU discovery mechanism 간의 상호작용을 알아본다. n Example – application 이 중간의 link 에 대해서 상당히 큰 datagram 을 write 한다 – solaris : source host, slip : destination host – sending data : solaris -> slip – size of data : 650 bytes – SLIP link MTU behind slip : 296 – 268 byte (296-20-8) 이상되는 UDP datagram( DF set) 은 router bsdi 가 ICMP error 를 생성하게 한다. – solaris % sock -u -i -n10 -w650 slip discard
26
Computer Network Lab. 26 MTU=1500 bsdi MTU=1500 sunnetbsolaris MTU=1500 SLIP MTU=552MTU=1500 SLIP slip MTU=296 run tcpdump here 650-byte UDP datagram with DF bit set ICMP can’t fragment error Figure 11.13 Systems used for path MTU discovery using UDP
27
Computer Network Lab. 27 n tcpdump output on sun 1 0.0solaris.36196>slip.discard:udp 650 (DF) 20.004218 (0.0042) bsdi>solaris: icmp: slip unreachable - need to frag, mtu=0 (DF) 34.980528 (4.9763) solaris.36196>slip.discard:udp 650 (DF) 44.984503 (0.0040) bsdi>solaris: icmp: slip unreachable - need to frag, mtu=0 (DF) 59.870407 (4.9763) solaris.36196>slip.discard:udp 650 (frag 47942:552@0+) 69.960056 (0.0896) solaris>slip: (frag 47942:106@552) 714.940338 (4.9763) solaris.36196>slip.discard:udp 650 (DF) 814.944466 (0.0040) bsdi>solaris: icmp: slip unreachable - need to frag, mtu=0 (DF) 919.890015 (4.9763) solaris.38196>slip.discard:udp 650 (frag 47944:552@0+) 1019.950463 (0.0604) solaris>slip: (frag 47944:106@552) 1944.940485 (5.0100) solaris.36196>slip.discard:udp 650 (DF) 2044.944432 (0.0040) bsdi>solaris: icmp: slip unreachable - need to frag, mtu=0 (DF)
28
Computer Network Lab. 28 Path MTU Discovery with UDP n tcpdump output on slip 10.0 solaris.38196>slip.discard: udp 650 (frag 47942:272@0+) 20.304513(0.3045) solaris>slip: (frag 47942:272@272+) 30.334651(0.0301) solaris>slip: (frag 47942:8@544+) 40.0.1320(0.1320) solaris>slip: (frag 47942:106@552) l solaris 는 fragmetation(x), but DF bit 를 off
29
Computer Network Lab. 29 Path MTU Discovery with UDP n Modify router bsdi – return next-hop MTU(ICMP error) 10.0 solaris.37974>slip.discard: udp 650 (DF) 20.004199(0.0042) bsdi>solaris: icmp : slip unreachable - need to frag, mtu = 296 (DF) 34.950193(4.9460) solaris. 37974>slip.discard: udp 650 (DF) 44.954325(0.0041) bsdi>solaris: icmp : slip unreachable - need to frag, mtu = 296 (DF) 59.779855(4.8255) solaris.37974>slip.discard:udp 650 (frag 35278:272@0+) 69.930018(0.1502) solaris>slip: (frag 35278:272 @272+) 79.990170(0.0602) solaris>slip: (frag 35278:114 @544) source host 가 fragmentation 실행
30
Computer Network Lab. 30 Interaction Between UDP and ARP n UDP 와 ARP 의 상호작용을 알아본다. n Example l sock 프로그램을 사용해서 8192 byte 를 생성 l Ethernet 상에서 6 개의 fragment 로 나뉘어 질것이다. l 프로그램 실행 전에 ARP cache 가 비어있는지 확인 ä 첫 번째 fragment 가 전송되기 전에 ARP request 와 reply 가 교환되어야 한다 l bsdi % arp -a l bsdi % sock -u -iI -w8192 svr4 discard ä 첫 번째 fragment 는 ARP request 를 전송하도록 유도 ä 나머지 fragment 들은 reply 가 오기전에 전송준비
31
Computer Network Lab. 31 Interaction Between UDP and ARP n tcpdump output 10.0 arp who-has svr4 tell bsdi 20.001234 (0.0012)arp who-has svr4 tell bsdi 70.008772 (0.0045)arp reply svr4 is-at 0:0:c0:c2:9b:26 80.009911 (0.0011)arp reply svr4 is-at 0:0:c0:c2:9b:26 90.011127 (0.0012)bsdi>svr4: (frag 10863:800@7400) 100.011255 (0.0041)arp reply svr4 is-at 0:0:c0:c2:9b:26 n reply 가 돌아오기 전에 6 개의 ARP request 가 생성되었다. 이는 6 개의 fragment 는 빠르게 생성이 되었고 각각의 fragment 에 의해서 ARP request 가 생성되었다. n last packet 만이 전송되었다.
32
Computer Network Lab. 32 Interaction Between UDP and ARP n ICMP error 는 전송되지 않았다. n IP layer 는 반드시 첫번째 fragment 가 도착할 때 timer 를 start 시켜야 한다. l “first” : first arrival fragment, not first fragment n timer 가 종료될 때 까지 해당 datagram 의 모든 fragment 가 도착하지 않았다면, 모든 fragment 들은 discard 될 것이다. l 그렇지 않으면 수신자의 buffer 가 넘치게 되는 결과를 초래할 것 이다. n ICMP error 가 전송되지 않은 이유 l Berkely : timer 가 종료되어, 모든 fragment 를 거부 l other : first fragment 가 도착되지 않았기 때문
33
Computer Network Lab. 33 Maximum UDP Datagram Size n 이론상, IP datagram 의 최대 크기는 65535 bytes l lenth field : 16 bit -> 2 16 - 1 n UDP datagram 에서 User data 의 최대 크기는 65507 bytes l 65507 = 65535 - IP header(20) - UDP header(8)
34
Computer Network Lab. 34 ICMP source Quench Error n 처리할 수 없을 정도로 빠르게 datagram 을 받을 때, system(host or router) 에 의해서 생성되기도 한다. l 시스템의 buffer 가 넘쳐서 datagram 을 버릴지라도 “source quench” 의 전송은 반드시 이루어져야 하는 아니다. n Example l bsdi -> sun : Ethernet, sun -> : SLIP l SLIP link = 100 * Ethernet link 이기 때문에 sun 의 버퍼가 쉽게 넘 칠 것이다. l 100 개의 1024-byte datagram 을 전송 : bsdi -> sun -> solaris l bsdi % sock -u -i -w1024 -n 100 solaris discard
35
Computer Network Lab. 35 ICMP source Quench Error type(4)code(0)checksum Unused (must be 0) IP header(including options) + first 8bytes of original IP dagagram data 078151631 8 bytes Figure 11.18 ICMP source quench error
36
Computer Network Lab. 36 ICMP source Quench Error n tcpdump output 10.0bsdi.1403 > solaris.discard:udp 1024 26 lines thar we don’t show 270.10(0.00)bsdi.1403>solaris.dicard: udp 1024 28 0.11(0.01)sun>bsdi: icmp: source quench 29 0.11(0.00)bsdi.1403>solaris.discard:udp 1024 30 0.11(0.00)sun>bsdi: icmp: source quench 142 lines thar we don’t show 173 0.71(0.06)bsdi.1403>solaris.discard:udp 1024 174 0.71(0.00)sun>bsdi: icmp: source quench
37
Computer Network Lab. 37 ICMP source Quench Error n 26 개의 datagram 은 에러없이 전송, but 27 번째 datagram 부 터는 전송할 때마다 error 에러를 받는다. n original tcpdump ouptut l 26+(74( 버려진 datagram)*2(line))=174 n 전송 시간 l sun -> solaris(SLIP) : 9600 bits/sec 로 1024byte 전송하는데 걸리는 시간은 1 초 조금 넘게 걸린다. l bsdi->sun(Ethernet) : 100 개의 datagram 이 1 초 이내에 sun 에 도착한 다.( 첫번째 datagram 이 SLIP Link 를 통과하기 전에 )
38
Computer Network Lab. 38 UDP Server Design n UDP 를 이용하는 서버의 설계 및 구현시 고려사항 l Client IP Address and Port Number l Destination IP Address l UDP Input Queue l Restricting Local IP Address l Restricting Foreign IP Address l Multiple Recipients per Port n 서버의 설계 및 구현은 대개 클라이언트 보다 어렵다. l O/S 와의 interaction, 동시에 여러 클라이언트들을 처리 n Protocol 특성이라는 측면에서 다룬다.
39
Computer Network Lab. 39 UDP Server Design n Client IP Address and Port Number l 서버에 클라이언트의 UDP datagram 이 도착 äIP header = Source IP Addr. + Destination IP Addr. äUDP header = Source Port Num. + Destication Port Num l 서버의 O/S 는 Source IP Addr. 와 Port Num. 을 통해서, 도착한 메시 지의 발신지를 알 수 있다. l 동시에 여러 클라이언트를 처리가능하게 한다. äSource Addr. 과 Port Num. 을 통해서 각각의 request 에 대한 반복을 가 능하게 한다.
40
Computer Network Lab. 40 UDP Server Design n Destination IP Address l 몇몇 application 들은 datagram 이 어디로 전송되는지를 알고자 한 다. l Host Requirement RFC äTFTP server 는 반드시 Destination 주소가 broadcast 주소로 된 datagram 은 무시한다. l 이는 O/S 가 수신된 UDP datagram 의 destination IP 주소를 Application 에 넘기도록 요구한다. l 모든 application 이 이 기능을 제공하는 것은 아니다.
41
Computer Network Lab. 41 UDP Server Design n UDP Input Queue l 필요성 äUDP 서버는 단일 port 를 통해서 모든 클라이언트의 요청을 처리한 다. l 각 UDP port 와 관계된 제한된 크기의 Input queue 가 존재 ä 여러 클라이언트로부터 동시에 도착한 요청들이 자동적으로 UDP 에 의해서 Queue 에 저장된다. l Application 에 Datagram 전달 순서 ä 도착한 순서대로 전달.(FIFO) äQueue Overfolw 가 발생하면, 커널의 UDP module 이 incoming datagram 을 무시한다.
42
Computer Network Lab. 42 UDP Server Design n example of Input Queue overflow 서버 bsdi bsdi % sock -s -u -v -E -R256 -r256 -P30 6666 from 140.252.13.33, to 140.252.13.63 : 11111111111 from sun, to broadcast address from 140.252.13.34, to 140.252.13.35 : 444444444444 from sun, to broadcast address 클라이언트 sun sun % sock -u -v 140.252.13.63 6666 to Ethernet broadcat address connected on 140.252.13.33.1258 to 140.252.13.63.6666 1111111111 11 bytes of data (with newline) 222222222 10 bytes of data (with newline) 33333333333 12 bytes of data (with newline)
43
Computer Network Lab. 43 UDP Server Design 클라이어트 svr4 svr4 % sock -u -v bsdi 6666 connected on 0.0.0.0.1042 to 140.252.13.35.6666 4444444444444 14 bytes of data (with newline) 555555555555555 16 bytes of data (with newline) 66666666 9 bytes of data (with newline) n tcpdump output 10.0sun.1252 > 140.252.13.63.6666: UDP 11 22.499484 (2.4992)svr4.1042 > bsdi.6666: UDP 14 34.959166 (2.4600)sun.1252 > 140.252.13.63.6666: UDP 10 47.607149 (2.4992)svr4.1042 > bsdi.6666: UDP 16 5 10.079059 (2.4719)sun.1252 > 140.252.13.63.6666: UDP 12 6 12.415943 (2.3369)svr4.1042 > bsdi.6666: UDP 9
44
Computer Network Lab. 44 UDP Server Design l Input Queue Overflow 발생시, UDP 는 application 에 알리지 않는다. ä 초과된 datagram 들은 UDP 에 의해서 거절된다. l datagram 이 거절되었다는 것을 클라이언트에게 알리지 않는다. l UDP Input Queue 는 FIFO(first-in, first-out)
45
Computer Network Lab. 45 UDP Server Design n Restricting Local IP Address l 대부분의 UDP 서버들은 UDP end point 를 생성할때, 자신들의 local IP 주소를 wildcard 로 한다. ä 서버의 port 로 들어오는 UDP datagram 은 어떤 local interface 에서 든 지 받아들여 진다. l Example sun % sock -u -s 7777 sun % netstat -a -n -f inet Active Internet Connections (including sercers) proto Recv-Q Send-Q Local Address Foreign Address(state) udp 0 0 *.7777 *.* flag -a : reports on all network end points, -n : print IP addr. as decimal number -f net : report only TCP and UDP end point
46
Computer Network Lab. 46 UDP Server Design l 서버가 자신의 end point 를 생성시, end point 에 대한 local IP addr. 로 호스트의 local IP address 중 하나를 명시하는 것이 가능. äif (destination addr. = specified local addr.), incomming datagram 이 end point 에 pass 됨. l Example sun % sock -u -s 140.252.1.29 7777 proto Recv-Q Send-Q Local Address Foreign Address(state) udp 0 0 *.7777 *.* tcpdump output 10.0bsdi.1723 > sun.7777: UDP 13 20.000822 (0.0008)sun > bsdi: icmp: sun udp port 7777 unreachable
47
Computer Network Lab. 47 UDP Server Design l 동일한 port 에 다른 local IP addr. 를 갖는 Server ä 대개, 동일한 port 를 재사용한다 라는 것을 Application 에 알려야 한 다. l Example sun % sock -u -s 140.252.1.29 8888for SLIP link sun % sock -u -s -A 140.252.13.33 8888for Ethernet sun % sock -u -s -A 127.0.0.1 8888for loopback interface sun % sock -u -s -A 140.252.13.63 8888for Ethernet broadcasts sun % sock -u -s -A 8888everything else (wildcard IP address) proto Recv-Q Send-Q Local Address Foreign Address (state) udp 0 0 *.8888 *.* udp 0 0 140.252.13.63.8888 *.* udp 0 0 127.0.0.1.8888 *.* udp 0 0 140.252.13.33.8888 *.* udp 0 0 140.252.1.29.8888 *.*
48
Computer Network Lab. 48 UDP Server Design l Priority äwildcard address 를 갖는 end point 가 있다면, 묵시적인 우선순 위가 존재. ä“destination IP addr. = specific IP addr” 인 종단점은 wildcard 보 다 먼저 선택된다. ämatch 되는 것이 없을 경우에만 wildcard end point 가 이용된다.
49
Computer Network Lab. 49 UDP Server Design n Restricting Foreign IP Address l 대부분의 implementations 경우, UDP end point 로 하여금 foreign addr. 를 제한. äend point 는 명시한 IP addr. 과 port 로 부터만 datagram 을 수신. l Example sun % sock -u -s -f 140.252.13.35.4444 5555 proto Recv-Q Send-Q Local Address Foreign Address (state) udp 0 0 140.252.13.33.5555 140.252.13.35.4444
50
Computer Network Lab. 50 UDP Server Design n Multiple Recipients Per Port l 대부분의 implementation äAn application end point - An local Addr.& port number l Example sun % sock -u -s 9999 sun % sock -u -s 9999 we expect this to fail can’t bind local address: Address Already in use sun % sock -u -s -A 9999 so we try -A flag this time can’t bind local address: Address Already in use
51
Computer Network Lab. 51 UDP Server Design l multicating 을 지원하는 시스템의 경우 äMultiple end point - same local IP addr & UDP port number 가능 ä 예 ) 4.4BSD 는 multicasting 을 지원 l Multiple end point - same local IP addr & UDP port number ädestination IP addr =broadcast or multicast addr. incoming datagram 이 각 end point 에 전달됨. ädestination IP addr =broadcast or multicast addr. incoming datagram 이 하나의 end point 에만 전달됨.
52
Computer Network Lab. 52 Summary n UDP is a simple protocol. l UDP 가 user process 에 제공하는 서비스는 단지 port number 들과 optional checksum 뿐이다. n ICMP unreachable error 는 new path MTU discovery feature 이다. l Traceroute 와 UDP 를 이용한 path MTU discovery n UDP 와 ARP 간의 interaction l 대부분의 ARP implementation 들은 ARP 응답을 기다리는 동안, 주어진 목적지에 가장 최근에 전송된 datagram 을 보류한다. n ICMP source quech error 는 처리할 수 없을 정도로 빠르게 datagram 을 받을 때 발생할 수 있다. l UDP 를 이용하면, 쉽게 error 를 발생시킬 수 있다.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.