Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> Linux教程 >> linux上網設置經典

linux上網設置經典

日期:2017/2/7 9:26:48      編輯:Linux教程
 

1、一種是linux共享局域網內的windows主機上網

  如果你的網卡linux能夠識別的話在安裝的時候會有網卡配置過程。從列表中選擇網絡設備,一般為eth0,點擊“編輯”,在打開的“編輯接口”對話框中,用戶可以通過DHCP來配置網絡,這樣也可以,不過我更喜歡定制一個靜態IP,所以去掉“使用DHCP進行配置”前面的選項,然後在下面輸入你要定制的IP地址和子網掩碼,確定後,在下面的網關和主要DNS裡輸入當前局域網上做為主機的計算機的IP地址。這樣裝完以後就搞定。

  如果你是裝完後再安裝的網卡的話,那可以在“系統設置”裡選擇“網絡”,如果你的網卡安裝成功的話會在下面的列表裡看到你的網卡,同樣設置DNS(和上面一樣),然後再回到列表裡,選中你的網卡,點上面的編輯,選中“當計算機啟動時激活設備”,然後選擇下面的“靜態設置的IP地址”,在下面輸入和上面同樣的設置。再重新啟動就可以了。

2、另外一種就是用你的linux通過ADSL上網了

  在linux下就集成著一個ADSL撥號軟件,打開終端,在裡面輸入#adsl-setup,然後進行設置:

LOGIN NAME

Enter your Login Name (default root):(輸入你的用戶名)
INTERFACE

Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0):(選擇網絡設備)
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no):(選擇是按需撥號,還是持續連接)

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here:(選擇DNS)
PASSWORD

Please enter your Password:
Please re-enter your Password:

USERCTRL

Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes):(是否允許普通用戶啟動、關閉)

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2):(選擇firewall的規則)

Start this connection at boot time

Do you want to start this connection at boot time?
Please enter no or yes (default no):(選擇是否隨機啟動)
** Summary of what you entered **

Ethernet Interface:
User name:
Activate-on-demand:
DNS addresses:
Firewalling:
User Control:
Accept these settings and adjust configuration files (y/n)?(確認一下是否接受設置)

  以上的設置在“系統設置”裡 的“網絡”裡選擇新建,建立一個xDSL連接,也可以實現。設置完成了以後在網絡裡激活連接。

  上面的ADSL連接就試過一次,由於我們是局域網,所以一直用的是共享上網,如果有什麼錯誤不要罵我,還請指教!!

Copyright © Windows教程網 All Rights Reserved