Hello again, I bit moved forward in solving my problem, but still need help. Recapitulation first.
I've two network cards, first is connected to 195.113.233.0/24 network: > auto eth0 > iface eth0 inet static > address 195.113.233.254 > netmask 255.255.255.0 > network 195.113.233.0 > broadcast 195.113.233.255 > gateway 195.113.233.1 Second is connected to 195.113.187.0/26 network: > iface eth1 inet static > address 195.113.187.37 > netmask 255.255.255.192 > network 195.113.187.0 > broadcast 195.113.187.63 > post-up /etc/network/post-up-eth1 > post-down /etc/network/post-down-eth1 Everything is in this setup working, except of comunication between VE systems using eth1 and eth0. Ping from VE (195.113.187.33) using eth1 to system using eth0 (195.113.233.253): ermon:~# ping 195.113.233.253 PING 195.113.233.253 (195.113.233.253) 56(84) bytes of data. From 195.113.187.37 icmp_seq=1 Time to live exceeded From 195.113.187.37 icmp_seq=2 Time to live exceeded Pinging to everywhere else is ok. I discovered that I have to add route for network 195.113.233.0/24 to be routed to eth1 and GW 195.113.187.1 default is to eth0, which sends that TTL exceeded error. But after setting that route, I'm still not able reach boxes using 195.113.233.0/24 on local eth0 interface. For this I've setup route via venet0 interface. File "/etc/network/post-up-eth1": #!/bin/bash ip rule add from 195.113.187.33 table 6 ip rule add from 195.113.187.35 table 6 ip route add default dev eth1 via 195.113.187.1 table 6 ip route add 195.113.233.0/24 dev eth1 via 195.113.187.1 table 6 ip route add 195.113.233.252 dev venet0 table 6 ip route add 195.113.233.253 dev venet0 table 6 # Ignore any error of above commands exit 0; File "/etc/network/post-down-eth1": #!/bin/bash ip rule delete from 195.113.187.33 table 6 ip rule delete from 195.113.187.35 table 6 ip route delete 195.113.233.252 dev venet0 table 6 ip route delete 195.113.233.253 dev venet0 table 6 # Ignore any error of above commands exit 0; chlivek:~# ip rule 0: from all lookup 255 32764: from 195.113.187.35 lookup 6 32765: from 195.113.187.33 lookup 6 32766: from all lookup main 32767: from all lookup default chlivek:~# ip route 195.113.187.33 dev venet0 scope link src 195.113.233.254 192.168.1.2 dev venet0 scope link src 195.113.233.254 195.113.233.253 dev venet0 scope link src 195.113.187.37 195.113.233.252 dev venet0 scope link src 195.113.233.254 195.113.187.0/26 dev eth1 proto kernel scope link src 195.113.187.37 195.113.233.0/24 dev eth0 proto kernel scope link src 195.113.233.254 default via 195.113.233.1 dev eth0 chlivek:~# ip route show table 6 195.113.233.253 dev venet0 scope link 195.113.233.252 dev venet0 scope link 195.113.233.0/24 via 195.113.187.1 dev eth1 default via 195.113.187.1 dev eth1 It seams to work but it is bit complicated. If anyone know simpler way please tell me. Best regards -- ----------------------- Jan Tomasek aka Semik http://www.tomasek.cz/
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Users mailing list [email protected] https://openvz.org/mailman/listinfo/users
