Ubuntu 14.04 静态IP设置
2015-08-31 22:09
253 查看
1. 编辑/etc/network/interfaces
vim /etc/network/interfaces
2.将以下五项添加到/etc/network/interfaces中
Static declaration (using <interface> chosen above): iface <interface> inet static
Static IP address: address <chosen ip>
Network gateway: gateway <gateway ip>
Netmask / subnet: netmask <netmask ip>
DNS nameservers: dns-nameservers <dns ip’s>
3. 修改后文件如下
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
# The primary network interface
iface eth0 inet static
address 192.168.1.8
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 223.5.5.5 223.6.6.6
4. 重启网络服务
service networking restart
vim /etc/network/interfaces
2.将以下五项添加到/etc/network/interfaces中
Static declaration (using <interface> chosen above): iface <interface> inet static
Static IP address: address <chosen ip>
Network gateway: gateway <gateway ip>
Netmask / subnet: netmask <netmask ip>
DNS nameservers: dns-nameservers <dns ip’s>
3. 修改后文件如下
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
# The primary network interface
iface eth0 inet static
address 192.168.1.8
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 223.5.5.5 223.6.6.6
4. 重启网络服务
service networking restart
相关文章推荐
- 运载符重载
- 搭建聊天的界面、输入图片和文本
- 入学感想与未来规划
- 关于TCP/IP协议栈(转)
- 由100盏灯想到的(一)
- Copy List with Random Pointer——技巧
- Dmaven.multiModuleProjectDirectory system propery is not set.
- php设计模式下
- 今日头条核心技术“个性推荐算法”揭秘
- 使用Mac自带Terminal(终端)修改Hosts详细图文教程
- Codeblocks 574D,DP
- RS485总线最多可以负载多少个设备
- 修复 Tween.JS 的 onStop 设置无效
- HTML5拖放API
- 网络编程
- 使用 Math 类操作数据
- Servlet中操作Oracle数据库
- hdoj 3820 Golden Eggs 【双二分图构造最小割模型】
- DesignPattern_Java:Composite Pattern
- /sys/class/gpio 文件接口操作IO端口(s3c2440)