Home » General » Support » *SOLVED* VEs with different subnets
Re: VEs with different subnets [message #14560 is a reply to message #14559] |
Mon, 02 July 2007 12:19   |
ugo123
Messages: 22 Registered: June 2007
|
Junior Member |
|
|
titan:/var/lib/vz/template/cache# vzctl create 101 --ostemplate fedora-core-6-i686-default --config vps.basic
Creating VE private area (fedora-core-6-i686-default)
Performing postcreate actions
VE private area was created
titan:/var/lib/vz/template/cache# vzctl set 101 --onboot yes --save
Saved parameters for VE 101
titan:/var/lib/vz/template/cache# vzctl set 101 --hostname test --save
Saved parameters for VE 101
titan:/var/lib/vz/template/cache# vzctl set 101 --ipadd 87.98.196.135 --save
Saved parameters for VE 101
titan:/var/lib/vz/template/cache# vzctl set 101 --nameserver 194.2.0.50 --save
that's how I've created the VZ (just in case).
87.98.196.135, being the public IP address I want to try to assign to the VE.
Here are the parameters that would do the trick if the VE had a "classical" ethernet device :
address 87.98.196.135
netmask 255.255.255.192
network 87.98.196.128
broadcast 87.98.196.191
gateway 87.98.196.129
Here's the output of the commands you've requested. (titan is the HN, test the VE)
titan:~# ip a l
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
4: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
6: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:70:26:53:9d brd ff:ff:ff:ff:ff:ff
inet 10.1.1.15/16 brd 10.1.255.255 scope global eth0
inet6 fe80::250:70ff:fe26:539d/64 scope link
valid_lft forever preferred_lft forever
8: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop
link/ether 12:62:b8:e1:94:93 brd ff:ff:ff:ff:ff:ff
10: teql0: <NOARP> mtu 1500 qdisc noop qlen 100
link/void
12: tunl0: <NOARP> mtu 1480 qdisc noop
link/ipip 0.0.0.0 brd 0.0.0.0
14: gre0: <NOARP> mtu 1476 qdisc noop
link/gre 0.0.0.0 brd 0.0.0.0
16: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
18: ip6tnl0: <NOARP> mtu 1460 qdisc noop
link/tunnel6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
1: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc noqueue
link/void
titan:~#
titan:~# ip r l
87.98.196.135 dev venet0 scope link
10.1.0.0/16 dev eth0 proto kernel scope link src 10.1.1.15
default via 10.1.1.1 dev eth0
titan:~#
(10.1.1.1 being my gateway providing NAT Internet access for the HNs, and not the ISP one)
titan:~# vzctl exec 101 ip a l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue
link/void
inet 127.0.0.1/32 scope host venet0
inet 87.98.196.135/32 brd 87.98.196.135 scope global venet0:0
titan:~#
titan:~# vzctl exec 101 ip r l
192.0.2.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link
default via 192.0.2.1 dev venet0
titan:~#
(I really don't get the 192.0.2.0/24 that I've just seen from the route....)
I can ping from the HN and the VE can ping the HN
titan:~# ping 87.98.196.135
PING 87.98.196.135 (87.98.196.135) 56(84) bytes of data.
64 bytes from 87.98.196.135: icmp_seq=1 ttl=64 time=0.063 ms
64 bytes from 87.98.196.135: icmp_seq=2 ttl=64 time=0.017 ms
[root@test /]# ping 10.1.1.15
PING 10.1.1.15 (10.1.1.15) 56(84) bytes of data.
64 bytes from 10.1.1.15: icmp_seq=1 ttl=64 time=0.061 ms
64 bytes from 10.1.1.15: icmp_seq=2 ttl=64 time=0.017 ms
But nothing else, but it's quite logical since I can't set the gateway.... and I don't know how to do it with the venet device....
Just in case, here's the version of the vzctl program
titan:~# vzctl
vzctl version 3.0.16-5dso1
Copyright (C) 2000-2007 SWsoft.
This program may be distributed under the terms of the GNU GPL License.
Thanks a lot.
Ugo
|
|
|
 |
|
*SOLVED* VEs with different subnets
By: ugo123 on Sun, 01 July 2007 23:25
|
 |
|
Re: VEs with different subnets
By: dev on Mon, 02 July 2007 07:29
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 08:31
|
 |
|
Re: VEs with different subnets
By: dev on Mon, 02 July 2007 07:38
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 08:36
|
 |
|
Re: VEs with different subnets
By: dev on Mon, 02 July 2007 08:52
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 09:13
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 12:01
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 12:19
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 17:17
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 20:13
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 09:25
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 09:26
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
By: dev on Tue, 03 July 2007 10:31
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 12:04
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 10:41
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 02 July 2007 21:19
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 12:07
|
 |
|
Re: VEs with different subnets
By: dev on Tue, 03 July 2007 12:08
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 12:39
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 12:59
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
By: ugo123 on Tue, 03 July 2007 14:48
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
By: ugo123 on Mon, 09 July 2007 12:51
|
 |
|
Re: VEs with different subnets
|
 |
|
Re: VEs with different subnets
|
Goto Forum:
Current Time: Tue Jul 15 19:47:50 GMT 2025
Total time taken to generate the page: 0.03629 seconds
|