[RHEL6] Creat Network Bridge Interface

rpm -qa | grep ‘bridge-utils’ 若沒有就安裝:

[shell]# yum install bridge-utils

設定 bridge interface:

[shell]# cd /etc/sysconfig/network-scripts
[shell]# vi ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
TYPE=Ethernet
HWADDR=b4:99:ba:fe:42:ce
IPV6INIT=no
ONBOOT=yes
USERCTL=no
BRIDGE=bridge0

[shell]# /etc/init.d/network restart

[shell]# vi ifcfg-bridge0
DEVICE=bridge0
TYPE=Bridge
BOOTPROTO=none
IPADDR=192.168.10.7
PREFIX=24
GATEWAY=192.168.10.254
ONBOOT=yes
USERCTL=no


[shell]# ifconfig
bridge0   Link encap:Ethernet  HWaddr B4:99:BA:FE:42:CE
          inet addr:192.168.10.7  Bcast:192.168.10.255  Mask:255.255.255.0
          inet6 addr: fe80::b699:baff:fefe:42ce/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41240 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27400 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2565151 (2.4 MiB)  TX bytes:53846085 (51.3 MiB)

eth0      Link encap:Ethernet  HWaddr B4:99:BA:FE:42:CE
          inet6 addr: fe80::b699:baff:fefe:42ce/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:3828108 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1705819 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2754530358 (2.5 GiB)  TX bytes:932407403 (889.2 MiB)
          Memory:fbe60000-fbe80000

From: http://www.techotopia.com/index.php/Creating_an_RHEL_6_KVM_Networked_Bridge_Interface

This entry was posted in 科技. Bookmark the permalink.