Bridge e networking problem [message #33561] |
Wed, 22 October 2008 09:03 |
giTogo
Messages: 1 Registered: September 2008 Location: Italy, Fermo
|
Junior Member |
|
|
Hi everyone,
My problem is the following script,
#!/bin/bash
#Start-script
VZCTL=/usr/local/sbin/vzctl
IFCONFIG=/sbin/ifconfig
IPTABLES=/usr/sbin/iptables
BRCTL=/sbin/brctl
#
ETH0=eth0
ETH1=eth1
ETH1_1=eth1:1
#
#
BR0=br0
BR1=br1
#
VETH0=0
VETH1=1
VETH2=2
VETH3=3
$BRCTL addbr $BR0
$BRCTL addbr $BR1
#
$IFCONFIG $ETH0 0
$IFCONFIG $ETH1 0
#
$BRCTL addif $BR0 $ETH0
$BRCTL addif $BR1 $ETH1
#
$IFCONFIG $BR0 172.16.250.1 netmask 255.255.224.0
$IFCONFIG $BR1 172.16.250.2 netmask 255.255.224.0
$IPTABLES -F
$IPTABLES -P INPUT DROP
$IPTABLES -P FORWARD DROP
#
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
#
$IPTABLES -I INPUT -j ACCEPT -i lo
$IPTABLES -I INPUT -j ACCEPT -i $BR0
$IPTABLES -I INPUT -j ACCEPT -i $BR1
#
$IPTABLES -I INPUT -j ACCEPT -i $ETH0
$IPTABLES -I INPUT -j ACCEPT -i $ETH1
#
$IPTABLES -A FORWARD -o $BR0
$IPTABLES -A FORWARD -o $BR1
#
$IPTABLES -A FORWARD -o $ETH0
$IPTABLES -A FORWARD -o $ETH1
$IPTABLES -A FORWARD -d 255.255.255.255 -j ACCEPT
#
$IPTABLES -t nat -A POSTROUTING -j MASQUERADE
#
echo "Start CT 101"
#
$VZCTL start 101
$VZCTL set 101 --netif_add $ETH1
#
$VZCTL exec 101 $IFCONFIG $ETH1 172.16.1.1 netmask 255.255.224.0
$BRCTL addif $BR1 veth101.$VETH1
$VZCTL exec 101 $IFCONFIG $ETH1_1 172.16.65.1 netmask 255.255.224.0
$VZCTL exec 101 ip route add default via 172.16.65.254 dev $ETH1
#
echo "Start CT 102"
#
$VZCTL start 102
$VZCTL set 102 --netif_add $ETH0
$VZCTL set 102 --netif_add $ETH1
#
$VZCTL exec 102 $IFCONFIG $ETH0 XXX.XXX.XXX.2 netmask 255.255.255.0
$BRCTL addif $BR0 veth102.$VETH0
$VZCTL exec 102 $IFCONFIG $ETH1 172.16.65.254 netmask 255.255.224.0
$BRCTL addif $BR1 veth102.$VETH1
$VZCTL exec 102 ip route add default via XXX.XXX.XXX.1 dev $ETH0
#
echo "Start CT 103"
$VZCTL start 103
$VZCTL set 103 --netif_add $ETH1
#
$VZCTL exec 103 $IFCONFIG $ETH1 172.16.2.1 netmask 255.255.224.0
$BRCTL addif $BR1 veth103.$VETH1
$VZCTL exec 103 ip route add default via 172.16.1.1 dev $ETH1
#End-Script
with GNU/Linux Slackware 12.0 and kernel 2.6.18.ovz028stab053.5 all interfaces ping fully, with GNU/Linux Slackware 12.1 with kernel 2.6.24.ovz005.1 any interfaces don't ping, I have not modified any program in Slack 12.0 and Slack 12.1, it's all standard.
After a ping 172.16.1.1 executed in CT 103 without response,
I ran the command arp -v and the output data (IP and MAC) is correct and command tcpdump in CT 101 show the arp request with response.
How can I solve the problem?
Thank you in advance for helping me.
giTogo
|
|
|