Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 9th April 2010, 14:54
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Mark_NL View Post
Code:
sham:/etc/xen# grep -v '#' xend-config.sxp
(network-script 'network-bridge netdev=eth0')
(vif-script vif-bridge)
(dom0-min-mem 196)
(dom0-cpus 0)
(vncpasswd '')
Code:
sham:/etc/xen# cat myvm
kernel      = '/boot/vmlinuz-2.6.26-2-xen-686'
ramdisk     = '/boot/initrd.img-2.6.26-2-xen-686'
memory      = '4096'
root        = '/dev/hda1 ro'
disk        = [
		'phy:/dev/drbd0,hda1,w',
		'file:/swapfiles/myvm.swp,hda2,w',
	      ]
name        = 'myvm.domain.tld'
vif         = [ 'ip=213.207.x.x' ]
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'
Thanks for staying so long.Finally it is working.I have changed the name to eth2.

I am trying to understand I have to route traffic from my 4VMs through this LAN interface which I call as eth2.I have to do NAT but I am a bit confusing in bridges.Can you give me some link here may be on howtoforge itself which makes me clear of routing on Xen.


I am pasting the output of ifconfig it does not shows me any where brdige
while brctl show does show

Code:
openworld:/etc/xen# brctl show
bridge name	bridge id		STP enabled	interfaces
eth2		8000.0026b9824238	no		peth2
							vif1.0
							vif2.0
							vif3.0
							vif5.0
and ifconfig

Code:
openworld:/etc/xen# ifconfig
eth2      Link encap:Ethernet  HWaddr 00:26:b9:82:42:38  
          inet addr:192.21.100.147  Bcast:192.21.255.255  Mask:255.255.0.0
          inet6 addr: fe80::226:b9ff:fe82:4238/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3436 errors:0 dropped:0 overruns:0 frame:0
          TX packets:233 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2460960 (2.3 MiB)  TX bytes:34543 (33.7 KiB)

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:15 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1141 (1.1 KiB)  TX bytes:1141 (1.1 KiB)

peth2     Link encap:Ethernet  HWaddr 00:26:b9:82:42:38  
          inet6 addr: fe80::226:b9ff:fe82:4238/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:4277 errors:0 dropped:0 overruns:0 frame:0
          TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2669261 (2.5 MiB)  TX bytes:36485 (35.6 KiB)
          Interrupt:32 Memory:da000000-da012100 

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:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3594 errors:0 dropped:34 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:28 (28.0 B)  TX bytes:2583658 (2.4 MiB)

vif2.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:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3545 errors:0 dropped:52 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:28 (28.0 B)  TX bytes:2549186 (2.4 MiB)

vif3.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:176 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3624 errors:0 dropped:74 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:10475 (10.2 KiB)  TX bytes:2529692 (2.4 MiB)

vif5.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:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1172 errors:0 dropped:13 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:412 (412.0 B)  TX bytes:864715 (844.4 KiB)
All the above entries are after I have restarted and I did a reboot also to the machine.

Here is my /etc/xen/xend-config.sxp

Code:
 Your default ethernet device is used as the outgoing interface, by default.
# To use a different one (e.g. eth1) use
#
# (network-script 'network-bridge netdev=eth1')
#
#### Tapas edited following line
 (network-script 'network-bridge netdev=eth2')

Last edited by vtapas; 9th April 2010 at 15:16.
Reply With Quote
Sponsored Links
  #12  
Old 9th April 2010, 15:23
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

You can use bridge mode, so the interfaces inside the vm will act like they're directly connected to the network ..

I wouldn't use NAT, since then you need to route your traffic from to your vm server ..
We always use bridge, it's way easier and no firewall / routing rules to take care of ..

info @ http://wiki.xensource.com/xenwiki/XenNetworking

I've been playing with some virtualization techniques, though since i found proxmox i want nothing else

webbased management of KVM / Openvz vm's .. very nice .. I'm migrating all my Xen servers to proxmox :P
Reply With Quote
  #13  
Old 9th April 2010, 15:39
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Mark_NL View Post
proxmox
Well thanks for that link. I have a doubt I changed the name of bridge from default
I can
ping to each of them after I do an SSH inside Dom0.
In the file /etc/xen/xend-config.sxp
I tried to have a bridge of my name so I edited them as follows

# The bridge is named xenbr0, by default. To rename the bridge, use
#
# (network-script 'network-bridge bridge=<name>')
#### Tapas made changes
(network-script 'network-bridge bridge=<tapas>')

I did rebooted my server but then when I do brctl show

I get following
bridge name bridge id STP enabled interfaces
eth2 8000.0026b9824238 no peth2

eth2 is not the default name why is this happening? What should I
check in? I want to have bridges renamed and want the bridges to have
desired name.
Reply With Quote
  #14  
Old 9th April 2010, 15:56
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

Hehe, your just trial and error right now and that messes things up ..

(network-script 'network-bridge bridge=tapas')

NOT

(network-script 'network-bridge bridge=<tapas>')

anyway, i would leave the bridge=<name> alone, and keep it default (comment the line), just use netdev=eth2

should work ..
Reply With Quote
The Following User Says Thank You to Mark_NL For This Useful Post:
vtapas (9th April 2010)
  #15  
Old 9th April 2010, 16:27
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
Question

Quote:
Originally Posted by Mark_NL View Post
(network-script 'network-bridge bridge=tapas')
Well it did not worked.
Code:
openworld:~# brctl show
bridge name	bridge id		STP enabled	interfaces
eth2		8000.0026b9824238	no		peth2
The entry in /etc/xen/xend-config.sxp is
Code:
# The bridge is named xenbr0, by default.  To rename the bridge, use
#
# (network-script 'network-bridge bridge=<name>')
#### Tapas made changes
  (network-script 'network-bridge bridge=tapas')
# It is possible to use the network-bridge script in more complicated
?
Reply With Quote
  #16  
Old 9th April 2010, 16:57
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

as i said before, don't use bridge .. comment it!

you should only use:

(network-script 'network-bridge netdev=eth2')
Reply With Quote
  #17  
Old 9th April 2010, 17:17
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

I got your point.Up to here. I want each DomU to connect to separate LAN Card.
I found this article http://www.debian-administration.org/articles/470
which is a bit helpful.Any ways thanks for your help.
Reply With Quote
Reply

Bookmarks

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
mail trouble djenojado Installation/Configuration 23 10th April 2010 13:26
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 09:20
[Postfix] Quota doesn't work krzysiek HOWTO-Related Questions 8 2nd March 2009 16:57
SuSE Enterprise, PHP binary coming with ISPConfig does not work properly NexusTechUS Installation/Configuration 1 26th April 2007 21:03
Verify email setup meekish Installation/Configuration 28 27th October 2006 16:36


All times are GMT +2. The time now is 10:07.


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