2 replies [Last post]
jpritikin (Offline)
nc not forwarding to xen instances
Posted: Mon, 02/08/2010 - 15:58

Eucalyptus version: 1.6.1 from
deb http://www.eucalyptussoftware.com/downloads/repo/eucalyptus/1.6.1/ubuntu jaunty universe
Ubuntu jaunty with debian kernel 2.6.26-2-xen-amd64
Topology: 2 hosts on the same private network with DHCP assigned addresses
Networking mode = SYSTEM

On both machines, after I installed Xen, I disabled Xen's network-bridge script per http://wiki.libvirt.org/page/Networking and change my /etc/network/interfaces to:

auto br0
iface br0 inet dhcp
bridge_ports eth0

Xen is set for bridging:

root@squiggy:~# grep vif-script /etc/xen/xend-config.sxp
(vif-script vif-bridge)

I started an instance. xm list:

root@squiggy:~# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 3445 2 r----- 588.8
i-47250846 3 512 2 -b---- 4.8

root@squiggy:~# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.00e0813283b2 no eth0
vif3.0
virbr0 8000.000000000000 yes

root@squiggy:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere PHYSDEV match --physdev-in vif3.0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

In the jaunty domU image, I added "post-up ping 10.1.1.96" in /etc/network/interfaces to notify the cloud controller of the instance's IP address. This worked.

I can ssh into the instance from the host it is running on. E.g.,
root@squiggy:~# ssh -i /home/joshua/id_euca_joshua root@10.1.1.206

IPv4 forwarding is enabled:

root@squiggy:~# cat /proc/sys/net/ipv4/ip_forward
1

I can ping dom0 from the domU:

root@ubuntu:~# ping 10.1.1.97
PING 10.1.1.97 (10.1.1.97) 56(84) bytes of data.
64 bytes from 10.1.1.97: icmp_seq=1 ttl=64 time=0.101 ms

I can ping the domU from the dom0:

root@squiggy:~# ping 10.1.1.206
PING 10.1.1.206 (10.1.1.206) 56(84) bytes of data.
64 bytes from 10.1.1.206: icmp_seq=1 ttl=64 time=0.136 ms

However, I can't ping the instance from the cloud controller, and I can't ping the cloud controller from the instance. I don't understand how the cloud controller got the instance's IP address. It looks as if IP forwarding is disabled, but it's not.

Any ideas? Was it a mistake to disable Xen's network-bridge script?

jpritikin (Offline)
solved
Posted: Thu, 02/11/2010 - 10:44

In the euca config, I set the VNET_PUBINTERFACE and VNET_PRIVINTERFACE to the physical interface (not the bridge). This seemed to have solved it. I'm not sure though because I also reverted back to the xen way of naming interfaces. Anyway, I'm happy to have it working.

graziano (Offline)
Hello, glad you have it
Posted: Thu, 02/11/2010 - 11:16

Hello,

glad you have it working now and thanks for reporting back. You also may want to read our documentation on how to configure the network for eucalyptus (we also have some document on how to configure xen): the document you mentioned is to configure the network for libvirt not eucalyptus.

cheers
graziano