Adding external (eth0:0) IP to VE - missunderstanding of networking modes [message #47031] |
Thu, 28 June 2012 02:23 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
Rex_GER
Messages: 6 Registered: February 2010
|
Junior Member |
|
|
Hello,
i have an dedicated server (here are quotes from my test-instance which has nearly same architecture), the one and only ip is an external and that is assigned to eth0:
(let's assume the locale IPs are externals)
[root@cent64openvz1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
BROADCAST="172.16.255.255"
DNS1="172.16.250.11"
GATEWAY="172.16.250.10"
HWADDR="00:15:5D:B2:64:18"
IPADDR="172.16.253.1"
NETMASK="255.255.0.0"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
Now the hoster provides IP-Aliases, which have to be assigned that way (they told me on the phone):
[root@cent64openvz1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE="eth0:1"
ONBOOT="yes"
BOOTPROTO="none"
IPADDR=172.16.253.200
NETMASK="255.255.0.0"
----
If i ping 172.16.253.200 from other Clients, they get an answer. My existing container got their ip-adress via vzctl set ve_id --ipadd .... (i noticed inside the ve via ifconfig the ip is assigned to venet..
if i tracert to an container-ip, i see to entries - 1st the hwnode, 2nd the ve-ip
if i tracert to the "ip alias" (eth0:1) i see only that ip... seems to work...
----
On which way do i have to assign this ip (172.16.253.200) to a Container i created recently but i haven't assigned an IP so far? And which settings do i have to set that my container can ping outside, resolve hostnames and so on? I have some understanding problems where to set what settings... (where DNS and/or Gateway? what about the 'route' entries?)
Thanks in Advance for your Replies!
Regards
Dennis
edit:
[root@cent64openvz1 ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.253.35 * 255.255.255.255 UH 0 0 0 venet0
172.16.253.20 * 255.255.255.255 UH 0 0 0 venet0
172.16.253.10 * 255.255.255.255 UH 0 0 0 venet0
172.16.253.40 * 255.255.255.255 UH 0 0 0 venet0
172.16.253.200 * 255.255.255.255 UH 0 0 0 venet0
172.16.253.30 * 255.255.255.255 UH 0 0 0 venet0
link-local * 255.255.0.0 U 1002 0 0 eth0
172.16.0.0 * 255.255.0.0 U 0 0 0 eth0
default svr08r2router1. 0.0.0.0 UG 0 0 0 eth0
[Updated on: Thu, 28 June 2012 02:25] Report message to a moderator
|
|
|
|
|