Dan Waterloo
2010-Mar-23 09:38 UTC
[Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
I''ve got 3 different sets of public ips, each with it''s own static ips, and default gateways, and only one physical ethernet port. I''d like to be able to setup domUs that use the various ips, and route through the gateway for that particular IP. My problem is that when I setup these ip addresses as alias on eth:0, only one set of ips/netmask/gateway will work. any suggestions on how to set this up? I''m using centos 5.4, xen3. I''ve tried setting this up using ip aliasing (eth0:1, eth0:2, eth0:3), but that doesn''t work. (Xen seems to reconfigure the network, breaking the alias) thanks, any suggestions would be greatly appreciated! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ian Tobin
2010-Mar-23 09:43 UTC
RE: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
You will need a separate nic, as far as im aware the method you are using will route using the gateway of eth0. This is for physical and virtual hosts. Ian -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Dan Waterloo Sent: 23 March 2010 09:39 To: xen-users@lists.xensource.com Subject: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips I''ve got 3 different sets of public ips, each with it''s own static ips, and default gateways, and only one physical ethernet port. I''d like to be able to setup domUs that use the various ips, and route through the gateway for that particular IP. My problem is that when I setup these ip addresses as alias on eth:0, only one set of ips/netmask/gateway will work. any suggestions on how to set this up? I''m using centos 5.4, xen3. I''ve tried setting this up using ip aliasing (eth0:1, eth0:2, eth0:3), but that doesn''t work. (Xen seems to reconfigure the network, breaking the alias) thanks, any suggestions would be greatly appreciated! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dan Waterloo
2010-Mar-23 18:41 UTC
Re: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
I was wondering if there was a way to setup the physical eth0 with only a mac address, then put a bridge in dom0 with the eth0 mac address, and some virtual eth ports, each with a public IP/netmask/gateway? I''m thinking that I''d need to do this manually...? Ian Tobin wrote:> You will need a separate nic, as far as im aware the method you are > using will route using the gateway of eth0. > > This is for physical and virtual hosts. > > Ian > > > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Dan Waterloo > Sent: 23 March 2010 09:39 > To: xen-users@lists.xensource.com > Subject: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips > > I''ve got 3 different sets of public ips, each with it''s own static ips, > and default gateways, and only one physical ethernet port. > > I''d like to be able to setup domUs that use the various ips, and route > through the gateway for that particular IP. > My problem is that when I setup these ip addresses as alias on eth:0, > only one set of ips/netmask/gateway will work. > > any suggestions on how to set this up? > I''m using centos 5.4, xen3. I''ve tried setting this up using ip > aliasing (eth0:1, eth0:2, eth0:3), but that doesn''t work. (Xen seems to > reconfigure the network, breaking the alias) > > thanks, any suggestions would be greatly appreciated! > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > >-- Dan Waterloo Interface Technologies a div of Waterloo Engr. Grp. LLC 111 N 10th Ave Melrose Park, IL 60160 e: dan@i-t.com t: (708) 366-4411 w: www.i-t.com f: (708) 366-4413 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Mar-24 04:37 UTC
Re: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
On Wed, Mar 24, 2010 at 1:41 AM, Dan Waterloo <dan@i-t.com> wrote:> I was wondering if there was a way to setup the physical eth0 with only a > mac address, then put a bridge in > dom0 with the eth0 mac address, and some virtual eth ports, each with a > public IP/netmask/gateway? > > I''m thinking that I''d need to do this manually...?You need to provide some examples, as your earlier explanation is somewhat confusing. Here''s an example though. Let''s say you have three different IP address available, 192.168.1.101,102,and 103, netmask 255.255.255.0. All these IPs use gateway 192.168.1.1 as gateway (as they''re on the same network) and 8.8.8.8 as DNS. Setting this is easy. First pick one IP you want to use in dom0. Say 192.168.1.101. Put it on eth0, and use xen''s default network bridge script. You should end up with a bridge called eth0 or xenbr0 (depends on your xen version). Next create two domUs using the xenbr0 bridge, assign them each one of the remaining IPs (192.168.1.102 and 192.168.1.103). Use the same DNS and gateway as you do on dom0. That should be it. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dan Waterloo
2010-Mar-24 16:23 UTC
Re: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
Thanks, here''s what I''m trying to do: 1. consolidate 8 or so servers into one xen box (dual quad core, 20gb RAM, two gigabit network ports) I have three separate internet connections, and a lan: a. dsl line, with 5 fixed ip addresses, a default gateway, and dns b. cable modem #1, with a unique set of 5 fixed ip addresses, a default gateway, and dns c. cable modem #2, with a unique set of 5 fixed ip addresses (different from cable modem #1), and a default gateway (different from cable modem #1), and dns settings d. a private lan, with 192.168.0.xxx, a default gateway, and dns of one of the cable modems. I have xen domu''s that need to be configured with one or two ethernet ports. (this part I''ve figured out how to do) a. one configuration is with two network connections, one to a public IP (i have boxes that need to be on any one of the three public ip sets (a., b., c.) , and have a private IP on my lan b. the other configuration is for private "LAN only" connections. The problem I''m having is that I have only two gigabit ethernet ports on my new server, so I want to setup the public ips (three sets), on one of the physical ports, and the lan on the other physical port. XEN wants to take over the network configuration, and I can get only one of the public ip sets to work at a time on the ''public'' ethernet port. i.e., either public ips a, or b, or c work, because I can only setup one ''default gateway'' on the physical port. My thinking is that either this is not possible to do (limitations of mac hardware addresses, etc, and the cablemodem/routers), or I need to do some ''fancy footwork'' of setting up the network manually. About the only solution that I can visualize is to have the physical port NOT to have an IP assigned, and hook it to multiple (3) Dom0 bridges, each bridge would be assigned one of the three sets of ip addresses/gateway, and then configure the domUs to one of the three dom0 bridges, based on the ip address that it needs to have. If all else fails, I can get a multiport network card for the machine, and it should be pretty straight forward to configure. Regardless of getting the multiport card (which seems pretty attractive at this point), I''d like to get my question resolved one way or the other for me, and anyone that might follow. If it works, I can document it and post it somewhere where it can be found... Any suggestions if this is even possible to configure using only two physical ports, connecting to 4 separate networks, each network having it''s own default gateway and dns settings?) Thanks so much! Fajar A. Nugraha wrote:> On Wed, Mar 24, 2010 at 1:41 AM, Dan Waterloo <dan@i-t.com> wrote: > >> I was wondering if there was a way to setup the physical eth0 with only a >> mac address, then put a bridge in >> dom0 with the eth0 mac address, and some virtual eth ports, each with a >> public IP/netmask/gateway? >> >> I''m thinking that I''d need to do this manually...? >> > > You need to provide some examples, as your earlier explanation is > somewhat confusing. > > Here''s an example though. Let''s say you have three different IP > address available, 192.168.1.101,102,and 103, netmask 255.255.255.0. > All these IPs use gateway 192.168.1.1 as gateway (as they''re on the > same network) and 8.8.8.8 as DNS. Setting this is easy. > > First pick one IP you want to use in dom0. Say 192.168.1.101. Put it > on eth0, and use xen''s default network bridge script. You should end > up with a bridge called eth0 or xenbr0 (depends on your xen version). > > Next create two domUs using the xenbr0 bridge, assign them each one of > the remaining IPs (192.168.1.102 and 192.168.1.103). Use the same DNS > and gateway as you do on dom0. > > That should be it. > >-- Dan Waterloo Interface Technologies a div of Waterloo Engr. Grp. LLC 111 N 10th Ave Melrose Park, IL 60160 e: dan@i-t.com t: (708) 366-4411 w: www.i-t.com f: (708) 366-4413 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
john ewing
2010-Mar-24 17:03 UTC
[Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
I have a sort of similar setup, could you not do the following .... On Dom0 Set up two bridges on the physical interfaces called lan and wan for each domU set up the network interface as follows vif = [ "mac=00:16:3e:74:68:79,bridge=lan","mac=00:16:3e:74:68:79,bridge=wan" ] And then configure the interface details within the DomU OS to use whatever subnet and gw you need for the ''external'' interface. I think I''m correct in saying that if you do it this way the Dom0 interface settings aren''t important. J. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dan Waterloo
2010-Mar-25 00:38 UTC
Re: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
Thanks! that worked (although I did have to specify different MAC addresses for each (it appears that you used the same MAC address). How come something so simple takes forever to figure out? john ewing wrote:> I have a sort of similar setup, > > could you not do the following .... > > On Dom0 > Set up two bridges on the physical interfaces called lan and wan > for each domU set up the network interface as follows > vif = [ > "mac=00:16:3e:74:68:79,bridge=lan","mac=00:16:3e:74:68:79,bridge=wan" ] > > And then configure the interface details within the DomU OS to use > whatever > subnet and gw you need for the ''external'' interface. I think I''m > correct in saying > that if you do it this way the Dom0 interface settings aren''t important. > > J. > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- Dan Waterloo Interface Technologies a div of Waterloo Engr. Grp. LLC 111 N 10th Ave Melrose Park, IL 60160 e: dan@i-t.com t: (708) 366-4411 w: www.i-t.com f: (708) 366-4413 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Mar-25 02:48 UTC
Re: [Xen-users] dom0 eth0:0, eth0:1, eth0:2 network setup alias ips
On Wed, Mar 24, 2010 at 11:23 PM, Dan Waterloo <dan@i-t.com> wrote:> Thanks, here''s what I''m trying to do: > > 1. consolidate 8 or so servers into one xen box (dual quad core, 20gb RAM, > two gigabit network ports) > > I have three separate internet connections, and a lan: > a. dsl line, with 5 fixed ip addresses, a default gateway, and dns > b. cable modem #1, with a unique set of 5 fixed ip addresses, a default > gateway, and dns > c. cable modem #2, with a unique set of 5 fixed ip addresses (different from > cable modem #1), and a default gateway (different from cable modem #1), and > dns settings > d. a private lan, with 192.168.0.xxx, a default gateway, and dns of one of > the cable modems.So 4 different networks?> > I have xen domu''s that need to be configured with one or two ethernet ports. > (this part I''ve figured out how to do) > a. one configuration is with two network connections, one to a public IP (i > have boxes that need to be on any one of the three public ip sets (a., b., > c.) , and have a private IP on my lan > b. the other configuration is for private "LAN only" connections. > > The problem I''m having is that I have only two gigabit ethernet ports on my > new server, so I want to setup the public ips (three sets), on one of the > physical ports, and the lan on the other physical port.I highly suggest you take a look at vlans. You might need to also purchase a vlan-capable switch though. It''s pretty affordable nowadays.> XEN wants to take over the network configuration,For complex configuration, I highly suggest you do NOT use xen''s default network-bridge script. Instead, you should disable it on xend-config.sxp, and create bridges manually using OS config scripts (/etc/sysconfig/network-scripts/ifcfg-*)> and I can get only one of > the public ip sets to work at a time on the ''public'' ethernet port. i.e., > either public ips a, or b, or c work, because I can only setup one ''default > gateway'' on the physical port.That''s not xen limitation. It''s a general OS limitation. You can only have one default gateway.> > My thinking is that either this is not possible to do (limitations of mac > hardware addresses, etc, and the cablemodem/routers), or I need to do some > ''fancy footwork'' of setting up the network manually.Some big customers uses BGP for that, but that''d be out of your league :P> About the only solution that I can visualize is to have the physical port > NOT to have an IP assigned, and hook it to multiple (3) Dom0 bridges, each > bridge would be assigned one of the three sets of ip addresses/gateway, and > then configure the domUs to one of the three dom0 bridges, based on the ip > address that it needs to have.vlans would work. For example: - eth0 is split into 3 vlans: vlans 101, 102, and 103 - create a bridge on top of each vlans: br101, br102, br103. See http://www.mailinglistarchive.com/html/xen-users@lists.xensource.com/2009-10/msg00512.html for example. - assume dom0 only needs to be on one network (br101). So you give IP address for dom0 on that bridge, while other bridges are up without IP address on dom0 - assign each domU on whichever bridge you need, based on the ip address that it needs to have. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users