ARM Linux系统中的动态IP和静态IP地址怎么设置?
开发工作中,我们经常会有各种各样的需求,有人要动态ip,也有要静态ip的,其实方法很简单,下面分享下我的实现方法。
# vi /etc/network/interfaces
# interface file auto-generated by buildrootauto loiface lo inet loopback#eth0为静态ipauto eth0iface eth0 inet staticaddress 192.168.100.1netmask 255.255.255.0network 192.168.100.1broadcast 192.168.100.255#eth1为动态ipauto eth1iface eth1 inet dhcp
按照上面脚本修改即可实现,eth0为静态ip,eth1为动态ip。