安裝好Ubuntu7.10之後,可能要進行如下配置
ip命令行配置如下
sudo gedit /etc/network/interfaces
dhcp
dhcp配置如下(假設通過eth1上網)
# the primary network interface - use dhcp to find our address
auto eth1
iface eth1 inet dhcp //指定為dhcp
然後重啟
sudo /etc/init.d/networking restart
static ip
靜態ip地址配置如下(假設通過eth1上網)
# the primary network interface
auto eth1
iface eth1 inet static //指定為static
address 192.168.3.90 //ip地址
gateway 192.168.3.1 //網關
netmask 255.255.255.0 //子網掩碼
同樣需要重啟
sudo /etc/init.d/networking restart
dns
如果有必要,配置dns
sudo gedit /etc/resolv.conf
nameserver 192.168.3.2