AR8033 PHY芯片
1 ip link show | grep -i "eth"
1 cat <<EOF >> /etc/network/interfaces 2 allow-hotplug eth0 3 auto eth0 4 iface eth0 inet dhcp //动态IP模式 5 6 EOF
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
1 cat <<EOF > /etc/resolv.conf //interfaces配置文件的优先级大于此文件,配置静态IP时设置DNS会让此文件失效 2 nameserver 8.8.8.8 //主DNS 3 nameserver 114.114.114.114 //副DNS 4 5 EOF
1 sudo apt install dnsutils 2 nslookup www.baidu.com //主机设置的DNS为8.8.8.8