OpenVZ Forum


Home » General » Support » how to talk with...
Re: how to talk with... [message #39483 is a reply to message #39477] Fri, 30 April 2010 14:20 Go to previous messageGo to previous message
teekien is currently offline  teekien
Messages: 11
Registered: April 2010
Junior Member
Problem is, I can't talk with 172 subnetwork on the physical host machine, nevermind OpenVZ containers.

I can communicate with hosts through eth0 (ie: ping -I eth0 192.168.1.any_host is successful), but not communicate with hosts in subnet 172 on through eth1.

I don't want to route packets between these two subnets. All traffic should go to 192 (external through 192 default gateway) except when the destination is a 172 network.


eth0      Link encap:Ethernet  HWaddr 00:22:a7:2b:fc:f0  
          inet addr:192.168.1.50  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::217:a4ff:fe3b:fcf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33873975 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26973121 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3267024423 (21.1 GiB)  TX bytes:3234716554 (19.5 GiB)
          Interrupt:25 


eth1      Link encap:Ethernet  HWaddr 00:22:a7:1b:fa:e0  
          inet addr:172.168.1.40  Bcast:172.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::217:a4ff:fe3b:fcef/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:492 (492.0 B)
          Interrupt:26 

venet0 etc...




I added static route:

ip route add 172.168.1.0/24 dev eth1 proto kernel scope link src 172.168.1.40


Here is relevant part of routing table:


172.168.1.0      *               255.255.255.0   U     0      0        0 eth1
192.168.1.0    *               255.255.255.0   U     0      0        0 eth0
default         host.example.ca 0.0.0.0         UG    0      0        0 eth0



172.168.1.0/24 dev eth1  proto kernel  scope link  src 172.168.1.40 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.50
default via 192.168.1.50 dev eth0 


I can't ping any host connected to the 172 subnet.

Here is my /etc/network/interfaces:

#loopback
auto lo eth0 eth1
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
allow-hotplug eth1

iface eth0 inet static
	address 192.168.1.50
	netmask 255.255.255.0
	network 192.168.1.0
	gateway 192.168.1.1
	broadcast 192.168.1.255

iface eth1 inet static
	address 172.168.1.40
	netmask 255.255.255.0
	network 172.168.1.0
	broadcast 172.168.1.255


#no gateway for eth1 specified as I want all external traffic forwarded through eth0





restarted interface:

ifdown eth1
ifconfig eth1 172.168.1.40 netmask 255.255.255.0 up


The physical connection to the switch is fine. Before I can get to the containers I need to fix this problem.

I can ping the both local interfaces.


Any help please???

[Updated on: Fri, 30 April 2010 15:16]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Openvz froze on reboot after container migration
Next Topic: What are the losses of using the .26 Kernel included in apt-lenny
Goto Forum:
  


Current Time: Tue Aug 06 16:20:39 GMT 2024

Total time taken to generate the page: 0.03373 seconds