OpenVZ Forum


Home » General » Support » *SOLVED* debian venet0 is always 127.0.0.1
*SOLVED* debian venet0 is always 127.0.0.1 [message #4756] Tue, 25 July 2006 16:28 Go to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member
Hi!

Is it correct, that veth0 is always 127.0.0.1 because there's always the lo interface which has 127.0.0.1.

VE is Debian 3.1

Is there a way to change this behavior - cause i've a software which uses always the first (v)eth address...

Stefan

[Updated on: Wed, 26 July 2006 05:43] by Moderator

Report message to a moderator

Re: debian veth0 is always 127.0.0.1 [message #4758 is a reply to message #4756] Tue, 25 July 2006 17:13 Go to previous messageGo to next message
hvdkamer is currently offline  hvdkamer
Messages: 40
Registered: July 2006
Member
Strange. I'm also on Debian and in my VE:

ve31:~# 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:30 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3678 (3.5 KiB)  TX bytes:3678 (3.5 KiB)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.13.31  P-t-P:192.168.13.31  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:97610 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77845 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:29034585 (27.6 MiB)  TX bytes:44437287 (42.3 MiB)



Henk van de Kamer
auteur Het Lab
http://www.hetlab.tk/
Re: debian veth0 is always 127.0.0.1 [message #4759 is a reply to message #4756] Tue, 25 July 2006 17:50 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member
For me it is:
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
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:8267 errors:0 dropped:0 overruns:0 frame:0
TX packets:6600 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5673417 (5.4 MiB) TX bytes:1561875 (1.4 MiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:85.158.178.11 P-t-P:85.158.178.11 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:


and the auto generated /etc/network/interfaces is:


# Auto generated venet0 interfaces
auto venet0 lo
iface venet0 inet static
address 127.0.0.1
netmask 255.255.255.255
broadcast 0.0.0.0
up route add -net 191.255.255.1 netmask 255.255.255.255 dev venet0
up route add default gw 191.255.255.1
iface lo inet loopback

auto venet0:0
iface venet0:0 inet static
address 85.158.178.11
netmask 255.255.255.255
broadcast 0.0.0.0

Re: debian veth0 is always 127.0.0.1 [message #4761 is a reply to message #4759] Tue, 25 July 2006 19:52 Go to previous messageGo to next message
hvdkamer is currently offline  hvdkamer
Messages: 40
Registered: July 2006
Member
I didn't receive an answer on this topc:

http://forum.openvz.org/index.php?t=msg&th=817&start =0&

but it includes my script to remove the venet0:0 and give the venet0 the IP-adres you want. May be it is the solution to your problem?


Henk van de Kamer
auteur Het Lab
http://www.hetlab.tk/

[Updated on: Tue, 25 July 2006 19:53]

Report message to a moderator

Re: debian veth0 is always 127.0.0.1 [message #4762 is a reply to message #4759] Tue, 25 July 2006 19:55 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

@disaster, get a alternative "debian-add_ip.sh" script at:
http://forum.openvz.org/index.php?t=msg&goto=4378&#m sg_4378

(Its from hvdkamer) Wink

Regards,
Thorsten Schifferdecker
Re: debian veth0 is always 127.0.0.1 [message #4763 is a reply to message #4756] Tue, 25 July 2006 20:02 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member
Oh thanks - perhaps this explains why hvdkamer does'nt has it this way... Smile
Re: debian veth0 is always 127.0.0.1 [message #4767 is a reply to message #4756] Wed, 26 July 2006 05:41 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

Is it correct, that veth0 is always 127.0.0.1 because there's always the lo interface which has 127.0.0.1.


This is just the default behaviour of "add_ip-script" (/etc/vz/dists/scripts/redhat-add_ip.sh for redhat templates).
You can change it editing the decent file.

P.S.
Actually, this isn't veth device! This is venet device.
There is also veth device in OpenVZ. So I change the subject of your post, don't mind? =)
Re: *SOLVED* debian venet0 is always 127.0.0.1 [message #4776 is a reply to message #4756] Wed, 26 July 2006 07:36 Go to previous messageGo to next message
disaster is currently offline  disaster
Messages: 158
Registered: February 2006
Senior Member

OK thanks - but why it is like that? I think that's not correct - where's the advantage of this?

Re: debian veth0 is always 127.0.0.1 [message #4798 is a reply to message #4763] Wed, 26 July 2006 14:11 Go to previous message
hvdkamer is currently offline  hvdkamer
Messages: 40
Registered: July 2006
Member
disaster wrote on Tue, 25 July 2006 22:02

Oh thanks - perhaps this explains why hvdkamer does'nt has it this way... Smile


With a venet0:0 which also had IP-adress 127.0.0.1 (I just checked with the old script) I didn't have experience any problems, but then again I have not done much experiments with the old script. I changed it alsmost after everything worked, because I didn't like the complexity Smile.

I still would like to know if my way raise any problems later on. Or like you why the standard script does it in the way it does. What is the reasoning...


Henk van de Kamer
auteur Het Lab
http://www.hetlab.tk/
Previous Topic: SMTP-server does not respond with SMTP 220 message when connecting from openvz
Next Topic: *SOLVED* getcwd dows not work on vps after chroot
Goto Forum:
  


Current Time: Sat Aug 17 14:15:15 GMT 2024

Total time taken to generate the page: 0.02741 seconds