# 根据网上资料整理
# 方式1和方式4已验证
# anything the matter, please contact: asksamuel@sina.com
目录
方式1:网卡通过DHCP自动获取IP地址
方式2:网卡静态分配IP地址
方式3:PPPoE宽带拨号配置
方式4:通过无线局域网接入互联网
方式1:网卡通过DHCP自动获取IP地址
$ sudo gedit /etc/interfaces
# 修改文件/etc/interfaces如下文
#-------------------------------------------------------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
#
# The loopback network interface(配置环回口)
auto lo # 开机自动激lo接口
iface lo inet loopback # 配置lo接口为环回口
# The primary network interface (配置主网络接口)
auto eth0 #开机自动激活eth0接口
iface eth0 inet dhcp #配置eth0接口为DHCP自动获取
#-------------------------------------------------------------------------------
$ sudo /etc/init.d/networking restart # 重启网络
方式2:网卡静态分配IP地址
$ sudo gedit /etc/interfaces
# 修改文件/etc/interfaces如下文
#-------------------------------------------------------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
#
# The loopback network interface(配置环回口)
auto lo # 开机自动激lo接口
iface lo inet loopback # 配置lo接口为环回口
# The primary network interface (配置主网络接口)
auto eth0 #开机自动激活eth0接口
iface eth0 inet static #配置eth0接口为静态设置IP地址
address 10.16.3.99
netmask 255.255.255.0
network 10.16.3.0
broadcast 10.16.3.255
gateway 10.16.3.1
####################################################
## dns-* options are implemented by the resolvconf package, if installed(DNS设置)
#dns-nameservers 61.153.177.196 61.153.177.197
#dns-search fireteam.org
####################################################
#sudo gedit /etc/resolv.conf
##设置DNS server(可以设置多个)
#nameserver 192.168.1.1
####################################################
#-------------------------------------------------------------------------------
$ sudo /etc/init.d/networking restart # 重启网络
方式3:PPPoE宽带拨号配置
首次拨号:
应用程序–系统工具–终端 打开一终端,输入命令:
sudo pppoeconf
系统开始搜索所有网络接口上的adsl modem,一步步的yes过来。
│ Please enter the username which you usually need for │
│ the PPP login to your provider in the input box below. │
│ If you wish to see the help screen, delete the │
│ username and press OK. │
输入你的宽带帐号。
输入密码。
tip:如果是河南网通提供的PPPoE宽带帐号,此处输入的是加密后的用户名
Would you like to add these addresses automatically to the list of nameservers
in your local /etc/resolv.conf file? (recommended)
是否自动获得DNS,选择是。
Should pppoe clamp MSS at 1452 bytes? If unsure, say yes.
数据包长度的设置,如果跟我一样不确定,选择是
Your PPPD is configured now. Would you like to start the connection at
boot time?
是否启动时自动激活ADSL? 各位看着办吧。
#p#副标题#e#
以后,要手工拨号,打开终端,输入命令:
sudo pon dsl-provider
一般情况下,一次拨通后以后登陆ubuntu都会自动拨通上网的了,不用每次都输入命令拨号。
手工断线:
sudo poff
查看连接情况:
plog 和 ifconfig ppp0
ifconfig ppp0 可查询本机的上网IP。
方式4:通过无线局域网接入互联网
要求安装有无线局域网卡并已驱动
1.插入无线网卡
查看一下网络设置,看看是否多出来了两个设备
$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:24:7e:14:a9:a8
inet6 addr: fe80::224:7eff:fe14:a9a8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11998024 errors:0 dropped:0 overruns:0 frame:0
TX packets:13667166 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1069420740 (1.0 GB) TX bytes:3776606487 (3.7 GB)
Memory:fc200000-fc220000
eth0:avahi Link encap:Ethernet HWaddr 00:24:7e:14:a9:a8
inet addr:169.254.7.73 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Memory:fc200000-fc220000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:66657 errors:0 dropped:0 overruns:0 frame:0
TX packets:66657 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6372151 (6.3 MB) TX bytes:6372151 (6.3 MB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:123.10.130.147 P-t-P:123.10.128.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:149828 errors:0 dropped:0 overruns:0 frame:0
TX packets:122796 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:150170347 (150.1 MB) TX bytes:16349467 (16.3 MB)
wlan0 Link encap:Ethernet HWaddr 00:22:fa:94:48:56
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
最新游戏更多
最新软件更多
- 玩家推荐
- 游戏攻略
安装配对故事手机版休闲益智 171M配对故事非常好玩的消除游戏,一边
安装宝宝巴士奇妙就诊时光最新版模拟经营 81.8M宝宝巴士奇妙就诊时光最新版主要
安装消消大作战手机版休闲益智 70.2M消消大作战安卓版是一款非常好玩
安装魔法蜘蛛英雄官方版动作游戏 58.3M魔法蜘蛛英雄官方版是一款蜘蛛侠
安装火炮世界大炮单机游戏 132 MB火炮世界大炮这款射击冒险游戏采
安装烈火战神变态版变态手游烈火战神手机变态版是一款全新格
安装不服来打我游戏策略塔防 87.9M不服来打我最新版本带来了休闲策
安装有名的音乐家单机游戏 30.06MB有名的音乐家这款跑酷手游拥有非
安装世界olh5变态版一键端h5游戏 45.8M世界olh5体验服是由谷得游戏出品
安装探索狂野使命游戏冒险解谜 291M探索狂野使命游戏带来了好玩的冒
- 妄想山海生活,却遭遇破城锤,你究竟能如何解锁它?2023-05-07
- 天刀手游:牙板神奇的认识与使用!聊聊牙板可以带给你什么?2023-05-07
- 赛博朋克夜店超梦:2077年,有一场令人惊叹的奇幻之旅!2023-05-07
- 异度神剑2现已更新!追加剧情攻略+主线任务,让你完成游戏更有把握!2023-05-07
- 宝可梦剑盾:新一代精灵宝可梦蝙蝠龙大登场!2023-05-07
- 洪荒通天神级选择:升级你的智慧,打通天神树!2023-05-07
- 2077 4K游戏体验:有你的笔记本电脑就够了!2023-05-07
- 宝可梦剑盾:看看你到底了解多少!睡眠技能详解2023-05-07
- 海洋之心:十大巧妙玩法,令你轻松攻略!2023-05-07
- 「玩魔兽、完成梦想!购买魔兽争霸3:重制版最划算的方法,今天就告诉你!」2023-05-07
诚捷手游网 Copyright(C) 2008- tynpfw.cn All Rights Reserved!