We need Linux to know about the bridge. First tell it that we want one virtual 
ethernet bridge interface: (this is to be executed on host bridge, of course. 
See 
Testing grounds)
root@bridge:~> brctl addbr br0
        
root@bridge:~> brctl stp br0 off
        
br0. 
root@bridge:~> brctl addif br0 eth0
root@bridge:~> brctl addif br0 eth1
        
root@bridge:~> ifconfig eth0 down
root@bridge:~> ifconfig eth1 down
root@bridge:~> ifconfig eth0 0.0.0.0 up
root@bridge:~> ifconfig eth1 0.0.0.0 up
        
We tell Linux the new (logical) interface and associate one single IP with it:
root@bridge:~> ifconfig br0 10.0.3.129 up
        
In case we are configuring a gateway we enable the forwarding in the linux kernel.
root@bridge:~> echo "1" > /proc/sys/net/ipv4/ip_forward
        
root@bridge:~> route add default gw 10.0.3.129
        
| Закладки на сайте Проследить за страницей | Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |