Presentation is loading. Please wait.

Presentation is loading. Please wait.

IP 주소와 서브넷.

Similar presentations


Presentation on theme: "IP 주소와 서브넷."— Presentation transcript:

1 IP 주소와 서브넷

2 Network ? LAN DSU/CSU DSU/CSU 본사 WAN 지사

3 Using Routers to Provide Remote Access
Modem or ISDN TA Telecommuter Mobile User Branch Office Main Office Internet

4 Packet Switching 기술 패킷 교환 기술이란 큰 데이터를 패킷(Packet)이라는 단위로 작게 나누어 분할하여 송수신하는 방법 패킷의 단어는 ‘소포’라는 뜻으로 데이터를 마치 소포처럼 포장하여 상대방과 주고 받는다는 의미 소포에는 자신의 주소와 목적지 주소를 적어 우체국에 보내듯이 컴퓨터 통신의 경우도 이와 마찬가지로 1개의 패킷에 자신의 주소와 목적지의 주소를 표시하여 통신회선에 보낸다. 각 패킷에 자신의 주소와 목적지의 주소가 있으므로, 하나의 회선을 여러 사용자가 공유해도 각각이 데이터를 보낼 장소와 통신할 상대를 확실히 알고 있으므로 통신의 상대방을 식별할 수 있다. 큰 데이터를 몇 개의 패킷으로 나누면, 그렇게 나누어진 작은 데이터가 원래 데이터의 어디에 위치하는지를 나타내는 번호를 포함시킴으로써 받는 쪽은 그 번호를 바탕으로 작게 나누어진 데이터를 원래 모양으로 조립해 낼 수 있는 것이다. 자신의 주소와 목적지의 주소 및 데이터의 번호를 써넣는 부분을 ‘헤더’라고 한다. 하나의 큰 데이타 복원 된 데이타 짐표(헤더)를 붙여서 보낸다 헤더를 가지고 원래의 모양으로 다시 복원 패킷 송신쪽 수신쪽 잘게 나누어 분할

5 Protocol 개요 네트워크에서의 프로토콜은 서로 다른 언어를 사용하는 사람끼리의 의견 조정을 위한 회의에서 서로의 의견을 충분히 교환할 수 있는 대화의 방식과 같은 것. 네트워크에서의 통신 프로토콜은 네트워크의 데이터 흐름에 영향을 주는 중요한 요소로서 통신이 이루어지는 두 컴퓨터는 반드시 동일한 프로토콜을 사용. 네트워크에서의 실제 수행은 여러 기능이 필요한데, 이러한 기능에 대한 정확한 규칙을 정한 프로토콜을 총칭하여 프로토콜 스택(Stack) 또는 프로토콜 슈트(Suites)라고 한다. 프로토콜 슈트의 대표적인 예가 TCP/IP 로써 인터넷이나 대규모 네트워크에 사용되며 다른 보기로는 Novell의 Netware 네트워크에 사용되는 IPX/SPX 를 들 수 있다.

6 OSI 7 Layer & TCP/IP

7 Data 흐름의 처리 과정 # 1 End-system A End-system B
Sending data from an application in End-system A to an application in End-system B. End-system A End-system B Transport Forwarding Origination Terminating Stage 1- Encapsulation Stage 2- Transmission Stage 3- Forwarding/Filtering Stage 4- Decapsulation

8 Data 흐름의 처리 과정 #2 Web 00-00-0C-0A-BC-A3 211.255.59.2 1028
B-A2-B3 80

9 OSI 7 Layer Model 개요 OSI(Open System Interconnection) ‘개방형 시스템간 상호 연결(접속)’ 표준 OSI 표준의 목적은 어떤 업체에 종속되지 않고, 서로 다른 제조업체에서 만든 장비라 할지라도 서로간의 표준적인 연결이 가능하도록 하는 틀을 제공하는 것. 계층화된 모델은 아래와 같으며 몇 가지 장점을 가진다. - 시스템간 통신과 관련된 상호작용을 세분해 분리해 놓았기 때문에 이해하기 쉽다. - 상하 Layer간의 표준 interface를 정의하여 이 표준을 따를 경우 업체에서 만든 어떤 시스템이라도 상호 호환이 가능하다. - 각 Layer의 성능 향상 및 개선이 쉽고, 이러한 특성 때문에 기술혁신을 가속화할 수 있다.

10 OSI 7 Layer Model 개요 Application 애플리케이션 (상위) 계층들 Presentation Session
Transport Layer Layer 2 of 2: Purpose: This figure orients the students to the next set of concepts. Emphasize: The Data Link layer of the OSI reference model is implemented by Switches and Bridges. These devices encapsulate date in “frames”. The Network layer of the OSI reference model is implemented by Routers. These devices encapsulate data in ‘packets’. The Transport layer of the OSI reference model is implemented by various protocols; one of which is TCP. TCP uses ports and encapsulates the data in ‘segments’. Network Layer 데이터 흐름 계층들 Data Link Physical

11 OSI 7 Layer Model 개요 EXAMPLES Telnet HTTP ASCII EBCDIC JPEG 운영체제/
Application 사용자 인터페이스 ASCII EBCDIC JPEG 데이터 표현 방법 암호화 같은 특별한 처리 Presentation 운영체제/ 애프리케이션 접근 스케줄링 다른 어플리케이션 간 데이터 분리, 유지 Session Slide 4 of 4: Purpose: This figure orients the students to the entire OSI model stack. Emphasize: The lower layers sit below the upper three layers. The remainder of this course is focused on the lower layers. Transition: The following discusses the physical layer of the OSI reference model. Transport Layer Network Layer Data Link Physical

12 OSI 7 Layer Model 개요 EXAMPLES TCP UDP SPX IP IPX 802.3 / 802.2 HDLC
Application Presentation EXAMPLES Session TCP UDP SPX 신뢰성 있는 혹은 신뢰성 없는 전달 에러 수정 후 재 전송 Transport 라우터가 경로 결정에 사용할 논리적 어드레싱 제공 IP IPX Network Slide 5 of 5: Purpose: This figure reviews the entire OSI model stack. Emphasize: The upper layers sit above the lower layers. Transition: The following discusses encapsulation and de-encalsulation. 비트를 바이트로, 바이트를 프레임으로 결합 MAC address를 사용하여 매체에 접근 수정 없는 에러 검출 802.3 / 802.2 HDLC Data Link 장비들 사이에서의 비트 이동 전압, 전선 속도, 핀 아웃 케이블 명시 EIA/TIA-232 V.35 Physical

13 Encapsulating Data PDU Segment Transport Network Packet Data Link
Application Presentation PDU Session Upper Layer Data Segment Transport TCP Header Upper Layer Data Network Packet IP Header Data Purpose: This figure illustrates encapsulation. Emphasize: The protocol data units (PDUs) are the terms used in the industry and in this course to describe data at the different layers. Encapuslation is a key concept that illustrates how data is formatted prior to being sent across a link. This example is an illustration is Ethernet (or token ring) at the data link and physical layer and TCP/IP at the network and transport layers. Transition: The following discusses de-encalsulation. LLC Header Data FCS Data Link Frame MAC Header Data FCS Physical Bits

14 De-encapsulating Data
Application Presentation Session Upper Layer Data Transport Upper Layer Data TCP Header Network TCP+ Upper Layer Data IP Header Purpose: This figure illustrates de-encapsulation. Emphasize: At the destination, the headers at each layer are stripped off as the data moves back up the stack. IP + TCP + Upper Layer Data Data Link LLC Header LLC Hdr + IP + TCP + Upper Layer Data MAC Header Physical

15 Acknowledgement number (32)
TCP Segment Format Bit 0 Bit 15 Bit 16 Bit 31 Source port (16) Destination port (16) Sequence number (32) Acknowledgement number (32) 20 Bytes Header length (4) Reserved (6) Code bits (6) Window (16) Purpose: This figure explains what is contained in a TCP segment. Emphasize: Source Port and Destination Port are the connections to the upper-layer protocol. Sequence and Acknowledgment numbers are the position in the user’s byte stream of this segment. Sequence numbers are used for establishing reliability. HLEN is the header length. It tells us where the data begins. Six bits are reserved for future use. Code Bits distinguish session management messages from data. Window is a term we will come back to in a few slides. For now, consider it the size of the receivers buffers. Checksum is a cyclic redundancy check (CRC). It verifies that the datagram arrived intact. Urgent Pointer is used to signify out-of-band data. Options are used by vendors to enhance their protocol offering. The data portion of the frame contains the upper-layer protocol data. Checksum (16) Urgent (16) Options (0 or 32 if any) Data (varies)

16 TCP 세그먼트 포맷 발신지 포트(s o u rc e po rt ) 데이터를 전송하는 호스트의 포트번호이다.
수신지 포트(d e s t inat io n po rt ) 수신지 호스트 상에서 요청된 어플리케이션의 포트 번호이다. 시퀀스 번호(s e q ue nc e numbe r) 데이터를 순서대로 다시 조립하거나, 누락 혹은 손상된 데이터를 재전송하는 순서배열 과정을 위한 번호이다. 확인 응답 번호(a c know le d g e me nt numbe r) 다음에 올 TCP 옥텟(oc tet)을 정의한다. HLEN 헤더의 길이를 나타내며, 이는 헤더의 32 비트 워드의 수를 정의한다. 예비 필드(Re s e rve d ) 항상 0으로 설정한다. 코드 비트(Co d e b its ) 세션을 설정하고 종료하는 등의 제어기능을 한다. 윈도우(Windo w ) 송신자가 수용하는 윈도우 크기이며, 옥텟(oc tet)이다. 체크섬(Che c ks um) CRC이다. TCP는 하위 레이어를 신뢰하지 않고 모든 것을 점검한다. CRC(Cyc lic Re d und unc y Che c k) 헤더와 데이터 필드들을 점검한다. 긴급 포인터(Urg e nt po inte r) 긴급 데이터의 끝을 가리킨다. 옵션(Opt io n) 최대 TCP 세그먼트 크기를 0 혹은 32 비트로 설정한다. 데이터(Data ) 트랜스포트 레이어에서 TCP 프로토콜로 전달되는데 이것은 상위 레이어 헤더를 포함 한다.

17 Port Numbers F T P T E L N E T S M T P D N S T F T P S N M P R I P
Application Layer Purpose: This figure explains how TCP uses port numbers to connect applications. Emphasize: These port numbers were standardized in RFC This RFC has been obsoleted by RFC However, many of the port numbers outlined in RFC 1340 are still being used as standards. It is possible to filter on TCP port numbers. The TCP port number, combined with other information, is what UNIX C language developers call a socket. However, work sockets have different meanings in XNS and Novell, where they are service access point abstractions or programming interfaces rather than service access point identifiers. 21 23 25 53 69 161 520 Port Numbers Transport Layer TCP UDP

18 Dest. port = 23. Send packet to my
TCP Port Numbers Source Port Dest. Port Telnet Z Host Z Host A Purpose: This figure continues to explain how TCP uses port numbers. Emphasize: In most cases the TCP port number on one side of a conversation is the same on the other side. For example, when a file transfer takes place, the software on one host is communicating with a peer application on another host. In this example we see a Telnet (TCP port 23) session. It is possible to have multiple Telnet sessions running simultaneously on a host or router. Telnet selects an unused port number above 1023 to represent the source port for each independent session. Notice that the destination port is still 23. Port numbering is important to understand in order to configure IP extended access lists. The lack of symmetry in port number use is a critical factor in establishing effective security. SP DP Dest. port = 23. Send packet to my Telnet application. 1028 23

19 TCP Three Way Handshake/Open Connection
Host A Host B 1 Send SYN (seq=100 ctl=SYN) SYN received Layer 1 of 3: Host A begins by sending a SYN segment indicating that host A will use sequence numbers starting with sequence number 100. Emphasize: TCP is a simple protocol in terms of connection establishment. Some protocols have dozens of negotiation messages that are transmitted prior to session initialization. TCP implements a strategy that is both necessary and sufficient.

20 TCP Three Way Handshake/Open Connection
Host A Host B 1 Send SYN (seq=100 ctl=SYN) SYN received 2 Send SYN, ACK (seq=300 ack=101 ctl=syn,ack) SYN received Layer 2 of 3: Host B sends an ACK and acknowledges the SYN it received from host A. Host B also sends a SYN. Note that the acknowledgment field indicates host B is now expecting to hear sequence 101, acknowledging the SYN that occupied sequence 100.

21 TCP Three Way Handshake/Open Connection
Host A Host B 1 Send SYN (seq=100 ctl=SYN) SYN received 2 Send SYN, ACK (seq=300 ack=101 ctl=syn,ack) SYN received Layer 3 of 3: In the next segment, host A sends some data. Note that the sequence number of the segment in step 3 is the same as as the ACK in step 2. Emphasize: This sequence is like two people talking. The first person wants to talk to the second, so she says, “I would like to talk with you.” (SYN.) The second person responds, “Good. I want to talk with you.” (SYN, ACK.) The first person then says, “Fine—let us talk. Here is what I have to say.” (SYN, ACK, DATA.) At this point either side can begin communicating and either side can break the connection. TCP is a peer-to-peer (balanced) communication method (no primary/secondary). Note: This figure explains TCP connection establishment. For more information regarding the three-way handshake in establishing a TCP connection, refer to RFC 793. Established (seq=101 ack=301 ctl=ack) 3

22 TCP Simple Acknowledgment
Sender Receiver Layer 1 of 7: The window size is the number of messages transmitted before the sender must wait for an acknowledgment. Window size was presented earlier in the course, so this slide is a review. The initial state, no messages being sent. Window size = 1

23 TCP Simple Acknowledgment
Sender Receiver Send 1 Receive 1 Layer 2 of 7: Data message 1 sent. (Send 1, Receive 1) Window size = 1

24 TCP Simple Acknowledgment
Sender Receiver Send 1 Receive 1 Send ACK 2 Receive ACK 2 Layer 3 of 7: Acknowledgment message 2 sent. (Send ACK 2, Receive ACK 2) Window size = 1

25 TCP Simple Acknowledgment
Sender Receiver Send 1 Receive 1 Send ACK 2 Receive ACK 2 Send 2 Receive 2 Layer 4 of 7: Data message 2 sent. (Send 2, Receive 2) Window size = 1

26 TCP Simple Acknowledgment
Sender Receiver Send 1 Receive 1 Send ACK 2 Receive ACK 2 Send 2 Receive 2 Layer 5 of 7: ACK for message 2. (Send ACK 3, Receive ACK 3) Send ACK 3 Receive ACK 3 Window size = 1

27 TCP Simple Acknowledgment
Sender Receiver Send 1 Receive 1 Send ACK 2 Receive ACK 2 Send 2 Receive 2 Layer 6 of 7: Send 3, Receive 3. Send ACK 3 Receive ACK 3 Send 3 Receive 3 Window size = 1

28 TCP Simple Acknowledgment
Sender Receiver Send 1 Receive 1 Send ACK 2 Receive ACK 2 Send 2 Receive 2 Layer 1 of 7: ACK for message 3. (Send ACK 4, Receive ACK 4) This sequence helps to convey the delay associated with a window size of one. Note: TCP acknowledgments are expectational and are sometimes called forward referenced, which means that they refer to the segment they are expecting to receive, not the one just sent. Acknowledgment field sizes can become an issue when transmitting data at FDDI and ATM speeds. Send ACK 3 Receive ACK 3 Send 3 Receive 3 Send ACK 4 Receive ACK 4 Window size = 1

29 TCP Sequence and Acknowledgment Numbers
Source Port Dest. Port Sequence # Acknowledgement # I just sent #10. Source Layer 1 of 4: Layer 1 shows the Sequence number is 10. Dest. Seq. Ack. 1028 23 10 1

30 TCP Sequence and Acknowledgment Numbers
Source Port Dest. Port Sequence # Acknowledgement # I just sent #10. I just got #10, now I need #11. Source Layer 2 of 4: Layer 2 shows the acknowledgment number is 11. Dest. Seq. Ack. 1028 23 10 1 Source Dest. Seq. Ack. 23 1028 1 11

31 TCP Sequence and Acknowledgment Numbers
Source Port Dest. Port Sequence # Acknowledgement # I just sent #11. I just got #10, now I need #11. Source Layer 3 of 4: Layer 3 shows the next sequence number is 11. Dest. Seq. Ack. 1028 23 10 1 Source Dest. Seq. Ack. 23 1028 1 11 Source Dest. Seq. Ack. 1028 23 11 2

32 TCP Sequence and Acknowledgment Numbers
Source Port Dest. Port Sequence # Acknowledgement # I just sent #11. I just got #11, now I need #12. Source Layer 4 of 4: Layer 4 shows the acknowledgment number is 12. Emphasize: The Sequence and Acknowledgment numbers are directional. The slide highlights the communication going in one direction. The sequence and acknowledgments take place with the sender on the right. TCP provides full-duplex communication. Dest. Seq. Ack. 1028 23 10 1 Source Dest. Seq. Ack. 23 1028 1 11 Source Dest. Seq. Ack. 1028 23 11 2 Source Dest. Seq. Ack. 23 1028 2 12

33 TCP Windowing Sender Receiver Layer 1 of 5:
This figure points out the benefit of a larger window size. Layer 1 is in the initial state, no messages being sent.

34 TCP Windowing Sender Receiver Window size = 3 Send 1 Window size = 3
Layer 2 of 5: Layer 2 illustrates how the sending device defines its window buffer as 3 and sends three bytes.

35 TCP Windowing Sender Receiver Packet 3 is Dropped Window size = 3
Layer 3 of 5: In layer 3, the receiving device acknowledges the two first bytes, drops 3, and advertises its window size as 2.

36 TCP Windowing Sender Receiver Packet 3 is Dropped Window size = 3
Layer 4 of 5: In layer 3 the sending device transmits 2 bytes but maintains a window size of 2. Window size = 3 Send 3 Window size = 3 Send 4

37 TCP Windowing Sender Receiver Packet 3 is Dropped Window size = 3
Layer 5 of 5: In layer 5, the receiving device acknowledges the 2 bytes and still advertises its window size as 2. Window size = 3 Send 3 Window size = 3 Send 4 ACK 5 Window size = 2

38 UDP Segment Format Bit 0 1 Bit 15 Bit 16 Bit 31 Source port (16)
Destination port (16) 8 Bytes Length (16) Checksum (16) Data (if any) Purpose: This graphic explains the format of UDP. Emphasize: UDP is simple and efficient but not reliable. The UDP segment format includes a source port, a destination port, a length field, and an optional checksum field. It has no sequencing, acknowledgments, or windowing. Example: TFTP uses a checksum. At the end of the transfer if the checksum does not match then the file did not make it. The user is notified and must type in the command again. As a result, the user has become the reliability mechanism. Transition: The next section discusses the network layer of the OSI model and how it corresponds to the TCP/IP internet layer. 발신지 포트(source port ) 데이터를 전송하는 호스트의 포트 넘버 수신지 포트(destinationport ) 수신지 호스트상에서 요청된 어플리케이션의 포트 번호 세그먼트의 길이( length of segment ) UDP 데이터와 UDP 헤더의 길이 CRC UDP 데이터 필드와 UDP 헤더의 체크섬 데이터(Data ) 상위 레이어 데이터

39 Internet Layer Overview
Internet Protocol (IP) Internet Control Message Protocol (ICMP) Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP) Application Transport Internet Purpose: This figure presents a list of the protocols operating at the Internet layer. Emphasize: Review the protocols briefly. They are covered in detail on the coming pages. Routing protocols are usually considered layer-management protocols that support the network layer. Data Link Physical OSI network layer corresponds to the TCP/IP internet layer

40 Priority & Type of Service (8) Destination IP Address (32)
IP Datagram Bit 0 1 Bit 15 Bit 16 Bit 31 Version (4) Header Length (4) Priority & Type of Service (8) Total Length (16) Flags (3) Identification (16) Fragment offset (13) 20 Bytes Time to live (8) Protocol (8) Header checksum (16) Source IP Address (32) Purpose: This figure explains what is contained in an IP datagram. Emphasize: Discuss the format of the IP datagram. The current generation of IP is version 4. We need the Header Length (HLEN) and the Total Length in this example because the IP Options field allows a variable length. Time-To-Live (TTL) is a countdown field. Every station must decrement this number by one or by the number of seconds it holds onto the packet. When the counter reaches zero, the time to live expires and the packet is dropped. TTL keeps packets from endlessly wandering the internet in search of nonexistent destinations. The next generation of IP (called IPng) is IP version 6. It is covered in RFC 1752. Good references for this topic are Douglas Comer’s books on TCP/IP. Destination IP Address (32) Options (0 or 32 if any) Data (varies if any)

41 Protocol Field 상위 레이어를 결정한다. Transport Layer TCP UDP Protocol Numbers
6 17 Internet Layer Purpose: This figure explains the use of the protocol field. Emphasize: Protocol numbers connect, or multiplex, IP to the transport layer. These numbers are standardized in RFC Cisco uses these numbers in filtering with extended access lists. IP 상위 레이어를 결정한다.

42 Internet Control Message Protocol
Application Destination Unreachable Echo (Ping) Other Transport 1 ICMP Purpose: This figure explains which messages are ICMP messages. Emphasize: Describe ICMP messages and ping. Internet Data Link Physical

43 Address Resolution Protocol
I need the Ethernet address of Layer 1 of 4: Purpose: This figure shows how ARP is used to determine an IP address. In layer 1, host needs the MAC address of host It sends an ARP request message. IP: = ???

44 Address Resolution Protocol
I heard that broadcast. The message is for me. Here is my Ethernet address. I need the Ethernet address of Layer 2 of 4: In layer 2, host is on the same wire and receives the ARP request message. IP: = ???

45 Address Resolution Protocol
I heard that broadcast. The message is for me. Here is my Ethernet address. I need the Ethernet address of Layer 3 of 4: In layer 3, host sends an ARP reply with its MAC address to host IP: = ??? IP: Ethernet:

46 Address Resolution Protocol
I heard that broadcast. The message is for me. Here is my Ethernet address. I need the Ethernet address of Layer 4 of 4: In layer 4, the bulleted items at the bottom of the slide appear. Emphasize: ARP provides translation between network and data link layers. Discuss why it is necessary to have a mechanism like ARP. Describe ARP operation. Not all protocols use ARP. Some use other methods for address translation. Note: For the message to be transmitted uniquely to a single interface on the multiaccess link, it is necessary to build a frame with the unique MAC address of the interface IP: = ??? IP: Ethernet: Map IP Ethernet Local ARP

47 ARP ? Hello? Hello? 목적지 IP : C / C,D 211.253.120.12 PC 2 주소 : IP
주소 : IP Port 2 Hello? PC 3 PC 1 Port 1 Port 3 Port 4 Hello? 주소 : IP C / C,D 목적지 IP : PC 4 주소 : IP

48 ARP ?  Broadcast !!! ARP Request ? ARP Reply ! ARP Request ? Hello?
확인해보니 내 IP가 아니네! 그럼, 폐기시켜라! 누가 야? MAC을 물어봐야 되겠군! ARP야 물어봐라! PC 2 나를 찾고 있구나! 답변을 해야지! ARP Request ? 주소 : IP 주소 : IP ARP Reply ! Port 2 ARP Request ? MAC 주소 : PC 3 PC 1 Port 1 Port 3 Port 4 Hello? ARP Request ? 주소 : IP ARP Request ? Hello? C / C,D 목적지 IP 목적지 MAC : 누가 ? MAC Address가 뭐야 ? 목적지 IP : PC 4 확인해보니 내 IP가 아니네! 그럼, 폐기시켜라! 주소 : IP

49 ARP Cache ?  Broadcast 無!!! Hello? Hello? C / C,D 목적지 IP :
누가 야? (MAC Address가 뭐냐?) ARP Cache에서 찾아봐야겠군 ! PC 2 주소 : IP 주소 : IP Port 2 Hello? PC 3 PC 1 Port 1 Port 3 Port 4 주소 : IP Hello? C / C,D 목적지 IP : PC 4 004f.4e07.c67e 주소 : IP

50 Reverse ARP What is my IP address? Ethernet: 0800.0020.1111 IP = ???
Layer 1 of 4: Purpose: This figure explains how RARP works. In layer 1, the host on the left needs its IP address. It sends a RARP request with its MAC address. Ethernet: IP = ???

51 Reverse ARP I heard that broadcast. Your IP address is 172.16.3.25.
What is my IP address? Layer 2 of 4: In layer 2, the host on the right, functioning as a RARP server, maps the MAC address to an IP address. Ethernet: IP = ???

52 Reverse ARP I heard that broadcast. Your IP address is 172.16.3.25.
What is my IP address? Layer 3 of 4: In layer 3, the host on the right sends the IP address to the requester in a RARP reply message. Ethernet: IP = ??? Ethernet: IP:

53 Reverse ARP Map Ethernet IP
I heard that broadcast. Your IP address is What is my IP address? Layer 4 of 4: In layer 4, the bulleted items appear at the bottom of the slide. Emphasize: RARP is used to boot diskless workstations over a network. Ethernet: IP = ??? Ethernet: IP: Map Ethernet IP

54 Introduction to TCP/IP Addresses
HDR SA DA DATA Purpose: This is an introduction slide to the IP addressing section. Emphasize: Stations with internetwork access must have unique addresses. Unique addressing allows communication between end stations Path choice is based on location Location is represented by an address

55 Media Translations – Host A Encapsulation 과정
c.4a.b9.28 c.5a.a9.35 /24 e0 e1 /24 encapsulation Host A Server A 안녕하세요 ! f.9d.ea b.a3.4c S ~ Port D ~ Port S ~ IP D ~ IP S ~ Mac D ~ Mac 안녕 하세요 ! 1028 25 f.9d.ea c.4a.b9.28 Application Layer L4 Header L3 Header L2 Header

56 Media Translations – Host A Encapsulation 과정
의 MAC Add를 찾아봐야겠군!!! 내가 책임질 수 있는 경로인가? 라우팅 테이블을 봐야겠군!!! /24 /24 e0 e1 Router# sh arp Protocol Address Age (min) Hardware Addr Type Interface Internet c4a.b9289 ARPA Ethernet0 Internet e3.b2c0 ARPA Ethernet0 Internet f.9dea ARPA Ethernet0 Internet c5a.a ARPA Ethernet0 Internet b.a34c ARPA Ethernet0 Internet bf2d.d36c ARPA Ethernet0 Internet Incomplete ARPA c.4a.b9.28 c.5a.a9.35 Router# sh ip route Gateway of last resort is not set C /24 is directly connected, Ethernet0 C /24 is directly connected, Ethernet1 S …………………………………. Host A Server A f.9d.ea b.a3.4c S ~ Port D ~ Port S ~ IP D ~ IP S ~ Mac D ~ Mac 안녕 하세요 ! 1028 25 c.5a.a9.35 b.a3.4c Application Layer L4 Header L3 Header L2 Header 수정

57 Media Translations – Host A Encapsulation 과정
c.4a.b9.28 c.5a.a9.35 /24 e0 e1 /24 encapsulation Host A Server A 안녕하세요 ! 응답 f.9d.ea b.a3.4c S ~ Port D ~ Port S ~ IP D ~ IP S ~ Mac D ~ Mac 안녕! 응답 ! 25 1028 b.ba.4c c.5a.a9.35 Application Layer L4 Header L3 Header L2 Header

58 Media Translations – Router rewrite 과정
의 MAC Add를 찾아봐야겠군!!! 내가 책임질 수 있는 경로인가? 라우팅 테이블을 봐야겠군!!! /24 /24 e0 e1 Router# sh arp Protocol Address Age (min) Hardware Addr Type Interface Internet c4a.b9289 ARPA Ethernet0 Internet e3.b2c0 ARPA Ethernet0 Internet f.9dea ARPA Ethernet0 Internet c5a.a ARPA Ethernet0 Internet b.a34c ARPA Ethernet0 Internet bf2d.d36c ARPA Ethernet0 Internet Incomplete ARPA c.4a.b9.28 c.5a.a9.35 Router# sh ip route Gateway of last resort is not set C /24 is directly connected, Ethernet0 C /24 is directly connected, Ethernet1 S …………………………………. Host A Server A f.9d.ea b.a3.4c S ~ Port D ~ Port S ~ IP D ~ IP S ~ Mac D ~ Mac 안녕 ! 응답 25 1028 c.4a.b9.28 f.9d.ea Application Layer L4 Header L3 Header L2 Header 수정

59 Address & Subnetting

60 IP 주소 의미?

61 Computer(Host) 주소 문자 주소 : www.yahoo.co.kr 숫자 주소 :
논리적 주소(Logical Address)  IP Address: 10진수 물리적 주소(Physical Address)  MAC Address: 16진수 IP(internet Protocol) 구분 ? 공인 IP 사설 IP 고정 IP 유동 IP Unicast IP Multicast IP Broadcast IP

62 IP 주소 표현 Layer 3 of 3 Emphasize: In layer 3, an example of dotted decimal format and binary are displayed. IP address format is dotted decimal. Dotted decimal makes it easy to work with IP addresses. However, in this course we will work with the addresses on the bit level, so we will convert these addresses into binary, make changes to them, and convert them back. The central authority for addresses is the Internet Assigned Numbers Authority (IANA). Note: This most common form of addressing reflects the widely used IP version 4. Faced with the problem of depleting available addresses, Internet Engineering Task Force (IETF) work is under way for a backward-compatible next generation of IP (IPng, also called IP 6). IP 6 will offer expanded routing and addressing capabilities with 128-bit addresses rather than the 32-bit addressing shown on the graphic. Addresses from both IP versions will coexist. Initial occurrences will probably be at locations with address translator software and firewalls.

63 Network Host Network Host Network Host
IP 주소 Classes 8 bits 8 bits 8 bits 8 bits Class A: Class B: Class C: Class D: Multicast Class E: Research Network Host Network Host Network Host Layer 3 of 3 Emphasize: In layer 3, an example of dotted decimal format and binary are displayed. IP address format is dotted decimal. Dotted decimal makes it easy to work with IP addresses. However, in this course we will work with the addresses on the bit level, so we will convert these addresses into binary, make changes to them, and convert them back. The central authority for addresses is the Internet Assigned Numbers Authority (IANA). Note: This most common form of addressing reflects the widely used IP version 4. Faced with the problem of depleting available addresses, Internet Engineering Task Force (IETF) work is under way for a backward-compatible next generation of IP (IPng, also called IP 6). IP 6 will offer expanded routing and addressing capabilities with 128-bit addresses rather than the 32-bit addressing shown on the graphic. Addresses from both IP versions will coexist. Initial occurrences will probably be at locations with address translator software and firewalls.

64 IP 주소 Classes Slide 2 of 2 Emphasize: Highlight the fixed values that start each class address. The first octet rule states that when an address falls into a specified range, it belongs to a certain class. Students should soon be able to recognize the address class of any IP address on sight. Note: If time or interest permits, you can use the initial bit patterns in the first octet and show how a class of IP network derives the range of network numbers for that IP address class.

65 Network ID와 Host ID의 구분

66 IP 주소 구성 Class A Class B 10 Class C 110 Class D 1110
1-10 SLIDE : IP addressing 1bit 7bit 24bit Net주소부 Host 주소부 Class A 2bit 14bit 16bit Net주소부 Host 주소부 Class B 10 3bit 21bit 8bit Net주소부 Host 주소부 Class C 110 4bit 28bit Multicast 주소 Class D 1110 32bit 32bit 구조인 IPV4 → 향후 IPV6 128bit IP 주소는 네트워크 주소부, 호스트 주소부 구성 네트워크의 크기에 따라 A, B, C Class로 나뉘며, 특수 목적용으로 D, E Class 로 구분 최초 시작 bit 값에 Class 구분 일반 기업에서는 C Class 대역을 할당 받아 사용 Student notes TCP/IP를 사용하는 모든 호스트들은 32bit로 표현되어지는 유일한 값인 IP address를 가지게 되는데, 이것을 보기 쉽게 표시하기 위해 IP주소를 네 개의 바이트단위로 나누고 이를 10진수로 표시하는 dotted decimal 표현방식이 널리 이용된다. 예를 들어 IP 주소 을 dotted decimal IP주소로 표현하면 이 된다. IP 주소는 네트워크를 구분하기 위한 netid필드와 한 네트워크 내에서 호스트를 구분하기 위한 hostid 필드 두 부분으로 구성되며 각 필드에서 사용하는 비트 수의 크기에 따라 네 개의 클래스로 구분된다. IP Address는 A, B, C, D, E Class로 나뉘며, Class를 나누는 방법은 IP Address의 제일 처음 Byte의 시작 Bit가 0으로 시작되면 A Class, 시작 2 Bit가 10으로 시작되면 B Class, 시작 3 Bit가 110으로 시작되면 C Class, 시작 4 Bit가 1110로 시작되면 D Class, 시작 4 Bit가 1111이면 E Class 이다. 이 Class들 중 실제 Network에 사용되는 Class는 A, B, C Class이고, D Class는 Multicast용으로, E Class는 미래에 사용하려고 예약해 놓은 클래스이다. A class 0. ~ 127. 128개의 네트워크 할당이 가능하며, 대형 네트워크에 적용되어 진다. 하나의 클래스에 2^24개의 호스트를 수용할 수 있다. A Class는 IP Address 4 Byte의 첫번째 Byte의 처음 Bit가 0으로 시작하기 때문에 제일 처음 숫자가0 ~ 127로 시작된다. 따라서 부터 까지 범위를 갖게 된다. 그렇지만 은 사용하지 않는 Address이고, 127.x.x.x 는 시스템 Loopback 용 Address이기 때문에 사용하지 않는다. 실제로 사용되는 Address는 1 ~ 126 까지 이다. 즉 ~ 까지 사용된다. A Class Address의 Default Network Mask 는 인데, Network Mask는 4 Byte로 구성되고 용도는 Network Address를 구분해주는 역할을 한다. 예를 들어 의 A Class IP Address라고 하면 과 을 Bit AND 연산을 하여 나온 결과가 Network Address가 되는 것이다. 즉 이 Network Address가 되고, 나머지 1.1.1이 Host Address가 되는 것이다. 연산 결과처럼 A Class Network은 126개의 Network이 나올 수 있고, Host Address는 나머지 3 Byte로 16,777,214개가 나올 수 있다. 실제로 2 의 32승을 계산하면 16,777,216이 나오지만, Host Address가 인 것과 는 각각 Network Address와 해당 Network의 Broadcast Address로 사용되기 때문에 Host Address에서는 제외되어 16,777,214 라는 숫자가 나오게 된다. IP Address 가 인 Host는 Network에 속하고, Host Address는 1.1.1을 갖는다. B class 129. ~ 191. B Class 는 IP Address의 시작이 128 ~ 191로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며 Host Address는 2 Byte로 개를 가질 수 있다. A Class 와 마찬가지로 Network Address ( 0.0 )와 Broadcast Address ( )를 제외한 수 이다. IP Address가 을 갖는 Host는 Network에 속하며, Host Address는 1.1 이다. 중형 네트워크(대형 기관)에 적용되며, 하나의 클래스에 2^16개의 호스트를 수용할 수 있다. C class 192. ~ 223. C Class는 IP Address의 시작이 192 ~ 223로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며, Host Address는 1 Byte로254 개의 Host Address를 사용할 수 있다 ( 0, 255 제외 ). 하나의 클래스에 254개의 호스트를 할당할 수 있으며, 소형 네트워크에 적용된다. D class 224. ~ 239. D Class IP Address 는 시작이 224 ~ 239 까지이며, Multicast용도로 사용된다. Data통신은 Unicast, Broadcast, Multicast 세가지 정도로 나눌 수 있는데, Unicast는 Data를 받는 대상이 하나인 것을 말하며, Broadcast는 Network에 연결된 전체Node를 수신대상으로 하며, Multicast는 수신대상이 Network에 연결된 일부분의 Node를 대상으로 한다. Multicast 는 IGMP ( Internet Group Management Protocol )를 이용하여 Multicast 그룹을 확인한 뒤 Multicast Traffic을 보낸다. Multicast를 전송할 수 있는 Router들로 구성된 망을 MBONE( Multicast backBONE ) 이라고 한다. E Class Address 시작이 240 ~ 255 까지이며, 미래를 위해 남겨놓은 Address이다.

67 Class A nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh 1-10 SLIDE : IP addressing
1bit 7bit 24bit Net주소부 Host 주소부 32bit 1bit 7bit 24bit nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh Class 구분 bit(A class 의미) 네트워크 주소 8bit, 호스트 주소 24bit 할당 네트워크 주소 첫 bit ‘0’ Class 식별 bit 할당, 실제 네트워크 주소 bit는 7bit 네트워크 주소 IP 8bit가 나타낼 수 있는 값은 (0) ~ (127) = 128개 네트워크 주소 지정 네트워크 주소 중 0 과 127은 다른 용도로 예약 되어 실제 이용할 수 있는 네트워크 주소는 126개(2n – 2) ( ) 예약 : 대표 네트워크 주소 ( ) ~ ( ) 사용가능 ( ) 예약 : 시스템 Loop-back Test 용(Ping ) 호스트 주소는 9번째 bit ~ 32번째 bit 까지 24bit 할당 (0) ~ (16,777,215) = 224 (16,777,216개 주소 지정) 이중에 모두 ‘0’ 네트워크 주소 예약, 모두 ‘1’ Broadcast(방송) 주소 예약 실제 호스트 주소로 할당할 수 있는 IP 갯수는 네트워크 주소 1개당 16,777,214개 (2n – 2) 실제 지정할 수 있는 네트워크 주소, 호스트 주소 계산식 → 2n – 2 ( n=네트워크 주소, 호스트 주소 할당 bit 수 ) Student notes TCP/IP를 사용하는 모든 호스트들은 32bit로 표현되어지는 유일한 값인 IP address를 가지게 되는데, 이것을 보기 쉽게 표시하기 위해 IP주소를 네 개의 바이트단위로 나누고 이를 10진수로 표시하는 dotted decimal 표현방식이 널리 이용된다. 예를 들어 IP 주소 을 dotted decimal IP주소로 표현하면 이 된다. IP 주소는 네트워크를 구분하기 위한 netid필드와 한 네트워크 내에서 호스트를 구분하기 위한 hostid 필드 두 부분으로 구성되며 각 필드에서 사용하는 비트 수의 크기에 따라 네 개의 클래스로 구분된다. IP Address는 A, B, C, D, E Class로 나뉘며, Class를 나누는 방법은 IP Address의 제일 처음 Byte의 시작 Bit가 0으로 시작되면 A Class, 시작 2 Bit가 10으로 시작되면 B Class, 시작 3 Bit가 110으로 시작되면 C Class, 시작 4 Bit가 1110로 시작되면 D Class, 시작 4 Bit가 1111이면 E Class 이다. 이 Class들 중 실제 Network에 사용되는 Class는 A, B, C Class이고, D Class는 Multicast용으로, E Class는 미래에 사용하려고 예약해 놓은 클래스이다. A class 0. ~ 127. 128개의 네트워크 할당이 가능하며, 대형 네트워크에 적용되어 진다. 하나의 클래스에 2^24개의 호스트를 수용할 수 있다. A Class는 IP Address 4 Byte의 첫번째 Byte의 처음 Bit가 0으로 시작하기 때문에 제일 처음 숫자가0 ~ 127로 시작된다. 따라서 부터 까지 범위를 갖게 된다. 그렇지만 은 사용하지 않는 Address이고, 127.x.x.x 는 시스템 Loopback 용 Address이기 때문에 사용하지 않는다. 실제로 사용되는 Address는 1 ~ 126 까지 이다. 즉 ~ 까지 사용된다. A Class Address의 Default Network Mask 는 인데, Network Mask는 4 Byte로 구성되고 용도는 Network Address를 구분해주는 역할을 한다. 예를 들어 의 A Class IP Address라고 하면 과 을 Bit AND 연산을 하여 나온 결과가 Network Address가 되는 것이다. 즉 이 Network Address가 되고, 나머지 1.1.1이 Host Address가 되는 것이다. 연산 결과처럼 A Class Network은 126개의 Network이 나올 수 있고, Host Address는 나머지 3 Byte로 16,777,214개가 나올 수 있다. 실제로 2 의 32승을 계산하면 16,777,216이 나오지만, Host Address가 인 것과 는 각각 Network Address와 해당 Network의 Broadcast Address로 사용되기 때문에 Host Address에서는 제외되어 16,777,214 라는 숫자가 나오게 된다. IP Address 가 인 Host는 Network에 속하고, Host Address는 1.1.1을 갖는다. B class 129. ~ 191. B Class 는 IP Address의 시작이 128 ~ 191로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며 Host Address는 2 Byte로 개를 가질 수 있다. A Class 와 마찬가지로 Network Address ( 0.0 )와 Broadcast Address ( )를 제외한 수 이다. IP Address가 을 갖는 Host는 Network에 속하며, Host Address는 1.1 이다. 중형 네트워크(대형 기관)에 적용되며, 하나의 클래스에 2^16개의 호스트를 수용할 수 있다. C class 192. ~ 223. C Class는 IP Address의 시작이 192 ~ 223로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며, Host Address는 1 Byte로254 개의 Host Address를 사용할 수 있다 ( 0, 255 제외 ). 하나의 클래스에 254개의 호스트를 할당할 수 있으며, 소형 네트워크에 적용된다. D class 224. ~ 239. D Class IP Address 는 시작이 224 ~ 239 까지이며, Multicast용도로 사용된다. Data통신은 Unicast, Broadcast, Multicast 세가지 정도로 나눌 수 있는데, Unicast는 Data를 받는 대상이 하나인 것을 말하며, Broadcast는 Network에 연결된 전체Node를 수신대상으로 하며, Multicast는 수신대상이 Network에 연결된 일부분의 Node를 대상으로 한다. Multicast 는 IGMP ( Internet Group Management Protocol )를 이용하여 Multicast 그룹을 확인한 뒤 Multicast Traffic을 보낸다. Multicast를 전송할 수 있는 Router들로 구성된 망을 MBONE( Multicast backBONE ) 이라고 한다. E Class Address 시작이 240 ~ 255 까지이며, 미래를 위해 남겨놓은 Address이다.

68 Class B 10 10 nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh
1-10 SLIDE : IP addressing 2bit 14bit 16bit Net주소부 Host 주소부 10 32bit 2bit 14bit 16bit 10 nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh Class 구분 bit(B class 의미) 네트워크 주소 16bit, 호스트 주소 16bit 할당 네트워크 주소 첫 bit ‘10’ Class 식별 bit 할당, 실제 네트워크 주소 bit는 14bit(214 = 16,384개 네트워크 갯수 지정) 네트워크 주소 IP 16bit가 나타낼 수 있는 값은 (128.0) ~ ( ) = 16,384개 ( ) ~ ( ) 호스트 주소는 17번째 bit ~ 32번째 bit 까지 16bit 할당 (0) ~ (65,536) = 216 (65,536개 주소 지정) 이중에 모두 ‘0’ 네트워크 주소 예약, 모두 ‘1’ Broadcast(방송) 주소 예약 실제 호스트 주소로 할당할 수 있는 IP 갯수는 네트워크 주소 1개당 65,534개 (2n – 2) 실제 지정할 수 있는 네트워크 주소, 호스트 주소 계산식 → 2n – 2 ( n=네트워크 주소, 호스트 주소 할당 bit 수 ) Student notes TCP/IP를 사용하는 모든 호스트들은 32bit로 표현되어지는 유일한 값인 IP address를 가지게 되는데, 이것을 보기 쉽게 표시하기 위해 IP주소를 네 개의 바이트단위로 나누고 이를 10진수로 표시하는 dotted decimal 표현방식이 널리 이용된다. 예를 들어 IP 주소 을 dotted decimal IP주소로 표현하면 이 된다. IP 주소는 네트워크를 구분하기 위한 netid필드와 한 네트워크 내에서 호스트를 구분하기 위한 hostid 필드 두 부분으로 구성되며 각 필드에서 사용하는 비트 수의 크기에 따라 네 개의 클래스로 구분된다. IP Address는 A, B, C, D, E Class로 나뉘며, Class를 나누는 방법은 IP Address의 제일 처음 Byte의 시작 Bit가 0으로 시작되면 A Class, 시작 2 Bit가 10으로 시작되면 B Class, 시작 3 Bit가 110으로 시작되면 C Class, 시작 4 Bit가 1110로 시작되면 D Class, 시작 4 Bit가 1111이면 E Class 이다. 이 Class들 중 실제 Network에 사용되는 Class는 A, B, C Class이고, D Class는 Multicast용으로, E Class는 미래에 사용하려고 예약해 놓은 클래스이다. A class 0. ~ 127. 128개의 네트워크 할당이 가능하며, 대형 네트워크에 적용되어 진다. 하나의 클래스에 2^24개의 호스트를 수용할 수 있다. A Class는 IP Address 4 Byte의 첫번째 Byte의 처음 Bit가 0으로 시작하기 때문에 제일 처음 숫자가0 ~ 127로 시작된다. 따라서 부터 까지 범위를 갖게 된다. 그렇지만 은 사용하지 않는 Address이고, 127.x.x.x 는 시스템 Loopback 용 Address이기 때문에 사용하지 않는다. 실제로 사용되는 Address는 1 ~ 126 까지 이다. 즉 ~ 까지 사용된다. A Class Address의 Default Network Mask 는 인데, Network Mask는 4 Byte로 구성되고 용도는 Network Address를 구분해주는 역할을 한다. 예를 들어 의 A Class IP Address라고 하면 과 을 Bit AND 연산을 하여 나온 결과가 Network Address가 되는 것이다. 즉 이 Network Address가 되고, 나머지 1.1.1이 Host Address가 되는 것이다. 연산 결과처럼 A Class Network은 126개의 Network이 나올 수 있고, Host Address는 나머지 3 Byte로 16,777,214개가 나올 수 있다. 실제로 2 의 32승을 계산하면 16,777,216이 나오지만, Host Address가 인 것과 는 각각 Network Address와 해당 Network의 Broadcast Address로 사용되기 때문에 Host Address에서는 제외되어 16,777,214 라는 숫자가 나오게 된다. IP Address 가 인 Host는 Network에 속하고, Host Address는 1.1.1을 갖는다. B class 129. ~ 191. B Class 는 IP Address의 시작이 128 ~ 191로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며 Host Address는 2 Byte로 개를 가질 수 있다. A Class 와 마찬가지로 Network Address ( 0.0 )와 Broadcast Address ( )를 제외한 수 이다. IP Address가 을 갖는 Host는 Network에 속하며, Host Address는 1.1 이다. 중형 네트워크(대형 기관)에 적용되며, 하나의 클래스에 2^16개의 호스트를 수용할 수 있다. C class 192. ~ 223. C Class는 IP Address의 시작이 192 ~ 223로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며, Host Address는 1 Byte로254 개의 Host Address를 사용할 수 있다 ( 0, 255 제외 ). 하나의 클래스에 254개의 호스트를 할당할 수 있으며, 소형 네트워크에 적용된다. D class 224. ~ 239. D Class IP Address 는 시작이 224 ~ 239 까지이며, Multicast용도로 사용된다. Data통신은 Unicast, Broadcast, Multicast 세가지 정도로 나눌 수 있는데, Unicast는 Data를 받는 대상이 하나인 것을 말하며, Broadcast는 Network에 연결된 전체Node를 수신대상으로 하며, Multicast는 수신대상이 Network에 연결된 일부분의 Node를 대상으로 한다. Multicast 는 IGMP ( Internet Group Management Protocol )를 이용하여 Multicast 그룹을 확인한 뒤 Multicast Traffic을 보낸다. Multicast를 전송할 수 있는 Router들로 구성된 망을 MBONE( Multicast backBONE ) 이라고 한다. E Class Address 시작이 240 ~ 255 까지이며, 미래를 위해 남겨놓은 Address이다.

69 Class C 110 110 nnnnn nnnnnnnn nnnnnnnn hhhhhhhh
1-10 SLIDE : IP addressing 3bit 21bit 8bit Net주소부 Host 주소부 110 32bit 3bit 21bit 8bit 110 nnnnn nnnnnnnn nnnnnnnn hhhhhhhh Class 구분 bit(C class 의미) 네트워크 주소부 24bit, 호스트 주소부 8bit 할당 네트워크 주소 첫 bit ‘110’ Class 식별 bit 할당, 실제 네트워크 주소 bit는 21bit(221 = 2,097,152개 네트워크 주소 지정) 네트워크 주소부 IP 24bit가 나타낼 수 있는 값은 ( ) ~ ( ) = 2,097,152개 호스트 주소는 25번째 bit ~ 32번째 bit 까지 8bit 할당 (0) ~ (255) = 28 (256개 주소 지정) 이중에 모두 ‘0’ 네트워크 주소 예약, 모두 ‘1’ Broadcast(방송) 주소 예약 실제 호스트 주소로 할당할 수 있는 IP 갯수는 네트워크 주소 1개당 254개 (2n – 2) 실제 지정할 수 있는 네트워크 주소, 호스트 주소 계산식 → 2n – 2 ( n=네트워크 주소, 호스트 주소 할당 bit 수 ) Student notes TCP/IP를 사용하는 모든 호스트들은 32bit로 표현되어지는 유일한 값인 IP address를 가지게 되는데, 이것을 보기 쉽게 표시하기 위해 IP주소를 네 개의 바이트단위로 나누고 이를 10진수로 표시하는 dotted decimal 표현방식이 널리 이용된다. 예를 들어 IP 주소 을 dotted decimal IP주소로 표현하면 이 된다. IP 주소는 네트워크를 구분하기 위한 netid필드와 한 네트워크 내에서 호스트를 구분하기 위한 hostid 필드 두 부분으로 구성되며 각 필드에서 사용하는 비트 수의 크기에 따라 네 개의 클래스로 구분된다. IP Address는 A, B, C, D, E Class로 나뉘며, Class를 나누는 방법은 IP Address의 제일 처음 Byte의 시작 Bit가 0으로 시작되면 A Class, 시작 2 Bit가 10으로 시작되면 B Class, 시작 3 Bit가 110으로 시작되면 C Class, 시작 4 Bit가 1110로 시작되면 D Class, 시작 4 Bit가 1111이면 E Class 이다. 이 Class들 중 실제 Network에 사용되는 Class는 A, B, C Class이고, D Class는 Multicast용으로, E Class는 미래에 사용하려고 예약해 놓은 클래스이다. A class 0. ~ 127. 128개의 네트워크 할당이 가능하며, 대형 네트워크에 적용되어 진다. 하나의 클래스에 2^24개의 호스트를 수용할 수 있다. A Class는 IP Address 4 Byte의 첫번째 Byte의 처음 Bit가 0으로 시작하기 때문에 제일 처음 숫자가0 ~ 127로 시작된다. 따라서 부터 까지 범위를 갖게 된다. 그렇지만 은 사용하지 않는 Address이고, 127.x.x.x 는 시스템 Loopback 용 Address이기 때문에 사용하지 않는다. 실제로 사용되는 Address는 1 ~ 126 까지 이다. 즉 ~ 까지 사용된다. A Class Address의 Default Network Mask 는 인데, Network Mask는 4 Byte로 구성되고 용도는 Network Address를 구분해주는 역할을 한다. 예를 들어 의 A Class IP Address라고 하면 과 을 Bit AND 연산을 하여 나온 결과가 Network Address가 되는 것이다. 즉 이 Network Address가 되고, 나머지 1.1.1이 Host Address가 되는 것이다. 연산 결과처럼 A Class Network은 126개의 Network이 나올 수 있고, Host Address는 나머지 3 Byte로 16,777,214개가 나올 수 있다. 실제로 2 의 32승을 계산하면 16,777,216이 나오지만, Host Address가 인 것과 는 각각 Network Address와 해당 Network의 Broadcast Address로 사용되기 때문에 Host Address에서는 제외되어 16,777,214 라는 숫자가 나오게 된다. IP Address 가 인 Host는 Network에 속하고, Host Address는 1.1.1을 갖는다. B class 129. ~ 191. B Class 는 IP Address의 시작이 128 ~ 191로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며 Host Address는 2 Byte로 개를 가질 수 있다. A Class 와 마찬가지로 Network Address ( 0.0 )와 Broadcast Address ( )를 제외한 수 이다. IP Address가 을 갖는 Host는 Network에 속하며, Host Address는 1.1 이다. 중형 네트워크(대형 기관)에 적용되며, 하나의 클래스에 2^16개의 호스트를 수용할 수 있다. C class 192. ~ 223. C Class는 IP Address의 시작이 192 ~ 223로 시작되며, Default Network Mask 가 이다. 따라서 Network Address는 ~ 까지이며, Host Address는 1 Byte로254 개의 Host Address를 사용할 수 있다 ( 0, 255 제외 ). 하나의 클래스에 254개의 호스트를 할당할 수 있으며, 소형 네트워크에 적용된다. D class 224. ~ 239. D Class IP Address 는 시작이 224 ~ 239 까지이며, Multicast용도로 사용된다. Data통신은 Unicast, Broadcast, Multicast 세가지 정도로 나눌 수 있는데, Unicast는 Data를 받는 대상이 하나인 것을 말하며, Broadcast는 Network에 연결된 전체Node를 수신대상으로 하며, Multicast는 수신대상이 Network에 연결된 일부분의 Node를 대상으로 한다. Multicast 는 IGMP ( Internet Group Management Protocol )를 이용하여 Multicast 그룹을 확인한 뒤 Multicast Traffic을 보낸다. Multicast를 전송할 수 있는 Router들로 구성된 망을 MBONE( Multicast backBONE ) 이라고 한다. E Class Address 시작이 240 ~ 255 까지이며, 미래를 위해 남겨놓은 Address이다.

70 진법 계산 수의 체계 10진수 수들의 조합 : 2진수 0 1 수들의 조합 : 16진수 A B C D E F 수들의 조합 : 00-A0-0C B (MAC address 표현방법) 2진수와 10진수 변환 = 0 = 255 2진수 ⇒ 10진수 변환 계산법 ⇒ 211 (10진수) ⇒ 1 * * * * * * * * 20 ⇒ =

71 진법 계산 수의 체계 10진수 ⇒ 2진수 변환 계산법 : 211.41.187.5 ⇒ 2진수 ?
수들의 조합 : 2진수 0 1 수들의 조합 : 10진수 ⇒ 2진수 변환 계산법 : ⇒ 2진수 ? 0 0 1 0 1

72 진법 계산 수의 체계 : 16진수 16진수와 10진수 관계 16진수와 2진수 변환 10진수 ⇒ 2진수 변환 쉽다
A B C D E F 수들의 조합 : 00-A0-0C B (MAC address 표현방법) 16진수 한 자리는 4bit, 대개 두 자리씩 표현(8bit) : 10진수 170을 2진수로 표현하려면 8개의 2진수( )가 필요, 16진수로 표현 두개의 16진 숫자 AA로 간단히 표현할 수 있는 이유때문에 16진수 널리 사용하는 이유 AA ⇒ A * (161) + A * (160) ⇒ 10 * (16) * (1) = = 170 변환 16진수와 10진수 관계 16진수와 2진수 변환 10진수 ⇒ 2진수 변환 쉽다 A B C D E F 2 AA 2 2A A 16진수 ⇒ 10진수 변환 계산법 FADE(16진수) ⇒ 10진수 ? F * (163) A * (162) + D * (161) + E * (160) 15 * (4096) + 10 * (256) + 13 * (16) + 14 * (1) =

73 사설 IP 공인 IP는 NIC(Krnic)에서 관리하며 ISP업체에 공급, 사용자는 ISP에 공인 IP 신청
인터넷과 연결 하기 위해서는 각 Class의 공인 IP를 사용, 각 호스트마다 고유의 IP 사용 Local 네트워크에서는 (인터넷 연결하지 않는 네트워크) IP 주소를 A, B, C Class 중 아무거나 사용해도 상관없으나, 인터넷의 확산으로 인한 IP 주소의 부족을 해결하는 방안으로 IP 주소 영역에서 인터넷에서는 사용하지 않는 구역을 정의, 이 구역을 사설 주소(Private Address)라고 한다. 하나의 공인 IP를 이용 인터넷 연결, 나머지 호스트들은 사설 IP 할당해서(NAT) 공인 IP 부족을 보완하고 기업 네트워크의 보안을 목적으로 사용 이 사설 IP는 인터넷에 연결될 수 없도록 모든 트래픽을 ISP에서 봉쇄 # RFC(Request For Comment) : RFC (Request for Comments)는 위원회의 초벌 결과물로 나온 인터넷 공식 문서 또는 표준으로서 관심 있는 사람들이나 모임들의 검토를 위해 배포되지만, 몇몇 RFC들은 사실상 정보제공 정도의 목적을 가지고 있다. RFC는 인터넷 표준이 되기 위한 목적이므로, RFC의 최종판이 표준으로 채택되면 더 이상의 비평이나 변경은 허용되지 않는다. 그러나 이전 RFC들의 전부 또는 일부에 대해 양도하거나 퇴고한 후속 RFC를 통하여 변경될 수는 있다. Class IP 대역 (RFC 1597) A ~ B ~ C ~

74 IP Address Classes Exercise
Network Host Layer 1 of 2: Purpose: This exercise verifies that the students understand IP address classes, network numbers, and host numbers. Give the students time to list the address class, network, and host number for each IP address in the table. Review the correct answers interactively. The answers are given in the following figure.

75 IP Address Classes Exercise Answers
Network Host A B C Layer 2 of 2: Purpose: This answers to the exercise are given in the figure. Note: Students can also find the answers to this exercise in the “Answers” appendix. C B Nonexistent

76 Netmask & Subnetmask 넷 마스크(Netmask) = Default Subnet mask 넷 마스크의 역할
Class 네트워크 주소 호스트 주소 기본 넷 마스크 약식 표기 A 1 ~ 126 0.0.1 ~ /8 B 128.1 ~ 0.1 ~ /16 C ~ 1 ~ 254 /24 넷 마스크의 역할 데이터 전송 시 목적지 호스트 IP가 속해져 있는 네트워크 주소를 식별 네트워크 주소 IP 식별과 함께 브로드캐스트(방송) IP 식별 네트워크 세그먼트의 크기, 즉 호스트 수 마스크의 의미는 호스트 IP와 넷 마스크 IP를 And 연산 수행(둘 다 1인 경우 1) 넷 마스크 계산 Mask 연산 결과 호스트 IP의 네트워크 주소는 라는 것 Host IP의 범위가 ~ 로써 254개의 범위임을 알 수 있다. 마지막으로 Broadcast IP 가 인 것을 알 수 있다.

77 Mask의 종류 Network Mask = Default Subnet Mask
ex) Subnet Mask ex) Supernet Mask ex) Inverted Mask Wildcard Mask OSPF, Cisco Router Access-list에서 사용 ex)

78 Addressing Without Subnets
Purpose: This figure explains what networks look like without subnets. Emphasize: Without subnets, use of network addressing space is inefficient. The Class B network is like a highway with no exits—there is no place to exit, so all of the traffic is in one line.

79 Host Addresses Purpose: This figure presents an overview of host and network address conventions. Emphasize: In the example, and refer to the wires at each end of the router. Explain how the routing table is used. Entries in the routing table refer to the network only. The router does not know the location of hosts; it knows the location of networks. .

80 Addressing with Subnets
Purpose: This figure describes network structure when subnets are used. Emphasize: The host bits of an IP address can be subdivided into a subnetwork section and a host section. The subnetwork section in this example is the full third octet. Point out the difference in the addressing between the previous slide and this slide. A subnetted address space is like a highway with exits. A network device uses a subnet mask to determine what part of the IP address is used for the network, the subnet, and the device ID. A subnet mask is a 32-bit value containing a number of one bits for the network and subnet ID, and a number of zero bits for the host ID. Given its own IP address and subnet mask, a device can determine if an IP packet is destined for 1) a device on its own subnet, 2) a device on a different subnet on its own network, or 3) a device on a different network. A device can determine what class of address the device has been assigned from its own IP address. The subnet mask then tells the device where the boundary is between the subnet ID and the host ID.

81 Subnet Addressing Layer 1 of 2
Emphasize: By turning on more bits in the mask, we reserve some bits as network information and can use these bits to describe subnetworks. Describe how the router makes use of this technique. Point out that there is more information in the routing table now. Note: As you enter the discussion about subnet masks, a question might arise about whether it is legal to define a discontiguous subnet mask. A discontiguous subnet mask consists of intervening zeros, as in , rather than all ones followed by zeros, as in The question has two answers. According to RFC 950 that describes IP, a discontiguous subnet mask is legal. However, the hardware expense to produce an interface that supports discontiguous masking is cost prohibitive. Thus in practice it is not supported on most vendors’ equipment, including Cisco. Also, discontiguous masking has no benefit, and it is much more difficult to maintain a network based on this design. Later RFCs make noncontiguous subnet masks illegal because they are incompatible with future addressing schemes such as CIDR.

82 Internet Subnetting Subnet(서브넷) ?
서브넷(subnet)은 "subnetwork 의 줄인 말로서 어떤 기관에 소속된 네트웍이지만 따로 분리되어 한 부분으로 인식될 수 있는 네트웍을 말한다. 분리할 네트워크 개수가 많을 때 하나의 네트워크 세그먼트에 너무 많은 호스트 할당함으로써 트래픽이 심할 때 IP 주소의 효율적인 사용(IPV4의 부족한 IP 주소 임시적 해결 방안) 이러한 부분을 해결하기위한 방법이 Subnetmask(서브넷마스크) 이며, 이것을 Subnetting(서브넷팅)이라 한다. Internet /26 DSU/CSU /26 Subnetting / 26 /26 /24 /26

83 Subnetting Subnetmask(서브넷마스크) Class C 110 110 nnnnn nnnnnnnn nnnnnnnn
기존의 호스트 bit로 할당된 bit 중 일부를 Subnet bit로 지정 → 하나의 Major 네트워크당 다수의 Subnetwork 구성 C Class 는 defaultmask (/24), Host 주소 bit가 8bit 인데 2bit를 subnetmask 로 할당 /26 C Class Major 네트워크를 2bit Subneting 함으로써 4개( 22=4개)의 Subnetwork 구성 각 Subnetwork , , , (앞 그림 참조) 각 Subnetwork 는 6bit의 Host bit를 가짐으로 62개( 26 – 2= 64 – 2) 의 호스트 IP를 할당할 수 있다. ( 0 ~ 63=1~61), (64 ~ 127=65~126), (128 ~ 191=129~190), (192 ~ 255=193~254) Class C 110 Net주소(id) Host 주소(id) 32bit 3bit 21bit 2bit 6bit (8bit – 2bit) = 64 –2 = 62개 110 nnnnn nnnnnnnn nnnnnnnn SS hhhhhh Subnet bit 할당(22=4개의 Subnetwork) Defaultmask /24 Subnetmask /26

84 Internet Subnetting Subneting(서브넷팅 ) ISP DSU/CSU Subnetting
/26 Internet DSU/CSU ~ 1 ~ 62 DSU/CSU Subnetting / 26 /26 ~ 65 ~ 126 /24 /26 ISP ~ 129 ~ 190 /26 DSU/CSU ~ 193 ~ 254

85 Class B Subnetting Subnet(서브넷) → Class B : 168.249.0.0 Netmask 이진값 약식
Network Host 수 /16 1 65534 (216– 2) Subnetmask Subnetwork /17 0 (21 – 2) 32766 (215– 2) /18 2 2 (22– 2) 16382 (214– 2) /19 3 6 (23 – 2) 8190 (213– 2) /20 4 14 (24 – 2) 4094 (212 – 2) /21 5 30 (25 – 2) 2046 (211 – 2) /22 6 62 (26– 2) 1022 (210 – 2) /23 7 126 (27 – 2) 510 (29 – 2) /24 8 254 (28 – 2) /25 9 510 (29– 2) /26 10 /27 11 /28 12 4094(212 – 2) 14(24– 2) /29 13 8190 (213 – 2) /30 14 16382 (214 – 2) 2 (22 – 2)

86 Class C Subnetting Subnet(서브넷) → Class C : 211.41.187.0
Netmask 이진값 약식 n Network Host 수 /24 1 254 (28 – 2) Subnetmask Subnetwork /25 0 (21 – 2) 126 (27 – 2) /26 2 2 (22– 2) 62 (26– 2) /27 3 6 (23 – 2) 30 (25 – 2) /28 4 14 (24 – 2) 14(24– 2) /29 5 /30 6 2 (22 – 2) 서브네트워크(Subnetwork) 수, 호스트 수 계산식 → 2n – 2 Subnetwork 수는 2n 구성 ( Allow 1 subnet bit) Subnetmask 값 + Host 수 = 256 Subnetwork x Host 수 = 256

87 Subnet 의 표기 방법 Subnet(서브넷) → Class C : 211.41.187.0
Netmask 이진값 n 약식 /24 Subnetmask 1 /25 2 /26 3 /27 4 /28 5 /29 6 /30 C class Address 인 을 로 Subnetting 했을 때 매번 SubnetMask 값을 로 표기를 한다면 매우 귀찮은 일일 것이다. 그래서 를 /26으로 표기함으로써 간단히 표기할 수 있고 쉽게 Subnetting 된 Bit 수(2bit) 를 알 수 있다.

88 Subnetting – C Class Class C : / 24 1 / 25 ~ ~ ~ 2n – 2 = 126  1 ~ 126 2n – 2 = 126  129 ~ 254 2n – 2 = 254  1 ~ 254

89 Subnetting – C Class Class C : / 24 11 000000 / 26 ~ ~ 2n – 2 = 62  1 ~ 62 2n – 2 = 62 65 ~ 126 ~ 2n – 2 = 254  1 ~ 254 ~ ~ 2n – 2 = 62  129 ~ 190 2n – 2 = 62  193 ~ 254

90 Subnetting – C Class Class C : / 24 111 00000 / 27 ~ ~ ~ ~ 2n – 2 = 30  1 ~ 30 2n – 2 = 30  97 ~ 126 ~ ~ ~ 2n – 2 = 254  1 ~ 254 ~ ~ 2n – 2 = 30  191 ~ 222 2n – 2 = 30  161 ~ 190

91 Subnetting – C Class Class C : / 24 1111 0000 / 28 ~ ~ ~ ~ 16 1 15 2 14 3 ~ 13 4 12 5 2n – 2 = 254  1 ~ 254 11 6 10 7 9 8 ~ ~

92 Subnetting – C Class Class C : / 24 11111 000 / 29 ~ ~ ~ ~ 32 1 31 2 30 3 29 4 ~ 2n – 2 = 254  1 ~ 254 ~ ~

93 Subnetting – C Class Class C : / 24 111111 00 / 30 ~ ~ ~ ~ 64 1 63 2 62 3 ~ 61 4 2n – 2 = 254  1 ~ 254 ~ ~

94 Supernetting Route Summarization

95 VLSM (Variable Length Subnet Mask)
/ 30 / 30 / 30

96 IP Address Classes Exercise
Network Host Layer 1 of 2: Purpose: This exercise verifies that the students understand IP address classes, network numbers, and host numbers. Give the students time to list the address class, network, and host number for each IP address in the table. Review the correct answers interactively. The answers are given in the following figure.

97 IP Address Classes Exercise Answers
Network Host A B C Layer 2 of 2: Purpose: This answers to the exercise are given in the figure. Note: Students can also find the answers to this exercise in the “Answers” appendix. C B Nonexistent

98 Broadcast Addresses Exercise
Subnet Mask Class Subnet Broadcast Layer 1 of 2: Purpose: Have the students calculate the subnet numbers and the broadcast address for each subnet from the given IP addresses and subnet masks.

99 Broadcast Addresses Exercise Answers
Subnet Mask Class Subnet Broadcast C A B Layer 2 of 2: Purpose: This answers to the exercise are given in the figure. Note: Students can also find the answers to this exercise in the “Answers” appendix. B


Download ppt "IP 주소와 서브넷."

Similar presentations


Ads by Google