- 使用dhcp服务获取IP
- dhclient network_card_name
- ubuntu
auto eth0
iface eth0 inet dhcp
重启网络服务
sudo /etc/init.d/networking restart
---配置文件
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
---命令
ifconfig eth0 210.34.6.89 netmask 255.255.255.128 broadcast 210.34.6.127
route add default gw 172.18.255.253 dev eth2