[root@FriendlyARM /]# ifconfig eth1 up
(2012-06-06 19:43:59)
标签:
娱乐
/]# ifconfig eth0 down (2)减载USB WiFi 无线网卡
[root@FriendlyARM /]# ifconfig eth1 up
rt73usb 1-1:1.0: firmware: requesting rt73.bin
[root@FriendlyARM /]#
(3)扫描可用的无线收集
[root@FriendlyARM /]# iwlist scanning | grep ESSID
lo Interface doesn't support scanning.
eth0 Interface doesn't support scanning.
wmaster0 Interface doesn't support scanning.
ESSID:"FRIENDLY-ARM"
ESSID:"NETGEAR"
ESSID:"TP-LINK"
[root@FriendlyARM /]#
(4)选摘要毗连的无线收集
[root@FriendlyARM /]# iwconfig eth1 essid
"TP-LINK(LILLIPUT)"
(5)输进该网络的平安暗码
[root@FriendlyARM /]# iwconfig eth1 key 1234506789
(6)毗邻到指定的AP(无线路由)
[root@FriendlyARM /]# iwconfig eth1 ap auto
(7)设置无线网卡的IP 地点
[root@FriendlyARM /]# ifconfig eth1 192.168.1.120
(8)利用ping 饬令检测无线网连通状态
[root@FriendlyARM /]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=42.804 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=5.020 ms
LINUX下只用挨route就能够看到网关了(必需是root用户):
[root@oracle11g ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.232.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.232.1 0.0.0.0 UG 0 0 0 eth0
[root@oracle11g ~]#
===========================================
netstat -nr也能够看:
[root@oracle11g ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.232.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.232.1 0.0.0.0 UG 0 0 0 eth0
[root@oracle11g ~]#
============================================
翻开New Terminal,进进号令止停止设置:
ifconfig eth0 192.168.10.50 netmask 255.255.255.0
============================================
[root@oracle11g ~]# ifconfig eth1 192.168.1.3 netmask
255.255.255.0
[root@oracle11g ~]#
============================================
route add default gw 192.168.1.1
============================================
[root@oracle11g ~]# route add default gw 192.168.232.1
SIOCADDRT: File exists
[root@oracle11g ~]#
============================================
这时候我的电脑能经由过程网闭拜候内部internet可是听说以上的设置只是寄存正在内存中,以是每次重启的时辰又要再去一遍。
=============
1、能够把它放在/etc/rc.d/init.d/rc.local文件中
ifconfig eth0 192.168.10.50 netmask 255.255.0.0
route add default gw 192.168.1.1
2、设置网卡的设置装备摆设文件
建立或点窜此文件/etc/sysconfig/network-scripts/ifcfg-eth0#ifcfg-et
h0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.10.255
IPADDR=192.168.10.50
NETMASK=255.255.255.0
NETWORK=192.168.10.0
分享:
喜欢
0
赠金笔
加载中,请稍候......
评论加载中,请稍候...
发评论
登录名: 密码: 找回密码 注册记住登录状态
昵 称:
评论并转载此博文
发评论
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。