[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] Trouble with Nat Xen setup
On Tue, Feb 24, 2015 at 1:50 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote: > On Mon, 2015-02-23 at 10:45 -0800, JMW MVM wrote: > >> inet 169.254.15.51 netmask 255.255.0.0 broadcast 169.254.255.255 > >> I don't know why it would be getting that ip. > > 169.254.x.x is the link-local IPv4 space > http://en.wikipedia.org/wiki/Link-local_address > > "The Internet"(tm) seems to think that these get assigned if an > interface is configured for DHCP but unable to talk to a DHCP server or > similar situations. It might also indicate you have avahi or some other > zeroconf thing enabled in the domU. > > I'm not a gentoo user but you say you used config_eth0="192.168.0.42" in > your conf.d/net, while > https://forums.gentoo.org/viewtopic-t-747458-start-0.html gives an > example with more fields and more ()s involved. I don't know if those > differences are relevant. > > You could try doing it by hand to confirm it is working with: > ifconfig eth0 192.168.0.42 netmask 255.255.255.0 up > and once that is working worry about how to translate that into a gentoo > config. > >> The ip of DomU looks different on the host side, which you can see >> here from the output of running ifconfig: http://dpaste.com/3FQ2HWG. >> That output looks the same even if I specify the ip address on the >> DomU side. I assume this is normal behavior. > > tools/hotplug/Linux/vif-nat contains: > routing_ip() > { > echo $(echo $1 | awk -F. '{print $1"."$2"."$3"."$4 + 127}') > } > > which AIUI is supposed to calculate the dom0 IP given the domU IP by > adding 127 to the final quad. 42+127 == 169 as you have seen. So I think > this is normal. > > Ian. > > Hey thanks Ian, It turned out the problem was just that I had put the DomU on the wrong subnet. I had made a silly assumption, thinking that since the NAT rule is supposed to rewrite packets to have the same IP as Dom0, that that rule would apply to all packets originating on the same machine. My thinking now is that it applies only to packets from the same subnet. Now I'm wondering if the rule I currently have in place will modify or duplicate packets coming from outside the machine. This is my first experience setting up NAT, so if you have any advice I would appreciate hearing it. I'm not intending to use this machine as a router, I just want to route packets from my DomU's correctly. The router that serves as the gateway on my home network is currently configured to only give out IP's on the 192.168.1.x subnet, so if you think I need to modify the rule somehow, please let me know. Thanks, JMW _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |