Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程

Linux設置固定IP

日期:2017/1/20 17:37:45      編輯:Linux系統常見問題解答

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

IPADDR=192.168.0.116

NETMASK=255.255.0.0

GATEWAY=192.168.0.1

ONBOOT=yes

TYPE=Ethernet

重啟配置文件使之生效

# /etc/init.d/network restart

Shutting down interface eth0: [ OK ]

Shutting down loopback interface: [ OK ]

Setting network parameters: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: [ OK ]

Copyright © Windows教程網 All Rights Reserved