OpenVZ Forum


Home » General » Support » Gateway 192.0.2.1 with Ubuntu-8.04 and Debian 4.0
Re: Gateway 192.0.2.1 with Ubuntu-8.04 and Debian 4.0 [message #33893 is a reply to message #33888] Tue, 18 November 2008 15:08 Go to previous messageGo to previous message
tanteauguri is currently offline  tanteauguri
Messages: 8
Registered: November 2008
Junior Member
I use exactly the same parameters in sysctl.conf:
root@openvz01:~# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
root@openvz01:~#  


I create a fresh Server with this script:

root@openvz01:~# cat /etc/scripts/make_ev.sh
vzctl create 101 --ostemplate ubuntu-8.04-i386-minimal
vzctl set 101 --onboot yes --save
vzctl set 101 --ipadd 193.80.225.63 --save
vzctl set 101 --nameserver 193.80.225.58 --save
vzctl set 101 --hostname ev101 --save

root@openvz01:~# /etc/scripts/make_ev.sh
Creating VE private area (ubuntu-8.04-i386-minimal)
Performing postcreate actions
VE private area was created
Saved parameters for VE 101
Saved parameters for VE 101
Saved parameters for VE 101
Saved parameters for VE 101
root@openvz01:~#


I start the new VE and recieve an error:
root@openvz01:~# vzctl start  101
Starting VE ...
VE is mounted
Adding IP address(es): 193.80.225.63
vps-net_add WARNING: Function proxy_arp for eth0 is set to 0. Enable with 'sysctl -w net.ipv4.conf.eth0.proxy_arp=1'. See /usr/share/doc/vzctl/README.Debian.
Setting CPU units: 1000
Configure meminfo: 65536
Set hostname: ev101
File resolv.conf was modified
VE start in progress...
root@openvz01:~#     


I enter the Machine an have a crappy route:
root@openvz01:~# vzctl enter 101
entered into VE 101
root@ev101:/# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.0.2.1       0.0.0.0         255.255.255.255 UH    0      0        0 venet0
0.0.0.0         192.0.2.1       0.0.0.0         UG    0      0        0 venet0
root@ev101:/# 


The IP commands inside the VE:

root@ev101:/# 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
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/void
    inet 127.0.0.1/32 scope host venet0
    inet 193.80.225.63/32 scope global venet0:0
root@ev101:/# ip r l
192.0.2.1 dev venet0  scope link
default via 192.0.2.1 dev venet0
root@ev101:/# 


The IP commands inside the HN:

root@ev101:/# logout
exited from VE 101
root@openvz01:~# 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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:14:5e:c9:28:9f brd ff:ff:ff:ff:ff:ff
    inet 193.80.225.62/25 brd 193.80.254.127 scope global eth0
    inet6 fe80::214:5eff:fec9:289f/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:02:44:52:79:54 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:02:44:51:38:33 brd ff:ff:ff:ff:ff:ff
5: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue
    link/void
root@openvz01:~# ip r l
193.80.225.63 dev venet0  scope link  src 193.80.225.62
193.80.225.0/25 dev eth0  proto kernel  scope link  src 193.80.225.62
default via 193.80.225.1 dev eth0  metric 100
root@openvz01:~# 


A not very elegant solution is to add FAKEGATEWAY=193.80.225.1 to the script debian-add_ip.sh.

I run 300 vservers and would like to change to OpenVZ, so I would prefer a clean solution.
Thanks for your help.

[Updated on: Tue, 18 November 2008 15:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: *SOLVED* Samba server in VE
Next Topic: shorewall in VE
Goto Forum:
  


Current Time: Sun Oct 20 19:09:57 GMT 2024

Total time taken to generate the page: 0.05601 seconds