set alternative router for VE through dhcp
I have ubuntu (8.10 with kernel from 8.04 supporting openv) box (HN) with 2 NIC: eth0 - ISP1, eth1 - LAN (192.168.7.1). It acts as simple NAT (iptables -A POSTROUTING -s 192.168.7.0/24 -j MASQUERADE), so ip_forward is enabled. On eth1 I created bridge (br0) to let VE see the network. Also this box acts as DHCP-server. On the other hand I have adsl-modem configured as router (192.168.7.3, ISP2). I'm trying to pass all traffic from some machines through ISP2. It is easily done by specifying "option routers 192.168.7.3;" in dhcpd.conf per machine. And it works fine with physical boxes, but not with VE (192.168.7.6). In VE I'm trying to add default route, but it has no effect - no packets are going through router: root@gretchin:/# ping ya.ru PING ya.ru (213.180.204.8) 56(84) bytes of data. --- ya.ru ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2007ms root@gretchin:/# traceroute ya.ru traceroute to ya.ru (213.180.204.8), 30 hops max, 40 byte packets 1 192.168.7.3 (192.168.7.3) 2.059 ms 2.693 ms 2.997 ms 2 * * * I'm sure that it isn't router's issue, cause doing such on HN helps: ip rule add from 192.168.7.6 table 6 ip route add default dev br0 via 192.168.7.3 table 6 But why it isn't running without adding routing rules on HN?
Re: set alternative router for VE through dhcp
May be I've missed something but here is my opinion. In spite of the fact that VE looks like a common physical server it has its own peculiarities. A record that looks like default via 192.168.7.3 dev eth0 on standalone physical server makes network packet pass through 192.168.7.3 and in our case the next hop would be adsl-modem. But in case of VE network packet always pass through HN. So, could you please confirm that VEs veth interface is united with eth1 into br0 on the HN?
I have these settings in /etc/network/interfaces: auto lo iface lo inet loopback #ISP1 auto eth0 iface eth0 inet dhcp #LAN (physical eth1) auto br0 iface br0 inet static address 192.168.7.1 netmask 255.255.255.0 bridge_ports eth1 And veth's are adding dynamically (as described in wiki - through vznet.conf). So "brctl show br0" displays bridge name bridge id STP enabled interfaces br0 8000.00024494a7ac no eth1 veth101.0
It doesn't clear from this output if br0 contains anything except eth1. Could you please also show tcpdump output while pinging from inside the VE (tcpdump output from HN and from VE).
Ok, 00:1c:f0:28:7b:3c belongs to adls-modem, doesn't it? And does 00:18:51:bb:fa:69 belong to veth101.0? Could you run tcpdump with "-e" parameter on all interfaces, i.e. on et1, br0, veth101.0 (on the HN) and on eth0 (inside VE, just in case)?