KVM之网桥创建ubuntu 环境

KVM之网桥创建(ubuntu 环境)

1、创建网桥的目的是为了让KVM虚拟机连接到这个网桥,从而使虚拟机可以和物理网络通信
2、当然,安装完kvm后,会自动建立一个网桥virbr0,这个网桥应该是nat模式

一、DHCP网桥创建
vim /etc/network/interfaces

这是interfaces配置文件内容

#Thisfiledescribesthenetworkinterfacesavailableonyoursystem
#andhowtoactivatethem.Formoreinformation,seeinterfaces(5).

#Theloopbacknetworkinterface
autolo
ifaceloinetloopback

#Theprimarynetworkinterface
autoeth0
ifaceeth0inetdhcp物理网卡也为DHCP

autobr100
ifacebr100inetdhcp配置br100网桥为DHCP
bridge_portseth0配置br100建立在物理网卡eth0上
bridge_stpoff
bridge_fd


创建完成后,重启网络

静态网桥
vim /etc/network/interfaces

#Thisfiledescribesthenetworkinterfacesavailableonyoursystem
#andhowtoactivatethem.Formoreinformation,seeinterfaces(5).

#Theloopbacknetworkinterface
autolo
ifaceloinetloopback

#Theprimarynetworkinterface
autoeth0
ifaceeth0inetstatic
address192.168.89.3
gateway192.168.89.2
netmask255.255.255.0
network192.168.89.0
broadcast192.168.89.255

autobr100
ifacebr100inetstatic
bridge_portseth0
bridge_stpoff
bridge_fd0
bridge_maxwait0
address192.168.89.3
network192.168.89.0
netmask255.255.255.0
broadcast192.168.89.255
gateway192.168.89.2

创建完成后,重启网络

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...