ubuntu-server14.04 网络配置
一.启动网卡
ubuntu server 安装后,ifconfig 发现只有一个lo 和一个p1p1 网卡,
先查看服务器网卡:ifconfig -a ,发现有lo ,p1p1,p2p1,p3p1,p4p1
要启动其他网卡,可以通过
ifconfig p2p1 up #启动p2p1网卡
二.配置网卡
如果需要把网卡配置为指定ip的,
首先
- vi /etc/network/interfaces
添加网卡p2p1,p3p1,p4p1
- # 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
- # The primary network interface
- auto p1p1
- iface p1p1 inet dhcp
- iface p2p1 inet dhcp
- iface p3p1 inet dhcp
- iface p4p1 inet dhcp
示例:
address 127.127.127.127
netmask 255.255.255.0
gateway 127.127.127.254
配置:
ifconfig em1 127.127.127.127 netmask 255.255.255.0
route add default gw 127.127.127.254 #添加网关
#重启网卡
/etc/init.d/networking restart
ifconfig em1 down
ifconfig em1 up
ifconfig #查看
service networking restart #不用sudo
参考:https://blog.csdn.net/lingbofeiyun/article/details/51566799
ubuntu-server14.04 网络配置的更多相关文章
- ubuntu 16.04 网络配置之虚拟网卡的配置
关于图形界面的配置,我这里就不多介绍了,这个很简单.这里介绍的是如何通过修改配置文件来实现虚拟网卡. 首先介绍ubuntu(我这里使用的是ubuntu-16.04)下虚拟网卡的配置 1.先用ifcon ...
- ubuntu 12.04网络配置之设置静态iP
step: 1.输入命令: sudo vi /etc/network/interfaces 看到如下内容: 2.追加以下内容: iface eth0 inet static address 192.1 ...
- 沉淀,再出发——在Ubuntu Kylin15.04中配置Hadoop单机/伪分布式系统经验分享
在Ubuntu Kylin15.04中配置Hadoop单机/伪分布式系统经验分享 一.工作准备 首先,明确工作的重心,在Ubuntu Kylin15.04中配置Hadoop集群,这里我是用的双系统中的 ...
- Ubuntu 14.04 虚拟机配置固定ip地址
Ubuntu 14.04 虚拟机配置固定ip地址: 虚拟机用的NAT方式配置: 1.虚拟机: 虚拟机→设置→网络适配器→NAT模式: 2.虚拟机:编辑→虚拟网络编辑器→更改设置→选择NAT→填入子网I ...
- Ubuntu 16.04 Bridge配置
Ubuntu 16.04 Bridge配置 一.安装网桥拓展包 bridge-utils root@ubuntu:~# apt-get install bridge-utils 二.创建网桥设备 // ...
- 在Ubuntu Server14.04上编译Android6.0源码
此前编译过Android4.4的源码,但是现在Android都到了7.0的版本,不禁让我感叹Google的步伐真心难跟上,趁这周周末时间比较充裕,于是在过去的24小时里,毅然花了9个小时编译了一把An ...
- Ubuntu 12.04 64bit 配置完android 5.0编译环境后出现“could not write bytes: Broken pipe.”而无法进入输入帐号密码的登陆界面
Ubuntu 12.04 64bit 配置完android 5.0编译环境后出现“could not write bytes: Broken pipe.”而无法进入输入帐号密码的登陆界面.上网问了问百 ...
- Ubuntu 18.04 下配置 HAXM 加速 Android模拟器
Ubuntu 18.04 下配置 HAXM 加速 Android模拟器 最近在vmware环境下搭建ubuntu18.04开发环境,开始发现总是运行android模拟器在console提示加载如下错误 ...
- Ubuntu 16.04修改配置静态IP和DNS
Ubuntu 16.04修改配置静态IP和DNS 1.修改interfaces 文件 sudo gedit /etc/network/interfaces 2.添加 例如: auto enp0s25 ...
- [eShopOnContainers 学习系列] - 03 - 在远程 Ubuntu 16.04 上配置开发环境
直接把 md 粘出来了,博客园的富文本编辑器换成 markdown,没啥效果呀 ,先凑合吧.实在不行换地方 # 在远程 Ubuntu 16.04 上配置开发环境 ## 零.因 为什么要用这么麻烦的 ...
随机推荐
- PAT 1070 Mooncake[一般]
1070 Mooncake (25)(25 分) Mooncake is a Chinese bakery product traditionally eaten during the Mid-Aut ...
- [LeetCode] 182. Duplicate Emails_Easy tag: SQL
Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Emai ...
- 集成树模型使用自动搜索模块GridSearchCV,stacking
一. GridSearchCV参数介绍 导入模块: from sklearn.model_selection import GridSearchCV GridSearchCV 称为网格搜索交叉验证调参 ...
- 正态分布及3Sigma原理
针对这个问题,用一两句话是难以说清楚的,这是数理统计学的内容,当质量特性呈正态分布时(实际上,当样本足够大时,二项分布.泊松分布等均趋近于正态分布),3Sigma水平代表了99.73%的合格率
- jmeter Bean Shell的使用(一)
未经作者允许,禁止转载!!! Jmeter有哪些Bean Shell 定时器: BeanShell Timer 前置处理器:BeanShell PreProcessor 采样器: BeanShell ...
- 浅谈Android View滑动和弹性滑动
引言 View的滑动这一块在实际开发中是非常重要的,无论是优秀的用户体验还是自定义控件都是需要对这一块了解的,我们今天来谈一下View的滑动. View的滑动 View滑动功能主要可以使用3种方式来实 ...
- n的二进制中有几个1
实例十七:n的二进制中有几个1 方法:result=n & (n-1) n&(n-1)的目的使最低位的1不断翻转. 比如:n=108,其二进制表示为0110 1100,则n& ...
- linux 判断文件最后更新时间 实现监控日志是否有输出功能
linux 判断文件最后更新时间 实现监控日志是否有输出功能. 需求:监控log.txt日志文件,超过一分钟没输出内容就认为是停了,则自动启动程序. 用stat 可以看文件的更新时间stat -c % ...
- 利用构造函数对canvas里面矩形与扇形的绘制进行一个封装
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- AtCoder Beginner Contest 086 D - Checker
Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement AtCoDeer is thinking o ...