openstack之kvm创建网桥
一、创建网桥# cd /etc/sysconfig/network-scripts/
# cp ifcfg-eno16777736 ifcfg-eno16777736.bak
# ls
ifcfg-br0
ifcfg-eno16777736
ifcfg-eno16777736.bak
#把ifcfg-eno16777736 拆成两个配置文件
# cat ifcfg-br0
BOOTPROTO="static"
DEVICE="br0"
TYPE="Bridge"
NM_CONTROLLED="no"
IPADDR="192.168.30.131"
NETMASK=255.255.255.0
GATEWAY="192.168.30.2"
DNS1="8.8.8.8"
DNS2="114.114.114.114"
# cat ifcfg-eno16777736
NAME="eno16777736"
UUID="984116df-9203-4c1e-95f2-5cd26ca11684"
BOOTPROTO="none"
DEVICE="eno16777736"
NM_CONTROLLED="no"
ONBOOT="yes"
BRIDGE="br0"
#重启服务
systemctl stop NetworkManager
systemctl disable NetworkManager
service network restart
#查看IP
# ifconfig
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu 1500
inet 192.168.30.131netmask 255.255.255.0broadcast 192.168.30.255
inet6 fe80::20c:29ff:fe5c:1056prefixlen 64scopeid 0x20<link>
ether 00:0c:29:5c:10:56txqueuelen 0(Ethernet)
RX packets 421244bytes 1425530148 (1.3 GiB)
RX errors 0dropped 0overruns 0frame 0
TX packets 238186bytes 19220935 (18.3 MiB)
TX errors 0dropped 0 overruns 0carrier 0collisions 0
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu 1500
inet6 fe80::20c:29ff:fe5c:1056prefixlen 64scopeid 0x20<link>
ether 00:0c:29:5c:10:56txqueuelen 1000(Ethernet)
RX packets 1208601bytes 1747719827 (1.6 GiB)
RX errors 0dropped 0overruns 0frame 0
TX packets 321609bytes 27120011 (25.8 MiB)
TX errors 0dropped 0 overruns 0carrier 0collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING>mtu 65536
inet 127.0.0.1netmask 255.0.0.0
inet6 ::1prefixlen 128scopeid 0x10<host>
looptxqueuelen 0(Local Loopback)
RX packets 0bytes 0 (0.0 B)
RX errors 0dropped 0overruns 0frame 0
TX packets 0bytes 0 (0.0 B)
TX errors 0dropped 0 overruns 0carrier 0collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST>mtu 1500
inet 192.168.122.1netmask 255.255.255.0broadcast 192.168.122.255
ether 52:54:00:49:15:64txqueuelen 0(Ethernet)
RX packets 0bytes 0 (0.0 B)
RX errors 0dropped 0overruns 0frame 0
TX packets 0bytes 0 (0.0 B)
TX errors 0dropped 0 overruns 0carrier 0collisions 0
vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu 1500
inet6 fe80::fc54:ff:fe17:c819prefixlen 64scopeid 0x20<link>
ether fe:54:00:17:c8:19txqueuelen 500(Ethernet)
RX packets 0bytes 0 (0.0 B)
RX errors 0dropped 0overruns 0frame 0
TX packets 0bytes 0 (0.0 B)
TX errors 0dropped 0 overruns 0carrier 0collisions 0
vnet1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>mtu 1500
inet6 fe80::fc54:ff:fe47:fee8prefixlen 64scopeid 0x20<link>
ether fe:54:00:47:fe:e8txqueuelen 500(Ethernet)
RX packets 0bytes 0 (0.0 B)
RX errors 0dropped 0overruns 0frame 0
TX packets 0bytes 0 (0.0 B)
页:
[1]