{"id":18839195,"url":"https://github.com/solareenlo/42netpractice","last_synced_at":"2026-01-27T10:35:38.768Z","repository":{"id":93865681,"uuid":"375997566","full_name":"solareenlo/42netpractice","owner":"solareenlo","description":"Basics of networking and routing table","archived":false,"fork":false,"pushed_at":"2021-11-17T18:47:00.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T20:16:52.154Z","etag":null,"topics":["42","42born2code","42cursus","42projects","network","routing-tables"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solareenlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-11T11:06:26.000Z","updated_at":"2021-11-17T18:47:02.000Z","dependencies_parsed_at":"2023-03-08T12:45:36.115Z","dependency_job_id":null,"html_url":"https://github.com/solareenlo/42netpractice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solareenlo/42netpractice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42netpractice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42netpractice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42netpractice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42netpractice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solareenlo","download_url":"https://codeload.github.com/solareenlo/42netpractice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42netpractice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42born2code","42cursus","42projects","network","routing-tables"],"created_at":"2024-11-08T02:42:08.945Z","updated_at":"2026-01-27T10:35:38.748Z","avatar_url":"https://github.com/solareenlo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 42netpractice\n\n### level10\n- level9 と同じ\n\n### level9\n- Internet の Routes は，Internet と繋がっている Interface に繋がるネットワークの Network Address を記入する\n  - その際に，一番範囲の大きな Network Address のサブネットマスクにする\n- switch で繋がってる Interface は同じ network にする\n- プライベート IP アドレスは Internet に繋ぐのあれば使えない\n\n### level8\n- Internet の Routes は，Internet と繋がっている Interface に繋がるネットワークの Network Address を記入する\n- サブネットマスクは，`/26` の範囲内にあるネットワークを `/28` で分割する\n- プライベート IP アドレスは Internet に繋ぐのあれば使えない\n  - 10.0.0.0 ~ 10.255.255.255 (10.0.0.0/8) (Class A)\n  - 172.16.0.0 ~ 172.31.255.255 (172.16.0.0/12) (Class B)\n  - 192.168.0.0 ~ 192.168.255.255 (192.168.0.0/16) (Class C)\n\n### level7\n- (A) Interface A1 と Interface R11 は同じサブネットマスクにする\n  - client A の設定は，Interface A1 -\u003e Interface R11 への設定をする\n- (B) Interface R12 と Interface R21 は同じサブネットマスクにする\n  - roter R1 の設定では，Interface R12 -\u003e Interface R21 への設定をする\n  - roter R2 の設定では，Interface R21 -\u003e Interface R12 への設定をする\n- (C) Interface R22 と Interface C1 は同じサブネットマスクにする\n  - client C の設定では，Interface C1 -\u003e Interface R22 への設定をする\n- (A), (B), (C) はそれぞれ別のサブネットマスクにする\n  - なぜならば，ルータは別のネットワークを繋ぐものだから，同じネットワークにある IP Address は突っぱねる\n\n### level6\n- I の宛先の下1桁は 1 なのに気をつける\n  - つまり `internet: Internet Routs: 163.172.250.1/32 -\u003e xxx.xxx.xxx.xxx` にするということ\n- ルーティングテーブルの宛先ルート (Routes) には，相手先の `Interface の IP Address` を入力する\n- 複数行にマッチする場合，「/xx」のxx部分（サブネットマスク長）の値が大きい方（より範囲が狭い方）のルートを優先的に採用する．\n  - [ルーティングテーブルの見方](https://qiita.com/cafedrip/items/8f0cc9544910cba23be8#ルーティングテーブルの見方)\n- switch でつながっている部分のサブネットマスクは同じで構わない\n\n### level5\n- Routes には，`default` -\u003e `通信先の Interface の IP Address` を入れる\n\n### level4\n- Interface R2 で 110.102.43.1 ~ 110.102.43.126 がホストとして使われる\n- Interface R3 で 110.102.43.193 ~ 110.102.43.254 がホストとして使われる\n- ので残りの 110.102.43.129 ~ 110.102.43.190 までが Interfase R1 のホストとして使える\n\n### References\n#### Gateway\n- ゲートウェイとは，「ネクストホップ」と同じ情報，つまり，ネットワークに到達するためのゲートウェイを示す．\n  - ゲートウェイとは，OSI 参照モデルのトランスポート層からアプリケーション層までの階層で，データを変換して中継する装置のこと．\n- インターフェイスは，ローカルで利用可能なインターフェイスのうち，ゲートウェイへの到達を担当するもの．\n\n### Subnet mask\n\n| CIDR | SUBNET MASK               | WILDCARD MASK   | # OF IP ADDRESSES | # OF USABLE IP ADDRESSES |\n|------|---------------------------|-----------------|-------------------|--------------------------|\n| /32  | 255.255.255.255           | 0.0.0.0         | 1                 | 1                        |\n| /31  | 255.255.255.254           | 0.0.0.1         | 2                 | 2*                       |\n| /30  | 255.255.255.252           | 0.0.0.3         | 4                 | 2                        |\n| /29  | 255.255.255.248           | 0.0.0.7         | 8                 | 6                        |\n| /28  | 255.255.255.240           | 0.0.0.15        | 16                | 14                       |\n| /27  | 255.255.255.224           | 0.0.0.31        | 32                | 30                       |\n| /26  | 255.255.255.192           | 0.0.0.63        | 64                | 62                       |\n| /25  | 255.255.255.128           | 0.0.0.127       | 128               | 126                      |\n| /24  | 255.255.255.0             | 0.0.0.255       | 256               | 254                      |\n| /23  | 255.255.254.0             | 0.0.1.255       | 512               | 510                      |\n| /22  | 255.255.252.0             | 0.0.3.255       | 1,024             | 1,022                    |\n| /21  | 255.255.248.0             | 0.0.7.255       | 2,048             | 2,046                    |\n| /20  | 255.255.240.0             | 0.0.15.255      | 4,096             | 4,094                    |\n| /19  | 255.255.224.0             | 0.0.31.255      | 8,192             | 8,190                    |\n| /18  | 255.255.192.0             | 0.0.63.255      | 16,384            | 16,382                   |\n| /17  | 255.255.128.0             | 0.0.127.255     | 32,768            | 32,766                   |\n| /16  | 255.255.0.0               | 0.0.255.255     | 65,536            | 65,534                   |\n| /15  | 255.254.0.0               | 0.1.255.255     | 131,072           | 131,070                  |\n| /14  | 255.252.0.0               | 0.3.255.255     | 262,144           | 262,142                  |\n| /13  | 255.248.0.0               | 0.7.255.255     | 524,288           | 524,286                  |\n| /12  | 255.240.0.0               | 0.15.255.255    | 1,048,576         | 1,048,574                |\n| /11  | 255.224.0.0               | 0.31.255.255    | 2,097,152         | 2,097,150                |\n| /10  | 255.192.0.0               | 0.63.255.255    | 4,194,304         | 4,194,302                |\n| /9   | 255.128.0.0\t             |0.127.255.255    | 8,388,608         | 8,388,606                |\n| /8   | 255.0.0.0                 | 0.255.255.255   | 16,777,216        | 16,777,214               |\n| /7   | 254.0.0.0                 | 1.255.255.255   | 33,554,432        | 33,554,430               |\n| /6   | 252.0.0.0                 | 3.255.255.255   | 67,108,864        | 67,108,862               |\n| /5   | 248.0.0.0                 | 7.255.255.255   | 134,217,728       | 134,217,726              |\n| /4   | 240.0.0.0                 | 15.255.255.255  | 268,435,456       | 268,435,454              |\n| /3   | 224.0.0.0                 | 31.255.255.255  | 536,870,912       | 536,870,910              |\n| /2   | 192.0.0.0                 | 63.255.255.255  | 1,073,741,824     | 1,073,741,822            |\n| /1   | 128.0.0.0                 | 127.255.255.255 | 2,147,483,648     | 2,147,483,646            |\n| /0   | 0.0.0.0                   | 255.255.255.255 | 4,294,967,296     | 4,294,967,294            |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42netpractice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolareenlo%2F42netpractice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42netpractice/lists"}