我单位电脑安装了双系统,因为单位全部是设置的静态IP,在XP上可以设置好上网,原来我是13.04也设置好可以上网,安装14.04后进行设置,就是没有用,根本不会出现活动连接。也没有eth0这个显示。没有合法的活动连接。我的interfaces文件时这样的:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
#iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.16.76
gateway 192.168.16.1
netmask 255.255.255.0
network 192.168.16.0
broadcast 192.168.16.255
head文件是这样的:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
设置步骤是安装网上来的,也好像没错呀。谁知道怎么弄吗?在线等结果。
请教UBUNT14.04如何设置静态IP
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 66
- 注册时间: 2010-04-22 12:43
-
- 论坛版主
- 帖子: 18279
- 注册时间: 2009-08-04 16:33
Re: 请教UBUNT14.04如何设置静态IP
需要改為#iface lo inet loopback
iface lo inet loopback
然後
sudo /etc/init.d/networking stop
如果出現錯誤訊息 不理它 繼續
sudo /etc/init.d/networking start
把下面指令 複製 貼進終端機 執行
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
3. sudo route -nv
4. sudo dhclient -v
5. sudo cat /etc/network/interfaces
6. sudo ls -al /etc/resolv.conf
7. sudo cat /run/resolvconf/resolv.conf
把結果直接複製 貼上來
-
- 帖子: 66
- 注册时间: 2010-04-22 12:43
Re: 请教UBUNT14.04如何设置静态IP
不知道为什么又科研上网啦,真奇怪。
www@www-Vostro-260:~$ sudo lshw -numeric -class network
[sudo] password for www:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
vendor: Realtek Semiconductor Co., Ltd. [10EC]
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 06
serial: d4:be:d9:e0:6b:bf
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.16.76 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:42 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff
www@www-Vostro-260:~$ sudo ifconfig -a
eth0 Link encap:以太网 硬件地址 d4:be:d9:e0:6b:bf
inet 地址:192.168.16.76 广播:192.168.16.255 掩码:255.255.255.0
inet6 地址: fe80::d6be:d9ff:fee0:6bbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:251150 错误:0 丢弃:109 过载:0 帧数:0
发送数据包:144745 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:228784013 (228.7 MB) 发送字节:14693413 (14.6 MB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:141 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:141 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:9983 (9.9 KB) 发送字节:9983 (9.9 KB)
www@www-Vostro-260:~$ sudo lshw -numeric -class network
[sudo] password for www:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
vendor: Realtek Semiconductor Co., Ltd. [10EC]
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 06
serial: d4:be:d9:e0:6b:bf
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.16.76 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:42 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff
www@www-Vostro-260:~$ sudo ifconfig -a
eth0 Link encap:以太网 硬件地址 d4:be:d9:e0:6b:bf
inet 地址:192.168.16.76 广播:192.168.16.255 掩码:255.255.255.0
inet6 地址: fe80::d6be:d9ff:fee0:6bbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:251150 错误:0 丢弃:109 过载:0 帧数:0
发送数据包:144745 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:228784013 (228.7 MB) 发送字节:14693413 (14.6 MB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:141 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:141 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:9983 (9.9 KB) 发送字节:9983 (9.9 KB)
-
- 帖子: 66
- 注册时间: 2010-04-22 12:43
Re: 请教UBUNT14.04如何设置静态IP
又又用啦,真奇怪。
-
- 帖子: 66
- 注册时间: 2010-04-22 12:43
Re: 请教UBUNT14.04如何设置静态IP
[sudo] password for www:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
vendor: Realtek Semiconductor Co., Ltd. [10EC]
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 06
serial: d4:be:d9:e0:6b:bf
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.16.76 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:42 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff
www@www-Vostro-260:~$ sudo ifconfig -a
eth0 Link encap:以太网 硬件地址 d4:be:d9:e0:6b:bf
inet 地址:192.168.16.76 广播:192.168.16.255 掩码:255.255.255.0
inet6 地址: fe80::d6be:d9ff:fee0:6bbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:251150 错误:0 丢弃:109 过载:0 帧数:0
发送数据包:144745 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:228784013 (228.7 MB) 发送字节:14693413 (14.6 MB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:141 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:141 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:9983 (9.9 KB) 发送字节:9983 (9.9 KB)
www@www-Vostro-260:~$ sudo route -nv
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
0.0.0.0 192.168.16.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
vendor: Realtek Semiconductor Co., Ltd. [10EC]
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 06
serial: d4:be:d9:e0:6b:bf
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.16.76 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:42 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff
www@www-Vostro-260:~$ sudo ifconfig -a
eth0 Link encap:以太网 硬件地址 d4:be:d9:e0:6b:bf
inet 地址:192.168.16.76 广播:192.168.16.255 掩码:255.255.255.0
inet6 地址: fe80::d6be:d9ff:fee0:6bbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:251150 错误:0 丢弃:109 过载:0 帧数:0
发送数据包:144745 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:228784013 (228.7 MB) 发送字节:14693413 (14.6 MB)
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:141 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:141 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:9983 (9.9 KB) 发送字节:9983 (9.9 KB)
www@www-Vostro-260:~$ sudo route -nv
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
0.0.0.0 192.168.16.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- TeliuTe
- 论坛版主
- 帖子: 7675
- 注册时间: 2007-11-25 13:29
- 系统: 16/18/20/w7
- 来自: 新疆博乐
- 联系:
Re: 请教UBUNT14.04如何设置静态IP
可以通过右上角的网络连接来设置,参考: http://teliute.org/linux/Ubsetup/lesson23/lesson23.html
6)如果是局域网上网,在出来的对话框里,选中里面的“Wired connection1”,点右边的“编辑”按钮;

7)在出来的对话框里,选择 IPV4 设置标签,在下面的方法里选“手动”,再点下边的“添加”按钮,
在出来的文本框里,依次输入 IP 地址、子网掩码、网关,然后按回车键确定,在下面的 DNS 里输入 DNS 服务器地址,
检查一下,点右下角的“保存”按钮,在出来的认证中,输入自己的密码;

回到原来对话框点“关闭”,稍等一会就可以上网了
6)如果是局域网上网,在出来的对话框里,选中里面的“Wired connection1”,点右边的“编辑”按钮;

7)在出来的对话框里,选择 IPV4 设置标签,在下面的方法里选“手动”,再点下边的“添加”按钮,
在出来的文本框里,依次输入 IP 地址、子网掩码、网关,然后按回车键确定,在下面的 DNS 里输入 DNS 服务器地址,
检查一下,点右下角的“保存”按钮,在出来的认证中,输入自己的密码;

回到原来对话框点“关闭”,稍等一会就可以上网了