1. netcfg

netcfg   //查看ip情况

netcfg eth0 up dhcp   //通过dhcp 自动获取ip和网关

2. ifconfig

ifconfig eth0 128.224.156.81 up

ifconfig eth0 128.224.156.81 netmask 255.255.255.0 up

3. gateway 配置

route add default gw 192.168.0.1 dev eth0

4. dns 配置

echo "nameserver 128.224.160.11" > resolv.conf

nameserver 128.224.160.11


setprop net.dns1 128.224.160.11

setprop net.dns2 147.11.100.30

4. mac adddr
ifconfig eth0 hw ether 00:11:22:33:44:55
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐