ubuntu 12.04上校园网 说是要设置静态IP 什么的 怎么设置啊?
-
- 帖子: 1
- 注册时间: 2012-12-14 22:58
- 系统: ubuntu
ubuntu 12.04上校园网 说是要设置静态IP 什么的 怎么设置啊?
希望大神的详细说明 用mentohust 可以认证 但就是获取IP之类的 失败 上不了网
-
- 帖子: 47
- 注册时间: 2009-07-16 15:16
Re: ubuntu 12.04上校园网 说是要设置静态IP 什么的 怎么设置啊?
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
# 有线网卡
auto eth0
iface eth0 inet static
# IP 地址
address xxx.xxx.xxx.xxx
# 子网掩码
netmask 255.255.255.0
# 网关
gateway xxx.xxx.xxx.xxx
再 重启网卡
ifconfig 可以看到结果了$ sudo ifdown eth0
$ sudo ifup eth0
- kuangquanshuili
- 帖子: 57
- 注册时间: 2011-11-03 17:51
Re: ubuntu 12.04上校园网 说是要设置静态IP 什么的 怎么设置啊?
楼上正解。 

www.3gegg.com、www.paiziwang.com、www.shumeipai.net、www.52bazhong.com
-
- 帖子: 35
- 注册时间: 2012-12-22 15:34
- 系统: Ubuntu12.04
Re: ubuntu 12.04上校园网 说是要设置静态IP 什么的 怎么设置啊?
但是为什么会成这样?sasika 写了:再 重启网卡$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
# 有线网卡
auto eth0
iface eth0 inet static
# IP 地址
address xxx.xxx.xxx.xxx
# 子网掩码
netmask 255.255.255.0
# 网关
gateway xxx.xxx.xxx.xxxifconfig 可以看到结果了$ sudo ifdown eth0
$ sudo ifup eth0
mzf@mzf-Aspire-5552G:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
mzf@mzf-Aspire-5552G:~$ auto lo
No command 'auto' found, did you mean:
Command 'uuto' from package 'uucp' (universe)
auto: command not found
mzf@mzf-Aspire-5552G:~$ iface lo inet loopback
iface: command not found
mzf@mzf-Aspire-5552G:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
mzf@mzf-Aspire-5552G:~$
mzf@mzf-Aspire-5552G:~$
mzf@mzf-Aspire-5552G:~$ # 有线网卡
mzf@mzf-Aspire-5552G:~$ auto eth0
No command 'auto' found, did you mean:
Command 'uuto' from package 'uucp' (universe)
auto: command not found
mzf@mzf-Aspire-5552G:~$ iface eth0 inet static
iface: command not found
mzf@mzf-Aspire-5552G:~$ # IP 地址
mzf@mzf-Aspire-5552G:~$ address 218.197.215.254
No command 'address' found, did you mean:
Command 'naddress' from package 'util-vserver' (universe)
address: command not found
mzf@mzf-Aspire-5552G:~$ # 子网掩码
mzf@mzf-Aspire-5552G:~$ netmask 255.255.255.0
255.255.255.0/32
mzf@mzf-Aspire-5552G:~$ # 网关
mzf@mzf-Aspire-5552G:~$ gateway 218.197.215.254
gateway: command not found
mzf@mzf-Aspire-5552G:~$
-
- 帖子: 47
- 注册时间: 2009-07-16 15:16
Re: ubuntu 12.04上校园网 说是要设置静态IP 什么的 怎么设置啊?
shepherd_M,
呃 /etc/network/interfaces 是一个文件 直接修改它就好了
我只是用 cat 来显示一下设置成静态IP时它可以是什么样子的……
你可以自己用喜欢的(文本)编辑器修改的
呃 /etc/network/interfaces 是一个文件 直接修改它就好了
我只是用 cat 来显示一下设置成静态IP时它可以是什么样子的……

你可以自己用喜欢的(文本)编辑器修改的
-
- 帖子: 2
- 注册时间: 2012-11-10 8:44
- 系统: ubuntu12.10+windows8
Re: ubuntu 12.04上校园网 说是要设置静态IP 什么的 怎么设置啊?
右上角的数据连接,编辑连接,添加,ipv4方法手动,添加学校给你的地址子网掩码网关ip等等,就ok了。我用的是校园网ubuntu12.10lts