现在的位置: 首页 > 综合 > 正文

ubuntu ip设置

2012年07月09日 ⁄ 综合 ⁄ 共 242字 ⁄ 字号 评论关闭

2. 为网卡配置静态IP地址
编辑文件/etc/network/interfaces:
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.2.1
gateway 192.168.2.254
netmask 255.255.255.0
#network 192.168.2.0
#broadcast 192.168.2.255

抱歉!评论已关闭.