SITCON
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit
      • Invitee
      • No invitee
    • Publish Note

      Publish Note

      Everyone on the web can find and read all notes of this public team.
      Once published, notes can be searched and viewed by anyone online.
      See published notes
      Please check the box to agree to the Community Guidelines.
    • 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
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit
Invitee
No invitee
Publish Note

Publish Note

Everyone on the web can find and read all notes of this public team.
Once published, notes can be searched and viewed by anyone online.
See published notes
Please check the box to agree to the Community Guidelines.
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
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
--- GA: UA-34467841-15 --- 想上網?大展 L3 路由魔法吧! - SteveYi 小易 , Sciuridae 松鼠 === <blockquote> 此議程將會帶你以簡單的觀點,從最基本的路由開始認識到與真實網路交換路由,讓你了解路由器是如何運作的。 議程主要包含 路由器是如何讓你連上網際網路 如何自己設定想要的靜態路由 利用 OSPF 讓自己的路由器們進行內部路由交換 利用 BGP 讓別人連到自己的網路 以及介紹和別人連結會發生的種種問題 最後會簡單說明如何與真實的網路接上軌,帶你註冊 ASN 取得 IPv6 位置並和上游連接讓自己的 IP 廣播到網際網路! ## 目標聽眾 對於路由協議有興趣、想了解路由如何運作、想建立自己的網路的人 ## 先備知識 具有基礎網路理解(TCP/IP) </blockquote> ###### tags: `SITCON 2021 共筆` `SITCON 2021` `2021` `共筆` `R2` {%hackmd 8guaVQ0CRbaeUldFwc_8Ow %} > 請從這裡開始 TTL: 封包經過 Router 後遞減的數值 # 路由器 ## 功能 - 上網 - 封包轉發 - AP - 基地台發射 WiFi - 光纖轉換 ## 轉發 - Route Table - 紀錄流量下一站應該去哪裡 - 封包通過多個 Router - 看看有沒有通 - Ping - 看看封包哪裡棄置了 - traceroute - tracert - mtr ## NAT (網絡地址轉換) - ipinfo 與 NIC 拿到不同IP??? - Router / Firewall 製造出內網 - ARP 轉換封包目標地址 - RFC 紀錄了幾個 ip 網段給內網使用 # 基本路由認識 ## 靜態路由 - 哪張網卡可以到哪個網段 - 代價是多少 ## 動態路由 - Physical - 介面上做設定 - 路由表指定往不同線路跑 - BGP - OSPF - RIP ## 轉發機制 - 最小的網段優先 - 8.8.8.0 先於 8.8.0.0 - 若多筆路由為相同位置 以最小成本(Distance)優先 - Default Route - 路由表不知道去哪裡? - 預設路由 他就去這裡 # 靜態路由 手動指定路由到不同的 ISP # IGP 內部閘道協議 - Interior Gateway Protocol - OSPF - RIP - etc.. - 讓內網的路由器互相知道可以去哪裡 # BGP 邊界路由器 - Border Gateway Protocol - RFC 1771 from 1995 A.D. - 用 ASN 與其他路由器交換路由 ![](https://i.imgur.com/HRIw2BE.png) > 圖從 keynote screenshot,[更多資料頁面](https://bgp.he.net/AS60614#_graph4) ## iBGP (i => interior) - 內部路由交換 ## eBGP (e => exterior) - 與其他 ASN 建立 BGP Peer (交換外部路由) ## ASN (Autonomous System Number) - 網路中的識別號碼 - 簽署文件來驗證身份 - 宣告路由 ## BGP Hijacking (路由劫持) - Filter - 過濾接收及發送出的路由資料 - Neighbor Prefix Limit - 惡意 ASN 騙別人說自己有這段網段,當原 ASN 擁有者死掉就代替他了 ## Route Object - 記載 ASN、Prefix - 任何人都可以新增 - 可用Whois查詢 ## RPKI - 類似 SSL CA 機制 - 管理局紀錄你的 ASN 等 ## IX (Internet Exchange) - 網路交換中心 - 節省 Transit 成本 - 內容提供商 <-> IX <-> ISP ## 非對稱式路由 - 多個 upstream - 最佳化路由 # Getting started ## 需要什麼? - 知識 - router - ASN? - 把家裡網路搞斷線的心裡準備 ## 路由器選擇 - Mikrotik RouterOS (hEX S) - CHR - Juniper / Cisco - 撿二手 - Linux Routing Daemon ?! - 不好上手 - VyOS ## 環境 - 無 firewall - 可在網際網路上 access 的 public IP ## 如何跟全球網路接軌 - 管理局 申請這些 - ASN - IP Prefix - IANA -> APNIC -> TWNIC ![](https://i.imgur.com/6pZXygY.png) ![](https://i.imgur.com/kQVk4ou.jpg) > 從講者 keynote 盜圖 ### 證明 ASN & Prefix 是你的 - 增加 Route Object - RPKI 紀錄 - 驗證 Whois 上的 Email ## IP Transit - 直接跟 ISP 簽約 - 拉線到家裡 ~~歡樂送~~ - 在 Data Center (資料中心) 買 - 帶有 BGP 的 VPS - [推薦的BGP的VPS](https://bgp.services) - VPN Tunnel 去實驗 IX - EVIX - DN42 - Production 環境 - SIX - TWIX - HKIX - 很貴 - stuix - https://stuix.io - 不用花大錢 - TWIX 供應? ([name=jw910731] 請幫忙確認資訊正確與否) # Q/A https://app.sli.do/event/geguucph ## 請問什麼是 Segment Routing? - 講者無法清晰解釋 ## 可以跟茶園網路 Peering 嗎? - 看 [PeeringDB](https://peeringdb.net/asn/17415) ## 大大可以分享自己初始上手使用的物理設備嗎 - 虛擬機 Vultr 主機商 - 軟體 [BIRD](https://bird.network.cz/) ## 可以請問一下DN42和真實網路的差別嗎 - 一個很大的內網 - 可以網內互連 - 不會在真實網路上連入 - 你需要連進去這個內網才能互連 ## 申請 ASN 可以完全免費嗎? - 看是跟誰申請 ## 有沒有哪間 ISP 的 Transit 比較推薦 便宜又好用? - 沒有特別推薦 - 可以參考 https://bgp.services

Import from clipboard

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 is not available.
Upgrade
All
  • All
  • Team
No template found.

Create custom 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

How to use Slide mode

API Docs

Edit in VSCode

Install browser extension

Get in Touch

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
Upgrade to Prime Plan

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

No updates to save
Compare with
    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

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

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

      Syncing

      Push failed

      Push successfully