KangMoo
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 네트워크 (3) - IP 주소와 서브넷 ## IPv4와 서브넷 마스크 - IPv4의 IP 주소는 32비트(bit), 즉 0 또는 1로 만으로 표기하는 이진(Binary)수 32자리로 구성되어 있다. ![image](https://hackmd.io/_uploads/SJqOpKzYh.png) ![image](https://hackmd.io/_uploads/SygqatMth.png) - IP주소의는 두 가지 요소로 구분된다 - 네트워크 부 : 호스트가 속한 네트워크 주소 - 호스트 부 : 호스트의 주소 ![image](https://hackmd.io/_uploads/BySpTtMKh.png) ## IP 주소와 클래스 - IP 주소의 클래스는 IP 주소 체계의 한 부분으로, IP 주소를 다양한 네트워크 크기에 맞게 분류하고, 특정 IP 주소 범위를 특정 조직에 할당하는 방법을 제공한다. - 클래스는 A, B, C, D, E로 나뉘며, 이들은 IP 주소의 첫 번째 옥텟의 값에 따라 결정된다. - 각 클래스는 특정 크기의 네트워크를 대상으로 하며, 이를 통해 대형, 중형, 소형 네트워크에 적합한 주소 공간을 제공한다. - 클래스 A, B, C는 일반적인 네트워킹에 사용되며, 클래스 D는 멀티캐스트를 위해, 클래스 E는 실험적인 목적으로 예약되어 있다. ![image](https://hackmd.io/_uploads/SkRF0KMt3.png) ### A 클래스 IP 주소 - A 클래스 IP 주소는 매우 큰 네트워크를 대상으로 한다. 첫 번째 옥텟은 네트워크를, 나머지 세 옥텟은 호스트를 식별하는 데 사용된다. - A 클래스 주소의 첫 번째 옥텟은 1~126의 범위에 있다. (예: 10.0.0.1) - 각 A 클래스 네트워크는 최대 약 1600만 개의 호스트를 지원할 수 있다. ### B 클래스 IP 주소 - B 클래스 IP 주소는 중형 네트워크를 대상으로 한다. 처음 두 개의 옥텟은 네트워크를, 나머지 두 개의 옥텟은 호스트를 식별하는 데 사용된다. - B 클래스 주소의 첫 번째 옥텟은 128~191의 범위에 있다. (예: 172.16.0.1) - 각 B 클래스 네트워크는 최대 약 6만 5000개의 호스트를 지원할 수 있다. ### C 클래스 IP 주소 - C 클래스 IP 주소는 작은 네트워크를 대상으로 한다. 처음 세 개의 옥텟은 네트워크를, 마지막 옥텟은 호스트를 식별하는 데 사용된다. - C 클래스 주소의 첫 번째 옥텟은 192~223의 범위에 있다. (예: 192.168.0.1) - 각 C 클래스 네트워크는 최대 256개의 호스트를 지원할 수 있다. ### D 클래스 IP 주소 - D 클래스 IP 주소는 멀티캐스트를 위해 사용되는 IP 주소이다. 멀티캐스트는 네트워크 상의 여러 호스트로 동시에 패킷을 전달하는 통신 방식이다. - D 클래스 주소의 첫 번째 옥텟은 224~239의 범위에 있다. (예: 225.0.0.1) - D 클래스 주소는 네트워크나 호스트를 식별하지 않는다. 대신, D 클래스 주소에는 멀티캐스트 그룹이 포함되어 있다. ### E 클래스 IP 주소 - E 클래스 IP 주소는 실험적인 목적으로 예약된 IP 주소이다. 이 클래스의 주소는 공식적으로는 사용되지 않고, 보통 연구나 개발 목적으로 사용된다. - E 클래스 주소의 첫 번째 옥텟은 240~255의 범위에 있다. - E 클래스 주소는 인터넷에서 라우팅되지 않으며, 네트워크 표준에 따라 특정 기능을 수행하기 위해 예약되어 있다. ### 특수 목적을 위한 IP 주소 #### 네트워크 주소 - 네트워크 주소는 특정 네트워크를 식별하는 데 사용되는 IP 주소이다. - 네트워크 주소에서는 호스트 부분이 모두 0으로 설정된다. 예를 들어, C 클래스 IP 주소인 192.168.1.0은 192.168.1.x 네트워크를 식별하는 주소로 사용된다. - 네트워크 주소는 라우팅 테이블 등에서 네트워크의 경로를 정의하는 데 사용되며, 일반적으로 직접 통신에 사용되지는 않는다. #### 브로드캐스트 주소 - 브로드캐스트 주소는 네트워크상의 모든 호스트에 패킷을 전송하는 데 사용되는 IP 주소이다. - 브로드캐스트 주소에서는 호스트 부분이 모두 1로 설정된다. 예를 들어, C 클래스 IP 주소인 192.168.1.255는 192.168.1.x 네트워크의 모든 호스트에 패킷을 전송하는 데 사용된다. - 브로드캐스트는 특정 네트워크 내의 모든 장치에 동시에 메시지를 전달할 때 사용되며, 이는 네트워크 관리 및 서비스 검색 등 다양한 목적으로 사용된다. #### 로컬호스트 주소 - 로컬호스트 주소는 자기 자신을 참조하는 데 사용되는 IP 주소이다. - 가장 흔히 사용되는 로컬호스트 IP 주소는 127.0.0.1이며, 이 주소를 사용하여 컴퓨터는 자신에게 패킷을 보낼 수 있다. - 이 주소는 주로 네트워크 연결 없이 자체 시스템 내에서 네트워크 연결을 시뮬레이션하거나, 로컬호스트에서 실행되는 서버에 접근할 때 사용된다. #### 사설 IP 주소 - 사설 IP 주소는 인터넷에서 직접 접근할 수 없는, 내부 네트워크에서만 사용되는 IP 주소이다. - 사설 IP 주소는 일반적으로 집이나 사무실, 학교 등의 로컬 네트워크에서 사용되며, 인터넷에 연결하려면 네트워크 주소 변환(Network Address Translation, NAT)과 같은 메커니즘이 필요하다. - 사설 IP 주소 범위는 A 클래스에서는 10.0.0.0 ~ 10.255.255.255, B 클래스에서는 172.16.0.0 ~ 172.31.255.255, C 클래스에서는 192.168.0.0 ~ 192.168.255.255이다. - 이런 방식의 주소는 IP 주소 고갈 문제를 완화하고, 내부 네트워크의 보안을 강화하는데 도움을 준다. ![image](https://hackmd.io/_uploads/SkzfkqfYn.png) ## 서브네팅 (Subnetting) - 서브넷팅은 큰 네트워크를 작은 네트워크 단위로 분할하는 과정이다. - 서브넷팅은 IP 주소 공간을 효율적으로 활용하며, 네트워크 관리를 쉽게하고, 네트워크 트래픽을 줄이는데 도움을 준다. - 서브넷팅을 통해 생성된 각각의 네트워크는 '서브넷'이라고 불리며, 각 서브넷은 독립적으로 운영되지만, 물리적으로는 하나의 네트워크 안에 존재할 수 있다. ### 서브넷 - 클래스 방식의 비효율성과 한계에 의해 사용되는 방식. - 서브넷은 서브넷팅을 통해 생성된 독립적인 네트워크를 의미한다. - 각 서브넷은 고유한 서브넷 주소를 가지며, 이 주소는 네트워크 주소와 호스트 주소의 부분으로 나누어진 IP 주소를 기반으로 한다. - 서브넷 주소는 '서브넷 마스크'라는 값을 사용하여 계산되며, 이는 네트워크와 호스트 부분을 구분하는 데 사용된다. - 서브넷은 네트워크의 보안을 강화하고, 네트워크 성능을 향상시키며, IP 주소 공간을 효율적으로 사용하는 데 도움을 준다. ![image](https://hackmd.io/_uploads/Sk7KzjfF3.png) ![image](https://hackmd.io/_uploads/H1iufiMK2.png) ### 서브넷 마스크 ![image](https://hackmd.io/_uploads/rkz-C4rYn.png) - 서브넷 마스크는 IP 주소를 네트워크 주소와 호스트 주소 부분으로 나누는 데 사용되는 숫자이다. - 서브넷 마스크는 IP 주소와 함께 'AND' 비트 연산을 수행하여 네트워크 주소를 구한다. 예를 들어, IP 주소가 192.168.1.1이고 서브넷 마스크가 255.255.255.0일 경우, 네트워크 주소는 192.168.1.0이 된다. - 이를 통해 같은 서브넷에 속한 호스트들이 패킷을 서로 간에 직접 전송할 수 있도록 하며, 다른 서브넷으로의 패킷은 라우터를 통해 전송하게 된다. - 이렇게 서브넷 마스크를 사용하는 것은 네트워크 관리를 용이하게 하고, IP 주소 공간을 효율적으로 사용하며, 네트워크 트래픽을 줄이는데 도움을 준다. - 서브넷 마스크를 표현하는 두 가지 방식이 있다. 하나는 '10진수 표기법'이며, 다른 하나는'CIDR'이다. ### 서브넷 마스크의 두 가지 표기법 ![image](https://hackmd.io/_uploads/B1Hu0VBth.png) - 서브넷 마스크는 두 가지 주요한 표기법을 가지고 있으며, 각각 디시말 (Decimal) 표기법과 CIDR (Classless Inter-Domain Routing) 표기법이다. 1. 디시말 표기법 (10진수 표기법) - 이 표기법은 일반적으로 가장 널리 사용되며, '255.255.255.0'과 같이 각 옥텟을 점으로 구분된 10진수로 표현한다. - 이는 네트워크 부분과 호스트 부분을 구분하는데 사용된다. 255는 네트워크 주소 부분이며, 0은 호스트 주소 부분을 나타낸다. 2. CIDR 표기법 (프리픽스 표기법) - CIDR 표기법은 서브넷 마스크를 '/숫자' 형태로 표현한다. 여기서 숫자는 1의 개수를 나타내며, 이는 서브넷 마스크를 2진수로 표현했을 때 1의 개수를 의미한다. - 예를 들어, '192.168.1.1/24'라는 CIDR 표기법은 '192.168.1.1'이라는 IP 주소와 '255.255.255.0'이라는 서브넷 마스크를 함께 나타낸 것이다. - 이 표기법은 IP 주소의 클래스 없는 지정을 가능하게 하며, IP 주소 할당을 더 유연하고 효율적으로 만든다. ![image](https://hackmd.io/_uploads/Bye_GSSK2.png) ### 서브네팅을 통해 얻는 장점과 단점 #### 장점 1. IP 주소 효율적 사용: 서브네팅은 큰 네트워크를 작은 단위로 분할함으로써 IP 주소 공간의 효율적인 활용을 가능하게 한다. 2. 네트워크 관리의 효율화: 네트워크를 여러 개의 작은 네트워크로 나누면 각각의 네트워크를 개별적으로 관리할 수 있어서, 전체 네트워크의 관리가 훨씬 쉬워진다. 3. 네트워크 성능 향상: 네트워크를 여러 서브넷으로 분할하면, 각 서브넷에서 발생하는 트래픽은 해당 서브넷 내에서 제한되므로, 네트워크의 성능이 향상된다. 4. 보안 향상: 서브네팅을 통해 개별 네트워크 단위로 보안 정책을 적용할 수 있어, 보안을 향상시킬 수 있다. #### 단점 1. 복잡성: 서브네팅은 네트워크 설계 및 관리를 복잡하게 만들 수 있다. 이는 서브넷 마스크를 정확하게 계산하고 각 서브넷을 올바르게 구성하고 관리해야 하기 때문이다. 2. 에러 가능성 증가: 서브네팅을 잘못 구성하면 네트워크 문제를 일으킬 수 있다. 예를 들어, 서브넷 마스크를 잘못 설정하면 일부 호스트가 네트워크에 접속하지 못하게 될 수 있다. 3. 서브네팅 지식 필요: 서브네팅을 올바르게 수행하려면, 네트워크 관리자가 IP 주소, 서브넷 마스크, CIDR 등에 대한 충분한 지식을 갖추어야 한다.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully