ข่าว: ข่าวประกาศ

  • 26 เมษายน 2024, 07:26:08

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ผู้เขียน หัวข้อ: โครงสร้างไฟล์ /etc/network/interfaces  (อ่าน 10046 ครั้ง)

admin

  • Administrator
  • Hero Member
  • *****
  • กระทู้: 3820
    • ดูรายละเอียด
    • อีเมล์
โครงสร้างไฟล์ /etc/network/interfaces
« เมื่อ: 25 กรกฎาคม 2010, 04:20:30 »
หัวข้อนี้จะมาเพิ่มความรู้เกี่ยวกับ Interface ต่าง ๆ ใน Ubuntu ที่นำมาสร้างเป็น MultiWAN

1. Loop Back Interface เปรียบเสมือน internal interface สำหรับรัน service ของระบบ

auto lo
iface lo inet loopback

2. Ethernet Interface ในรูปแบบ ต่าง ๆ (dhcp , manual , static)

auto eth0
iface eth0 inet dhcp

auto eth0
iface eth0 inet manual

auto eth0
iface eth0 inet static
        address 192.168.200.1
        netmask 255.255.255.0

3. VLAN Interface โดยการกำหนดในไฟล์ /etc/init.d/interfaces  สามารถใช้งานได้เหมือน Ethernet Interface

auto vlan100
iface vlan100 inet static
        address 192.168.100.1
        netmask 255.255.255.0
        vlan_raw_device eth1
        hw-mac-address 00:fa:23:6c:3c:e8

auto vlan101
iface vlan101 inet manual
        vlan_raw_device eth1
        hw-mac-address 08:fa:23:6c:01:01

auto vlan102
iface vlan102 inet dhcp
        vlan_raw_device eth1
        hw-mac-address 08:fa:23:6c:01:02

4. PPP Interface

auto dsl-link1
iface dsl-link1 inet ppp
        pre-up /sbin/ifconfig eth1 up
        provider dsl-link1

auto dsl-link2
iface dsl-link2 inet ppp
        pre-up /sbin/ifconfig vlan102 up
        provider dsl-link2

เป็นต้น
« แก้ไขครั้งสุดท้าย: 25 กรกฎาคม 2010, 04:40:31 โดย admin »
<a href="http://www.hadyaiinternet.com/images/inetcafe.swf" target="_blank" rel="noopener noreferrer" class="bbc_link bbc_flash_disabled new_win">http://www.hadyaiinternet.com/images/inetcafe.swf</a>


There are no comments for this topic. Do you want to be the first?