本文主要是介绍ubuntu12.04 LTS 使用锐捷客户端上网 (HUST),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
今天发现要使用有线网络上网,但是学校还要使用锐捷,好麻烦啊~于是就谷歌了一下~原来在ubuntu下用锐捷上网是超级简单的事情!
1.下载锐捷客户端:
免费下载地址: nc.hust.edu.cn/down/down_soft.php
我使用的是: su_for_linux_V1.01_0520.tar.gz
2.配置静态IP和域名服务器DNS
静态IP配置方法:
编辑/etc/network/interfaces,删掉内容,并输入以下几行(假设你的网卡是eth0)
sudo gedit /etc/network/interfaces
auto eth0
iface eth0 inet static //指定为static
address 192.168.1.103 //IP地址 (注:请填写你自己申请到的静态IP)
gateway 192.168.1.1 //网关 (注:请填写你自己申请到的静态IP所对应的网关)
netmask 255.255.255.0 //子网掩码
然后重启网络设备
sudo /etc/init.d/networking restart
设置DNS:
Ubuntu设置DNS,只要将DNS地址写入/ect/resolv.conf文件即可,但在12.04 desktop版中,重启系统之后,静态IP设置生效,但无法链接外网,/etc/resolv.conf文件的DNS地址也覆盖掉了。
解决办法,在/etc/resolvconf/resolv.conf.d/目录下创建tail文件,写入
nameserver 202.96.134.133 (注:请填写你自己申请到的静态IP所对应的主域名服务器)
nameserver 202.96.128.68 (注:请填写你自己申请到的静态IP所对应的备用域名服务器也可以不填写)
然后重启,DNS生效。
3.安装锐捷客户端:
绿色软件,无需安装,直接解压运行4.帮助信息
解压命令
$ tar -xvf su_for_linux_V1.01_0520.tar.gz
进入解压生成的锐捷客户端文件夹
$ cd rjsupplicant
运行锐捷
sudo ./rjsupplicant.sh -u (用户名) -p (密码) -d 0
rjsupplicant - usage
-d --dhcp dhcp(with parameter[0/1], 0 means using system interface
config, 1 means get ip by dhcp server; take last config
without this option)
-n --nic nic (with parameter[eg. eth0, detail for "-l"], default
take last nic or first nic without this option)
-s --service service (with parameter["servicename", detail for "-l"],
default take last service name or first service name wi
thout this option)
-u --user user name (with parameter[detail for "-l"], default take
last user name without this option)
-p --password password (with parameter, it can be seted after running
if without password, default is null unless save passwor
d before)
-S --save save password (with parameter[0/1], 0 means not save, 1
means save, default take last config without this option
)
-q --quit quit program(without parameter,take this option(-q) to q
uit the program)
-l --list list information: without parameter, only show config wi
th this option, sush as version, authmode, nic, service[
option], user, service list[opt], nic list. this command
default to list current authentication information)
--comments if you want to run as daemon, please add "&" after comma
nd line. if you want to close the stdout, please add ">&
-" before "&". if you want to quit the daemon program, p
lease using command "-q". if run as daemon, the running
log in "/home/mei/Software/rjsupplicant/x86/log/run.log"
.
接下来就可以浏览网页啦!happy~
这篇关于ubuntu12.04 LTS 使用锐捷客户端上网 (HUST)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!