Mar 22 2021

Archivos de Inicio de Bridges en Redhat/Ubuntu/Debian

Published by at 14:40 under Linux

Todos los sistemas requieren que el paquete bridge-utils se instale con yum o apt-get.

Redhat / Fedora

Modificar el archivo de inicio de las interfaces de red que se agregarán al bridge.

[root@redhat ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:C0:4F:44:41:8A
ONBOOT=yes
BRIDGE=br0


Y creer el archivo de configuración del bridge

[root@redhat ~]$ cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.100
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=no
ONBOOT=yes


Ubuntu

root@ubuntu:~$ cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

auto br0
iface br0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        pre-up ifconfig eth1 down
        pre-up brctl addbr br0
        pre-up brctl addif br0 eth0
        pre-up brctl addif br0 eth1
        pre-up ifconfig eth0 0.0.0.0
        pre-up ifconfig eth1 0.0.0.0
        post-down ifconfig eth0 down
        post-down ifconfig eth1 down
        post-down ifconfig br0 down
        post-down brctl delif br0 eth0
        post-down brctl delif br0 eth1
        post-down brctl delbr br0


Debian

root@debian:~$ cat /etc/network/interfaces
iface eth0 inet manual

iface eth1 inet manual

 # Bridge setup
 iface br0 inet static
        bridge_ports eth0 eth1
        address 192.168.0.100
        broadcast 192.168.0.255
        netmask 255.255.255.0
        gateway 192.168.0.1

No responses yet

Comments RSS

Leave a Reply