OpenVZ Forum


Home » General » Support » gateway - route
gateway - route [message #14960] Sun, 15 July 2007 04:12 Go to next message
taylorhgh is currently offline  taylorhgh
Messages: 7
Registered: July 2007
Junior Member
Ok.. I'm doing something really wrong. I figured I probably accidentally skipped through the man, but I've read a few times and can't figure it out.

I've created a VE no problem, but I have no idea how to add a gateway. I can add the IP, and nameservers no problem using vzctl set VEID, but there is no option for the gateway?

I don't want the host node to be the gateway I want my regular gateway IP on the router to be assigned to each VE. How do I add it to the VE?

Thanks
Re: gateway - route [message #14967 is a reply to message #14960] Sun, 15 July 2007 16:46 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
GW is handled by the HN, the VE has no control over it. The HN's routing table determines how the VE connects with the net. Do a search for source based routing as this is likely the answer to your next question.



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: gateway - route [message #14968 is a reply to message #14967] Sun, 15 July 2007 17:11 Go to previous messageGo to next message
taylorhgh is currently offline  taylorhgh
Messages: 7
Registered: July 2007
Junior Member
Thanks,

I did a search, but it looks like source based routing is more guided towards using different gateways for different VE? am I wrong to assume that?

Is the VE supposed to have this routing:

[root@host06 vz]# vzctl exec 100 route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 venet0
[root@host06 vz]#
Re: gateway - route [message #14972 is a reply to message #14967] Mon, 16 July 2007 01:11 Go to previous messageGo to next message
taylorhgh is currently offline  taylorhgh
Messages: 7
Registered: July 2007
Junior Member
In case this helps, I've got Network unreachable error as follows:

[root@host06 ~]# vzctl set 601 --ipadd xxx.yyy.247.151 --save
Adding IP address(es): xxx.yyy.247.151
SIOCADDRT: Network is unreachable
Configure meminfo: 49152
Saved parameters for VE 601
[root@host06 ~]#
Re: gateway - route [message #14985 is a reply to message #14960] Mon, 16 July 2007 08:32 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

As I can conclude you use venet device (it is handled by vzctl set <veid> --ipadd command). venet device is like a point to point conection between VE and HN:

                                          _______
                                         /       \
_____  venet         venet _____   eth  /  YOUR   \
VE101|---------------------|HN |------- |          \ 
                                         \ NETWORK /
                                           --------- 


So, HN must forward packets from and to VE if you want your VE to be able to reach other computers in your network.

Routing is set automatically on HN and in VE by vzctl while --ipadd command.


HTH,
Vasily.
Re: gateway - route [message #15005 is a reply to message #14985] Mon, 16 July 2007 14:13 Go to previous messageGo to next message
taylorhgh is currently offline  taylorhgh
Messages: 7
Registered: July 2007
Junior Member
--ipadd does not work properly. As you can see from my --ipadd command there is a subnetmask error it looks like:

[root@host06 ~]# vzctl set 601 --ipadd xxx.yyy.247.151 --save
Adding IP address(es): xxx.yyy.247.151
SIOCADDRT: Network is unreachable
Configure meminfo: 49152
Saved parameters for VE 601
[root@host06 ~]#

Any ideas? Can I do something like --ipadd xxx.yyy.247.151 --netmask 255.255.255.128 ?

Thanks in advance!
Re: gateway - route [message #15007 is a reply to message #15005] Mon, 16 July 2007 14:50 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Smile I've just wrote you, that venet - is point-to-point protocol, so netmask is not important in this case.

What template do you use for your VE?
What is your vzctl version?

Thanks,
Vasily.
Re: gateway - route [message #15011 is a reply to message #14960] Mon, 16 July 2007 19:13 Go to previous messageGo to next message
taylorhgh is currently offline  taylorhgh
Messages: 7
Registered: July 2007
Junior Member
VZCTL version 3.0.18 on a HN running CentOS 5

I've tried template w/ CentoS-4-i386-minimal, and default. I've also tried fedora-core-5

Thanks Again!
Re: gateway - route [message #15056 is a reply to message #15007] Tue, 17 July 2007 19:07 Go to previous message
taylorhgh is currently offline  taylorhgh
Messages: 7
Registered: July 2007
Junior Member
Do you think it's possible it's only doing that because it's CentOS 5?
Previous Topic: Network is slow
Next Topic: *SOLVED* How to execute scripts on vzctl start veid
Goto Forum:
  


Current Time: Wed Jul 10 15:31:22 GMT 2024

Total time taken to generate the page: 0.02640 seconds