linux配置网络配置
来源:互联网 发布:js concat函数 编辑:程序博客网 时间:2024/05/02 06:12
1.单网卡配单IP
vi /etc/network/interface
auto eth0
iface eth0 inet static
address IP
netmask 子网掩码
gateway 网关
2.单网卡双IP
vi /etc/network/interface
auto eth0:0
iface eth0:0 inet static
address IP
netmask 子网掩码
gateway 网关
auto eth0:1
iface eth0:1 inet static
address IP
netmask 子网掩码
gateway 网关
3.双网卡双IP
auto eth0
iface eth0 inet static
address IP
netmask 子网掩码
gateway 网关
auto eth1
iface eth1 inet static
address IP
netmask 子网掩码
gateway 网关
综上,配置后保存退出,一般需要重启下网卡才能设置生效,方法很多,
比如ifdown eth0 ,ifup eth0,最直接的方法直接在终端键入/etc/init.d/networking restart www.kissgz.com
至于DNS,都是一样的,如下 vi /etc/resolv.conf(实际系统默认的并不存在resolv.conf该文件,属于自己创建) nameserver 主DNS nameserver 后备DNS
0 0
- linux配置网络配置
- 网络 linux网络配置
- linux配置-网络配置
- linux网络配置基础
- Linux网络配置
- 手动配置linux网络
- linux 网络配置
- linux 网络配置
- Linux网络配置
- Linux网络环境配置
- LINUX网络配置
- Linux 网络配置ifconfig
- linux网络配置
- Linux 网络配置
- linux 网络配置
- redhat linux网络配置
- Linux配置网络
- linux-网络配置
- C++初始化和引用
- 字符串转换成整数
- Struts2 和spring整合的 Action层托管问题
- RQNOJ-PID39 / 饮食问题
- poj 1182 食物链 并查集
- linux配置网络配置
- 寻找她(指令寻址)——(软考六)
- Ubuntu apt-get install 问题: Could not resolve 'cn.archive.ubuntu.com'
- css相对定位,绝对定位,static定位
- OpenGL环境配置Win7-64位+freeglut+glew+VS2012
- iOS笔记—多线程基础
- Hadoop异常Task发现分析
- HTML学习7:常用标签之表格标签
- cf 16a Flag