Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th January 2012, 16:23
philippe_ philippe_ is offline
Junior Member
 
Join Date: Jan 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default No network from domU to outside dom0

Hello!

I have successfully installed xen and run a domU on a debian squeeze.

I have followed step by step the tutorial from Falko here. I can log in my domU by SSH but from the domU I can't connect to anything but the dom0 itself.

Can anyone help me to enable network from my domU to the ouside?

Here is my xend-config.sxp file:
Code:
root@namaka-xen:/etc/xen# grep -Evn "^#|^$" xend-config.sxp 
145:(network-script 'network-bridge')
176:(vif-script vif-bridge)
193:(dom0-min-mem 196)
197:(enable-dom0-ballooning yes)
207:(total_available_memory 0) 
211:(dom0-cpus 0)
226:(vncpasswd '')
root@namaka-xen:/etc/xen#
Here is my domU.cfg file:
Code:
root@dom0:/etc/xen# cat domU.cfg 
#
# Configuration file for the Xen instance domU, created
# by xen-tools 4.2 on Tue Jan 24 10:59:20 2012.
#

#
#  Kernel + memory size
#
kernel      = '/boot/vmlinuz-2.6.32-5-xen-686'
ramdisk     = '/boot/initrd.img-2.6.32-5-xen-686'

vcpus       = '1'
memory      = '128'

#
#  Disk device(s).
#
root        = '/dev/xvda2 ro'
disk        = [
                  'file:/data/xen/domains/domU.telergos.net/disk.img,xvda2,w',
                  'file:/data/xen/domains/domU.telergos.net/swap.img,xvda1,w',
              ]

#
#  Physical volumes
#

#
#  Hostname
#
name        = 'namaka-vm.telergos.net'

#
#  Networking
#
vif         = [ 'ip=172.23.154.105,mac=00:16:3E:04:8E:7A']

#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'
I don't have any xenbr when I run ifconfig:
only eth0, peth0, lo and vif1.0

When I run tshark -f '!port 22' I can see ARP requests when I try to ping others hosts than my dom0 but no answer. It looks like these ARP packets ar stuck in the dom0 host.

Here is iptables -L output:
Code:
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED PHYSDEV match --physdev-out vif1.0 
ACCEPT     udp  --  anywhere             anywhere            PHYSDEV match --physdev-in vif1.0 udp spt:bootpc dpt:bootps 
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED PHYSDEV match --physdev-out vif1.0 
ACCEPT     all  --  namaka-vm.telergos.net  anywhere            PHYSDEV match --physdev-in vif1.0
I am ways too newbie to fully understand this configuration, but it looks like it is applied at boot time.

I have thought that dom0 may not know what to do with domU packets, but do0 is supposed to act as a bridge! So, it should simply relay these packets on its eth0 interface, letting my switch relay them on the others hosts...

Thank you for your time and help!
Reply With Quote
Sponsored Links
  #2  
Old 25th January 2012, 16:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,702 Times in 2,545 Posts
Default

Did you specify the correct network settings (IP, netmask, gateway) when you created the VM?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th May 2012, 22:35
nzimas nzimas is offline
Member
 
Join Date: May 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a somewhat similar scenario here, although I can't even make it to the VM through SSH (I am having his issue with KVM too, btw)
My setup follows Falko's howto (the part concerning image based machines).

The physical host has only one physical NIC which holds the public IP, gateway and so forth.

Do I need a second physical NIC in order to create an internal network? I would think I don't, but at the same time I have this eerie feeling I do.

This is how the dm0 interfaces look like:
Quote:
eth0 Link encap:Ethernet HWaddr 00:25:90:71:32:46
inet addr:1.2.3.4 Bcast:1.2.3.255 Mask:255.255.255.0
inet6 addr: fe80::225:90ff:fe71:3246/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52309 errors:0 dropped:0 overruns:0 frame:0
TX packets:22818 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:65278789 (62.2 MiB) TX bytes:2054827 (1.9 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:544 errors:0 dropped:0 overruns:0 frame:0
TX packets:544 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100037 (97.6 KiB) TX bytes:100037 (97.6 KiB)

peth0 Link encap:Ethernet HWaddr 00:25:90:71:32:46
inet6 addr: fe80::225:90ff:fe71:3246/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:70923 errors:0 dropped:0 overruns:0 frame:0
TX packets:22848 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69135419 (65.9 MiB) TX bytes:2056603 (1.9 MiB)
Interrupt:16 Memory:fbce0000-fbd00000

vif1.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:19 errors:0 dropped:0 overruns:0 frame:0
TX packets:2228 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:692 (692.0 B) TX bytes:269251 (262.9 KiB)
This how the domU interface looks like
Quote:
eth0 Link encap:Ethernet HWaddr 00:16:3e:e8:61:97
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::216:3eff:fee8:6197/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2333 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:250251 (244.3 KiB) TX bytes:958 (958.0 B)
Interrupt:246

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:35 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3035 (2.9 KiB) TX bytes:3035 (2.9 KiB)
The gateway on dom0 and domU is not the same probably because I do not have a second NIC or a working virtual interface.

Networking is where I am stck in all my virtualization attempts
Reply With Quote
  #4  
Old 10th May 2012, 23:34
nzimas nzimas is offline
Member
 
Join Date: May 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In my case, looks like OVH itself is the roadblock.

Quote:
For security reasons, the network infrastructure at OVH doesn't allow the "bridging" configuration; this is, to connect the network interface of the VMs directly into the real network interface, which is the default operation mode in Xen.
Just great.
Reply With Quote
  #5  
Old 11th May 2012, 00:22
nzimas nzimas is offline
Member
 
Join Date: May 2007
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

NAT insteaed of bridge, of course.
All in all, I only want the guests to accessed from the host.
Reply With Quote
Reply

Bookmarks

Tags
networking, xen

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending mail ISPConfig 3 but not receivind catza Installation/Configuration 20 19th May 2010 12:47
Unable to connect to Mysql mbascombe Installation/Configuration 12 10th January 2010 22:46
pulseaudio from domU to dom0 ugach Technical 0 22nd October 2009 04:00
XEN network problem, domU's have no network connection Zeon Server Operation 2 8th October 2009 18:21
Perfect Xen 3.0 setup for Debian gurneyzap HOWTO-Related Questions 4 26th March 2006 11:30


All times are GMT +2. The time now is 20:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.