2 ethernetten bridge yapımı;
1. yum install bridge-utils
2. Ağ yapılandırması ayarlanır;
[root@oel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
NM_CONTROLLED=no
ONBOOT=yes
BRIDGE=br0
[root@oel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
NM_CONTROLLED=no
ONBOOT=yes
BRIDGE=br0
[root@oel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=static
IPADDR=10.254.254.54
NETMASK=255.255.255.0
GATEWAY=10.254.254.254
3. bridge içindeki trafiğin filter tarafından kontrol edilmemesi için;
sysctl.conf aşağıdaki satırları ilave ederiz;
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
Sistemi yeniden başlattıktan sonra kontrolü yaparız.
eth1
[root@oel5 ~]# ifconfig br0
br0 Link encap:Ethernet HWaddr 08:00:27:68:FA:9D
inet addr:10.254.254.54 Bcast:10.254.254.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe68:fa9d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6101222 errors:0 dropped:0 overruns:0 frame:0
TX packets:316283 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:711592934 (678.6 MiB) TX bytes:13302357 (12.6 MiB)
[root@oel5 ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.254.254.254 0.0.0.0 UG 0 0 0 br0
10.254.254.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br0
[root@oel5 ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.08002768fa9d no eth0
eth1
1. yum install bridge-utils
2. Ağ yapılandırması ayarlanır;
[root@oel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
NM_CONTROLLED=no
ONBOOT=yes
BRIDGE=br0
[root@oel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
NM_CONTROLLED=no
ONBOOT=yes
BRIDGE=br0
[root@oel5 ~]# cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=static
IPADDR=10.254.254.54
NETMASK=255.255.255.0
GATEWAY=10.254.254.254
3. bridge içindeki trafiğin filter tarafından kontrol edilmemesi için;
sysctl.conf aşağıdaki satırları ilave ederiz;
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
Sistemi yeniden başlattıktan sonra kontrolü yaparız.
eth1
[root@oel5 ~]# ifconfig br0
br0 Link encap:Ethernet HWaddr 08:00:27:68:FA:9D
inet addr:10.254.254.54 Bcast:10.254.254.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe68:fa9d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6101222 errors:0 dropped:0 overruns:0 frame:0
TX packets:316283 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:711592934 (678.6 MiB) TX bytes:13302357 (12.6 MiB)
[root@oel5 ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.254.254.254 0.0.0.0 UG 0 0 0 br0
10.254.254.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br0
[root@oel5 ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.08002768fa9d no eth0
eth1
Yorumlar
Yorum Gönder