模板:Ethernet

来自ARM Wiki
跳转至: 导航搜索
  • 硬件
  • 默认网卡硬件为
    AR8033 PHY芯片
  • 若为双网卡板卡,则另一个芯片为RTL8211F
  • 查看设备
  • 查看所有设备列表
1 ip link show | grep -i "eth"
网卡设备
  • 使用
  • 动态IP
1 cat <<EOF >> /etc/network/interfaces
2 allow-hotplug eth0
3 auto eth0
4 iface eth0 inet dhcp              //动态IP模式
5 
6 EOF
动态IP
  • 静态IP
 1 cat <<EOF >> /etc/network/interfaces
 2 allow-hotplug eth0
 3 auto eth0
 4 iface eth0 inet static            //静态IP模式
 5 address 192.168.8.55              //静态IP地址
 6 netmask 255.255.255.0             //子网掩码
 7 gateway 192.168.8.1               //网关
 8 dns-nameservers 202.96.134.133    //DNS域名服务器
 9 
10 EOF
静态IP
  • DNS设置
1 cat <<EOF > /etc/resolv.conf      //临时修改DNS,此文件内容可能被覆盖
2 nameserver 8.8.8.8                //主DNS
3 nameserver 114.114.114.114        //副DNS
4 
5 EOF
  • 推荐方式,参考配置静态ip部分,将DNS写入到/etc/network/interfaces配置文档中