All routable IP addresses all on the same vlan [message #24632] |
Fri, 07 December 2007 05:20 ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
thezeke
Messages: 5 Registered: December 2007
|
Junior Member |
|
|
Hello,
After creating a VE with an IP address in the same VLAN as the IP address of the HW Node I am unable to ping that VE's IP address and I'm unable to ping an outside IP address. If I stop the VE and add the VE's IP address to eth0 as an alias I can ping it from the outside as expected.
I want to use all routable IP addresses here. I guess I need to setup a bridge between the HW Node and each VE. How do I do this without too many custom scripts and special firewall rules.
# vzctl create 101 --ostemplate centos-4-i386-default
# vzctl set 101 --ipadd 209.160.28.232 --save
# vzctl set 101 --nameserver 66.36.226.110 --save
# vzctl set 101 --hostname vps101 --save
# vzctl start 101
# vzctl enter 101
[root@vps101 /]# ping -c 4 64.233.167.99
PING 64.233.167.99 (64.233.167.99) 56(84) bytes of data.
--- 64.233.167.99 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms
HW NODE "ifconfig":
------------------------------------------------
[root@sls-ab2p14 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0E:0C:7F:0E:C7
inet addr:209.160.40.18 Bcast:209.160.47.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:356760 errors:0 dropped:0 overruns:0 frame:0
TX packets:110181 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:250149540 (238.5 MiB) TX bytes:14660446 (13.9 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:2366 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:198408 (193.7 KiB) TX bytes:1092 (1.0 KiB)
VE "ifconfig":
------------------------------------------------
[root@vps101 /]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3517831808 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32766 (31.9 KiB) TX bytes:510 (510.0 b)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2271 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:190764 (186.2 KiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:209.160.28.232 P-t-P:209.160.28.232 Bcast:209.160.28.232 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
SYSCTL.CONF (sysctl -p recently executed)
------------------------------------------------
[root@sls-ab2p14 ~]# cat /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 1
net.ipv4.conf.default.accept_source_route = 0
ROUTING TABLES:
[root@sls-ab2p14 ~]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
209.160.40.0 * 255.255.248.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default vl102-gw.acc.se 0.0.0.0 UG 0 0 0 eth0
[root@vps101 /]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.0.2.0 * 255.255.255.0 U 0 0 0 venet0
169.254.0.0 * 255.255.0.0 U 0 0 0 venet0
default 192.0.2.1 0.0.0.0 UG 0 0 0 venet0
[root@sls-ab2p14 ~]# iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 255.255.255.255
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
|
|
|