Ubuntu 16.04 Bridge配置
Ubuntu 16.04 Bridge配置
一、安装网桥拓展包 bridge-utils
root@ubuntu:~# apt-get install bridge-utils
二、创建网桥设备
//安装网桥拓展包会安装 brctl 命令,使用该命令创建网桥设备
root@ubuntu:~# brctl addbr br1 # br1是网桥设备名,类似网卡名称;也可以创建多个网桥设备
//可以在 /proc/sys/net/ipv4/conf/ 目录下查看创建的和已经存在的网卡设备文件
root@ubuntu:~# ls /proc/sys/net/ipv4/conf/
all br0 default eth0 eth1 eth2 eth3 eth4 lo # br0 就是刚刚创建的网桥名称
三、配置 bridge-utils
root@ubuntu:~# vim /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto eth1
iface eth1 inet manual
auto eth2
iface wth2 inet manual
auto eth3
iface eth3 inet manual
auto br0
iface br0 inet static
address 192.168.121.24
netmask 255.255.255.0
gateway 211.91.165.129
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto br1
iface br1 inet manual
bridge_ports eth1
bridge_stp off
bridge_fd 0
auto br2
iface br2 inet manual
bridge_ports eth2
bridge_stp off
bridge_fd 0
auto br3
iface br3 inet manual
bridge_ports eth3
bridge_stp off
bridge_fd 0
- 也可以配置动态(dhcp)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto eth1
iface eth1 inet manual
auto eth2
iface wth2 inet manual
auto eth3
iface eth3 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_ports eth1
bridge_ports eth2
bridge_ports eth3
bridge_stp off
bridge_fd 0
四、开启路由转发
//网桥设置好后,需要设置路由转发功能
root@ubuntu:~# /etc/sysctl.conf
......
net.ipv4.ip_forward=1 # 添加或者去掉注释这一行
......
//让转发路由生效
root@ubuntu:~# sysctl -p
五、重启网络服务
root@ubuntu:~# systemctl restart networking.service
Ubuntu 16.04 Bridge配置的更多相关文章
- 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 上配置开发环境 ## 零.因 为什么要用这么麻烦的 ...
- 【转】Ubuntu 16.04安装配置TensorFlow GPU版本
之前摸爬滚打总是各种坑,今天参考这篇文章终于解决了,甚是鸡冻\(≧▽≦)/,电脑不知道怎么的,安装不了16.04,就安装15.10再升级到16.04 requirements: Ubuntu 16.0 ...
- Ubuntu 16.04 LTS 配置 Jupyter notebook 为服务器
原材料: Ubuntu 16.04 LTS 64bit 已经配置好 IPython 和 Jupyter (安装步骤可以参照:http://www.cnblogs.com/McKean/p/619497 ...
- Ubuntu 16.04下配置 Nginx 与 Node.js 以及服务的部署
第一步:安装nginx sudo apt-get update sudo apt-get install nginx 如果遇到依赖问题,尝试执行sudo apt-get -f install命令 第二 ...
- VMware 15安装Ubuntu 16.04并配置环境
VMware(虚拟机)是指通过软件模拟的具有完整硬件系统功能的.运行在一个完全隔离环境中的完整计算机系统,它能在Windows系统上虚拟出多个计算机,每个虚拟计算机可以独立运行,可安装各种软件与应用等 ...
- Ubuntu 16.04 orb-slam2配置
说明:Ubuntu 16.04以及必要的基础软件安装完成之后进行: 1.OpenNI2安装(可选) 安装依赖项: sudo apt--dev freeglut3-dev doxygen graphvi ...
- Ubuntu 16.04简单配置备忘录
1.几个安装包的地址 1.Linux QQ:https://im.qq.com/linuxqq/index.html 2.网易云音乐:http://s1.music.126.net/download/ ...
- Ubuntu 16.04 安装配置支持http2的nginx
第一步 安装最新版本的nginx 对于ubuntu16.04而言 直接装就是最新的 ``` sudo apt-get update sudo apt-get install nginx 查看Nginx ...
随机推荐
- 第25 章 : Kubernetes 网络模型进阶
Kubernetes 网络模型进阶 本文将主要分享以下五个方面的内容: Kubernetes 网络模型来龙去脉 Pod 究竟如何上网? Service 究竟怎么工作? 啥?负载均衡还分内部外部? 思考 ...
- 201871030116-李小龙 实验三 结对项目—《D{0-1}KP 实例数据集算法实验平台》项目报告
项目 内容 课程班级博客链接 https://edu.cnblogs.com/campus/xbsf/2018CST 这个作业要求链接 https://www.cnblogs.com/nwnu-dai ...
- Leedcode算法专题训练(链表)
1.发现两个链表的交点 160.两个链表的交集(容易) Leetcode /力扣 public class Solution { public ListNode getIntersectionNode ...
- joda-time的简单使用及mysql时间函数的使用(今天,本周,本月)
近期在做一些首页的统计数据复习了下mysql的时间函数,以及后续修改成 传入时间查询时使用的joda-time 软件简介 JodaTime 提供了一组Java类包用于处理包括ISO8601标准在内的d ...
- ElementPlusViteStarterPnpm版本
1 起因 由于最近Vite升级了2.x版本,项目中需要改动的东西有点多,本来想基于官方给出的starter重做,但是又看到了一个叫pnpm的仓库,构建速度会比原生npm/yarn快两倍以上: 因此模仿 ...
- Go-31-杂序
标识符: 在go语言里,标识符要么从包里公开,要么不从包里公开. 当代码导入一个包时,程序可以直接访问这个包中任意一个公开的标识符.这些标识符以大写字母开头.以小写字母开头的标识符是不公开的,不能被其 ...
- python进阶(16)深入了解GIL锁(最详细)
前言 python的使用者都知道Cpython解释器有一个弊端,真正执行时同一时间只会有一个线程执行,这是由于设计者当初设计的一个缺陷,里面有个叫GIL锁的,但他到底是什么?我们只知道因为他导致pyt ...
- 004-Java中的运算符
@ 目录 一.运算符 一.分类 二.算数运算符 三.关系运算符 四.逻辑运算符 五.赋值运算符 六.条件运算符(三目运算符) 七.+运算符 一.运算符 一.分类 二.算数运算符 加 $+$ 减 $ ...
- The Dole Queue UVA - 133
In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros ...
- 进击中的Vue 3——“电动车电池范围计算器”开源项目
转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具.解决方案和服务,赋能开发者. 原文参考:https://dzone.com/articles/build-a-tesla-battery- ...