ดาวน์โหลดบทความดาวน์โหลดบทความ

default gateway ก็คือ IP address ของเราเตอร์ ปกติจะถูกกำหนดอัตโนมัติโดยระบบปฏิบัติการของคุณตอนติดตั้ง แต่ถ้าจำเป็น จะเปลี่ยนเองก็ได้ โดยเฉพาะคนที่มีหลาย network adapter หรือเราเตอร์ในเครือข่ายเดียว

ส่วน 1
ส่วน 1 ของ 2:

ใช้ Terminal

ดาวน์โหลดบทความ
  1. How.com.vn ไท: Step 1 เปิด Terminal.
    จะเปิดจากแถบข้าง หรือกด Ctrl+Alt+T ก็ได้[1]
  2. How.com.vn ไท: Step 2 ดู default gateway ปัจจุบัน.
    คุณเช็คค่า default gateway ปัจจุบันได้ โดยพิมพ์ route แล้วกด Enter address ที่เห็นข้าง "default" คือ default gateway ของคุณ ส่วนรายละเอียดของ interface จะอยู่ทางขวาของตาราง
  3. How.com.vn ไท: Step 3 ลบ default gateway ปัจจุบัน.
    ถ้ามีมากกว่า default gateway เดียว ระวังจะมีปัญหาการเชื่อมต่อ เพราะงั้นให้ลบ default gateway ที่มีก่อนถ้าอยากจะเปลี่ยน[2]
    • พิมพ์ sudo route delete default gw IP Address Adapter เช่น ถ้าจะลบ default gateway 10.0.2.2 ของ adapter eth0 ให้พิมพ์ sudo route delete default gw 10.0.2.2 eth0
  4. How.com.vn ไท: Step 4 พิมพ์ .
    sudo route add default gw IP Address Adapter. เช่น ถ้าจะเปลี่ยน default gateway ของ adapter eth0 เป็น 192.168.1.254 ให้พิมพ์ sudo route add default gw 192.168.1.254 eth0[3] จะมีให้ใส่รหัสผ่านผู้ใช้ (user password) ก่อนถึงจะใช้คำสั่งได้
    โฆษณา
ส่วน 2
ส่วน 2 ของ 2:

แก้ไขไฟล์ Configuration

ดาวน์โหลดบทความ
  1. How.com.vn ไท: Step 1 เปิดไฟล์ configuration ใน editor.
    พิมพ์ sudo nano /etc/network/interfaces เพื่อเปิดไฟล์ใน nano editor การแก้ไขไฟล์ configuration จะบันทึกค่าใหม่เก็บไว้ทุกครั้งที่ระบบรีสตาร์ท[4]
  2. How.com.vn ไท: Step 2 ไปยังส่วนที่ถูกต้อง.
    หาส่วนของ adapter ที่จะเปลี่ยน default gateway ถ้าใช้วิธีเสียบสาย ปกติจะเป็น eth0
  3. How.com.vn ไท: Step 3 เพิ่ม .
    gateway IP Address เข้าไปในส่วนนั้น. เช่น พิมพ์ gateway 192.168.1.254 default gateway จะได้เป็น 192.168.1.254 [5]
  4. How.com.vn ไท: Step 4 เซฟค่าใหม่แล้วออกไป.
    กด Ctrl+X แล้วกด Y เพื่อเซฟค่าใหม่แล้วออกไป
  5. How.com.vn ไท: Step 5 รีสตาร์ทเครือข่าย.
    โดยพิมพ์ sudo /etc/init.d/networking restart [6]
    โฆษณา

เกี่ยวกับวิกิฮาวนี้

วิกิฮาวเป็น "wiki" ซึ่งหมายความว่าบทความหลายๆ บทความของเรานั้นเป็นการร่วมมือกันเขียนของผู้เขียนหลายคน ในการเขียนบทความชิ้นนี้ ผู้คน 10 คน ซึ่งบางคนไม่ขอเปิดเผยตัว ได้ร่วมกันเขียนและปรับปรุงเนื้อหาของบทความอย่างต่อเนื่อง บทความนี้ถูกเข้าชม 9,605 ครั้ง
หมวดหมู่: เครือข่าย
มีการเข้าถึงหน้านี้ 9,605 ครั้ง

บทความนี้เป็นประโยชน์กับคุณไหม

⚠️ Disclaimer:

Content from Wiki How ไท language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

Notices:
  • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
  • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
  • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
  • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

โฆษณา