cubieboard学习之网络设置

1 由dhcp服务器分配动态ip的设置

auto eth0 
iface eth0 inet dhcp
auto wlan0http://write.blog.csdn.net/postedit/40002159
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf
2 设置静态ip
auto eth0
iface eth0 inet static
address 192.168.1.102
netmask 255.255.255.0
gateway 192.168.1.1
auto wlan0
iface wlan0 inet static
address 192.168.1.103
netmask 255.255.255.0
gateway 192.168.1.1
pre-up ip link set wlan0 up #你无线网卡的名字 可能不是wlan0请用ifconfig -a查看
pre-up iwconfig wlan0 essid ssid #ssid 为你无线网的名字
wpa-ssid ssid #ssid 为你无线网的名字,同上
wap-psk password #password你无线网的密码 比如12345678

3 启动项 /etc/init.d/networking

重启 sudu /etc/init.d/networking restart

4 说明

auto eth0 表示在启动时自动配置网卡接口eth0

iface 语句只是ifup使用DHCP或静态ip来配置接口ip地址

5 注意(配置eth0且DHCP分配ip情况)

这个配置文件会在系统启动的时候激活你的RJ45网卡接口并尝试通过DHCP服务配置它。如果你并没有插入网线,这将会阻塞系统启动一分钟,等待DHCP超时事件发生后系统才会继续启动。如过你十分确定不需要有线网络,请通过删除或注释/etc/network/interfaces中的auto eth0以禁止这个特性,这将会大大减少系统启动时间。你仍然可以通过手工激活并配置有线网络ifup eth0

6 参考

https://github.com/cubieplayer/Cubian/wiki/%E4%B8%8A%E6%89%8BCubian

http://www.debian.org/doc/manuals/debian-reference/ch05.en.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值