Is there a way to display the IP my vm is using for DHCP?

34 posts / 0 new
Last post
gte
Is there a way to display the IP my vm is using for DHCP?

My network segments can ping and route via IP, but they cannot get out to the internet, or even to the physical host that my VM machines are running on. Is there a way to see if my Vyatta VM is obtaining an IP or not, when I run the show command it only tells me that

eth0 {address dhcp}

and I'd like to know if it is receiving and IP address so I can troubleshoot what is going on.

Mephi
Is there a way to display the IP my vm is using for DHCP?

The command 'show dhcp client leases' gives this.

On my router it shows:

vyatta@vyatta:~$ show dhcp client leases 
interface  : eth1
ip address : 172.16.10.253      [Active]
subnet mask: 255.255.255.0
router     : 172.16.10.254
name server: 194.168.4.100 194.168.8.100
dhcp server: 172.16.10.254
lease time : 3600
last update: Wed Sep 14 19:11:17 GMT 2011
expiry     : Wed Sep 14 20:11:17 GMT 2011
reason     : RENEW

Matt

gte
Is there a way to display the IP my vm is using for DHCP?

Hi Matt,

Thanks.

Mine says:

vyatta@vyatta:~$ show dhcp client leases 
interface   : eth0
last update: Wed Sep 14 15:25:41 GMT 2011
reason      : FAIL

Am I doing something wrong? I ran your command in the CLI, rather than the GUI. Will this show the DHCP information from the external facing NIC or the internal facing NICs?

Mephi
Is there a way to display the IP my vm is using for DHCP?

I believe it should show the IP addresses of all interfaces that have their addresses supplied by DHCP.

So I'd take it to mean that eth0 is failing to receive an IP address.

If you want to see what's going on then you can do a:
renew dhcp leases interface eth0
You can then run a packet capture on that interface to see if it's getting any DHCP responses.

Packet captures can be a bit fiddley, you should be able to do it with 'show interface ethernet eth0 capture' but I don't get anything from that on my VM, but the following commands work:

sudo su
tcpdump -i eth0

It's even better if you can have two terminal sessions running so you can have the tcpdump in one session and then trigger the dhcp renew in the other session, but as you're not getting the interfaces up yet that might not be an option.

Matt

JL
Is there a way to display the IP my vm is using for DHCP?

Total side note: Until you can get network up, if you have your Vyatta router hooked up to keyboard and monitor, you can hit Ctrl + Alt + F2 to switch over to a new terminal. Then login and start the tcpdump. Hit Ctrl + Alt + F1 to go back over to terminal tty1 and then run the renew command. Switching back and forth you can run commands and see the capture on another terminal. You could log in on tty3 and do a 3rd task, etc...

5716
Is there a way to display the IP my vm is using for DHCP?

JL wrote:
Total side note: Until you can get network up, if you have your Vyatta router hooked up to keyboard and monitor, you can hit Ctrl + Alt + F2 to switch over to a new terminal. Then login and start the tcpdump. Hit Ctrl + Alt + F1 to go back over to terminal tty1 and then run the renew command. Switching back and forth you can run commands and see the capture on another terminal. You could log in on tty3 and do a 3rd task, etc...

The "screen" program is another way to do multiple terminals. I think vyatta should add screen to the base ISO.

gte
Is there a way to display the IP my vm is using for DHCP?

Sweet, that is nice JL

The strange thing is that

renew dhcp leases interface eth0

does not work in my Vyatta iso (is there a cut and paste command?). I have Vyatta Core 6.1 2010.10.16 if that makes a difference?

Mephi
Is there a way to display the IP my vm is using for DHCP?

Does it tell you the command is wrong? You can do tab complete to see what options are available. That command has worked for me in all Vyatta releases since 5.

Matt

gte
Is there a way to display the IP my vm is using for DHCP?

I have to type sudo su or it doesn't recognize "renew" at all, when I type vyatta:/home/vyatta# renew [tab]
Possible competions
dhcp Renew DHCP client lease
dhcpv6 Renew a DHCPv6 lease

when I type
vyatta:/home/vyatta# renew dhcp [tab]

It gives no other completions and when I hit enter it says "Incomplete command" .

Any ideas?

Also is there a way to cut and paste?

Mephi wrote:
Does it tell you the command is wrong? You can do tab complete to see what options are available. That command has worked for me in all Vyatta releases since 5.

Matt

Mephi
Is there a way to display the IP my vm is using for DHCP?

Ok, that's odd.
I got the command slightly wrong, it's 'renew dhcp interface' but you should have still got that from your tab complete.

Can you post your Vyatta config and the output of 'show interfaces detail'?

Copy and paste depends on the terminal you're using to access the Vyatta system, in Putty on windows you can just highlight text and it automatically copies it.

Matt

gte
Is there a way to display the IP my vm is using for DHCP?

Hi Matt,

When I get into work I will try that command and paste those details. I will also see about the copy/paste, although I don't have a mouse in my terminal. I'm using whatever comes with the VMware Server app, which I guess is there version of a terminal. I'm booting off of an iso, as a virtual cd.

Mephi wrote:
Ok, that's odd.
I got the command slightly wrong, it's 'renew dhcp interface' but you should have still got that from your tab complete.

Can you post your Vyatta config and the output of 'show interfaces detail'?

Copy and paste depends on the terminal you're using to access the Vyatta system, in Putty on windows you can just highlight text and it automatically copies it.

Matt

pirateghost
Is there a way to display the IP my vm is using for DHCP?

you say you are running VMware SERVER?
or are you running ESXi?

there is a big difference and require a different configuration on the host machine.

i think what we need here is a basic network layout, and a copy of your configuration

you can get your configuration to copy/paste (the mouse will do absolutely nothing for you in the CLI on the 'console') by using an SSH session from another machine to it.

honestly, running it from the iso and not installing it is asking for trouble. first reboot and you have to reconfigure everything, or know how to use linux enough to backup your config elsewhere and reload it EVERYTIME you reboot.

gte
Is there a way to display the IP my vm is using for DHCP?

I'm running VMserver

I cannot get it to install and boot, from the cd.

I created a virtual disk in VMserver and made it 2gb on one of my data stores.

When I power up the VM, it just goes to PXE mode and loops and loops. I have my bios settings to boot from the hard disk so I'm not sure why it is doing this. Any ideas about this?

Here is the layout

pirateghost
Is there a way to display the IP my vm is using for DHCP?

so are you using VMWARE server or Hyper-V built into Server 2k8?

first and foremost, you need to figure out your VM environment. you should be able to install and run it from the virtual hard disk. if that isnt working, then you may have some bigger issues with your VM environment.

i would say that your vm not recognizing disk, would be related to the virtual disk interface. sounds like some problems with vm settings.

do you have your 'eth0' virtual interface bridged with your physical interface or is it set to host-only, or nat?

gte
Is there a way to display the IP my vm is using for DHCP?

I am using VMWare Server, version 2.0.2, build 203138

I will try and figure out why that doesn't want to install today, and have it fixed by end of day.

I have eth0 set up as "bridged to an automatically chosen adapter", a subnet of 255.255.255.0 and DHCP enabled. Internal DHCP is disabled at this point and NAT has not yet been configured.

pirateghost wrote:
so are you using VMWARE server or Hyper-V built into Server 2k8?

first and foremost, you need to figure out your VM environment. you should be able to install and run it from the virtual hard disk. if that isnt working, then you may have some bigger issues with your VM environment.

i would say that your vm not recognizing disk, would be related to the virtual disk interface. sounds like some problems with vm settings.

do you have your 'eth0' virtual interface bridged with your physical interface or is it set to host-only, or nat?

pirateghost
Is there a way to display the IP my vm is using for DHCP?

yuck.... vmware server ----shudders----

so your physical machine has how many network adapters on it?

do you have any dedication of physical nics to the vm?

just trying to get a feel for the actual configuration on your machine. i havent used vmware server in years because it is as stable as a 1 legged dog.

esxi/xenserver for a true hypervisor
or if you have to run it on a workstation, VMWare workstation/virtualbox.

if you dont have a machine you can dedicate to vyatta, i would recommend getting rid of the vmware server and going for a virtualbox option.

gte
Is there a way to display the IP my vm is using for DHCP?

I have 1 physical nic that I can bridge to, the physical box is a Dell 2650 server running Windows 2008.

It unfortunately cannot use esxi as it does not have hardware virtualization technology and it is 32 bit only.

Vyatta is strange, I'm seeing different commands for different versions and I don't know why they would do things that way, but that may be a deal breaker for me using it anymore.

pirateghost wrote:
yuck.... vmware server ----shudders----

so your physical machine has how many network adapters on it?

do you have any dedication of physical nics to the vm?

just trying to get a feel for the actual configuration on your machine. i havent used vmware server in years because it is as stable as a 1 legged dog.

esxi/xenserver for a true hypervisor
or if you have to run it on a workstation, VMWare workstation/virtualbox.

if you dont have a machine you can dedicate to vyatta, i would recommend getting rid of the vmware server and going for a virtualbox option.

pirateghost
Is there a way to display the IP my vm is using for DHCP?

gte wrote:
I have 1 physical nic that I can bridge to, the physical box is a Dell 2650 server running Windows 2008.

It unfortunately cannot use esxi as it does not have hardware virtualization technology and it is 32 bit only.

Vyatta is strange, I'm seeing different commands for different versions and I don't know why they would do things that way, but that may be a deal breaker for me using it anymore.

pirateghost wrote:
yuck.... vmware server ----shudders----

so your physical machine has how many network adapters on it?

do you have any dedication of physical nics to the vm?

just trying to get a feel for the actual configuration on your machine. i havent used vmware server in years because it is as stable as a 1 legged dog.

esxi/xenserver for a true hypervisor
or if you have to run it on a workstation, VMWare workstation/virtualbox.

if you dont have a machine you can dedicate to vyatta, i would recommend getting rid of the vmware server and going for a virtualbox option.

what different commands/different versions are you talking about?
the only changes i have seen have been for the better....to mature the product

honestly, i wouldnt try and deploy a production vyatta in vmware server. i dont blink twice when considering it in esxi though....

i think you should try and find a small system to use, it doesnt need to be very powerful at all, and give it a shot. you might be pleasantly surprised.

if you follow the documentation it will tell you pretty much anything you want to do

gte
Is there a way to display the IP my vm is using for DHCP?

An example would be with show interfaces, one piece of software was set up for

set interfaces ethernet eth1 address 10.10.11.1/24

the other did not accept the same syntax and I couldn't set the interface. If there is no backwards compatibility in the syntax, I don't want to learn different commands for different versions as that is just too confusing for me and too much effort for something that should be simplified.

One says - revision: 1.0.1 (3052M)

Another says - VC6.1-2010.10.16

Does that mean anything to you?

pirateghost wrote:
what different commands/different versions are you talking about?
the only changes i have seen have been for the better....to mature the product

honestly, i wouldnt try and deploy a production vyatta in vmware server. i dont blink twice when considering it in esxi though....

i think you should try and find a small system to use, it doesnt need to be very powerful at all, and give it a shot. you might be pleasantly surprised.

if you follow the documentation it will tell you pretty much anything you want to do

pirateghost
Is there a way to display the IP my vm is using for DHCP?

that really doesnt mean anything unless you are using an extremely old version.

the current version is 6.3

i dont really know what you are using. if you are using ONE VM, and ONE iso, there is only one version within that VM.

if you run 'show version' it will show you ONE version, because it can only run ONE OS at a time

you say, One piece of software, then you refer to another.....what exactly are you using?

If you dont know what software/vms you are using, virtualizing your router will be very problematic for you.

have you read the documentation and used the most current version?

gte
Is there a way to display the IP my vm is using for DHCP?

I was using a vm and an iso. The vm first and then the iso to start from scratch.

I had them booted at different times when I checked the versions. I have read the quick start and all other documentation that I could find.

pirateghost wrote:
that really doesnt mean anything unless you are using an extremely old version.

the current version is 6.3

i dont really know what you are using. if you are using ONE VM, and ONE iso, there is only one version within that VM.

if you run 'show version' it will show you ONE version, because it can only run ONE OS at a time

you say, One piece of software, then you refer to another.....what exactly are you using?

If you dont know what software/vms you are using, virtualizing your router will be very problematic for you.

have you read the documentation and used the most current version?

fromport
Is there a way to display the IP my vm is using for DHCP?

gte wrote:
the other did not accept the same syntax and I couldn't set the interface. If there is no backwards compatibility in the syntax, I don't want to learn different commands for different versions as that is just too confusing for me and too much effort for something that should be simplified.

One says - revision: 1.0.1 (3052M)
Another says - VC6.1-2010.10.16

Let me make an analogy
You want the same setup/commands from windows 1 (graphical environment on msdos) to still work on windows7 ?
Even though most of the software is completely rewritten ?
Vyatta VC4 (glendale) was almost rewritten from scratch with the switch from xorp to quagga as routing engine.

I think you should show your flexibility to learn new commands as technique improves. That is what differentiates you from others ;-)

gte
Is there a way to display the IP my vm is using for DHCP?

Let's use that analogy

Deviating from my perspective is what made windows Vista so hated, but that was through the gui changes. I can't think of an Xp command that does not work in 7. I am not using the first generation of Vyatta, I think there should be long standing backwards compatibility.

Even in 2008, with server manager ... I can still run compmgmt.msc due to good design and proper backwards compatibility, which originated at least to Windows 2000, maybe even with NT. I don't know if Vyatta has that type of compatibility as I did not see evidence of that, but it would be nice. It would be very easy to program an alias for a function, if the command did get changed and have the life cycle for that alias last 3 or 4 versions.

fromport wrote:
gte wrote:
the other did not accept the same syntax and I couldn't set the interface. If there is no backwards compatibility in the syntax, I don't want to learn different commands for different versions as that is just too confusing for me and too much effort for something that should be simplified.

One says - revision: 1.0.1 (3052M)
Another says - VC6.1-2010.10.16

Let me make an analogy
You want the same setup/commands from windows 1 (graphical environment on msdos) to still work on windows7 ?
Even though most of the software is completely rewritten ?
Vyatta VC4 (glendale) was almost rewritten from scratch with the switch from xorp to quagga as routing engine.

I think you should show your flexibility to learn new commands as technique improves. That is what differentiates you from others ;-)

fromport
Is there a way to display the IP my vm is using for DHCP?

gte wrote:
Let's use that analogy

But in that case you should use if fully, and not the part that is convenient to you !

Quote:
Deviating from my perspective is what made windows Vista so hated, but that was through the gui changes. I can't think of an Xp command that does not work in 7. I am not using the first generation of Vyatta, I think there should be long standing backwards compatibility.

You are comparing vyatta 1 to vyatta vc6.3.
In that case you should compare windows 1 with windows 7
http://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions

I assume if you would want to compare XP to win7, you should compare vc4 to vc6.3 and i think you will be surprised how much is still the same. Mostly command added, not changed (afaik)

Quote:
Even in 2008, with server manager ... I can still run compmgmt.msc due to good design and proper backwards compatibility, which originated at least to Windows 2000, maybe even with NT. I don't know if Vyatta has that type of compatibility as I did not see evidence of that, but it would be nice. It would be very easy to program an alias for a function, if the command did get changed and have the life cycle for that alias last 3 or 4 versions.

On later versions of vyatta (afaik) it does an import/convert of config to new setup. They also started to include version number in running config from some point, specifically for that.

So to the point:
You will not be able to import/run config from vc1 into vc6.3.
But neither are you able to run same commands in windows 7 vs win1.

gte
Is there a way to display the IP my vm is using for DHCP?

So you are saying they are so different that revision = version?

I figured VMware did that for another reason, or as their own revision of an existing version, I am surprised to learn that revision = version. Are you confirming that?

pirateghost
Is there a way to display the IP my vm is using for DHCP?

i am really confused now.

OP, you have a copy of version 1.x of Vyatta?
AND a copy of 6.1?

and you expect the same commands to work in both?

pirateghost
Is there a way to display the IP my vm is using for DHCP?

gte wrote:
So you are saying they are so different that revision = version?

I figured VMware did that for another reason, or as their own revision of an existing version, I am surprised to learn that revision = version. Are you confirming that?

wait, are you referring to VMWare revisions/version?

wtf?

gte
Is there a way to display the IP my vm is using for DHCP?

You and me both, I believe we are going to sort that out based on fromport's response about whether revision = version. I do not expect VERSION 1.x to be the same as 6.x.

pirateghost wrote:
i am really confused now.

OP, you have a copy of version 1.x of Vyatta?
AND a copy of 6.1?

and you expect the same commands to work in both?

fromport
Is there a way to display the IP my vm is using for DHCP?

gte wrote:
You and me both, I believe we are going to sort that out based on fromport's response about whether revision = version. I do not expect VERSION 1.x to be the same as 6.x.

*SORRY* for the mixup.

I really thought you were complaining that vyatta 6 didn't run/understand the config of vyatta 1.
It turns out you were referring to vmware 1 and vyatta 6
So it must be the lack of decent coffee or something to make me interpret that different.

Mea Culpa

gte
Is there a way to display the IP my vm is using for DHCP?

I downloaded a vmdk file of Vyatta, precreated by VMware for a virtual environment. In the show version, it says " revision: 1.0.1 (3052M) " . I downloaded another copy of the Vyatta iso file, straight from Vyatta and show version on that iso says " VC6.1-2010.10.16 " .

I'm trying to now rectify the verbage and see if they are indeed 5 versions apart, or if VMware revised a more newer version (then 1.x) and then had it print "revision 1.x" .

pirateghost wrote:
gte wrote:
So you are saying they are so different that revision = version?

I figured VMware did that for another reason, or as their own revision of an existing version, I am surprised to learn that revision = version. Are you confirming that?

wait, are you referring to VMWare revisions/version?

wtf?

gte
Is there a way to display the IP my vm is using for DHCP?

But just for the sake of clarity (I still may be the one that misunderstood something), it is VMwares vmdk of the Vyatta router software ... and I don't know if " revision 1.0.1 " means VMware revised version 1 of Vyatta version 1, or another version that is called revision 1.x . So to reiterate, VMware provided a download a customized version of the Vyatta router for their virtual environment.

I know this is needlessly confusing, but if there is another way to get information I'd be happy to do that. I ran show version both times and that was the information I was given.

fromport wrote:
gte wrote:
You and me both, I believe we are going to sort that out based on fromport's response about whether revision = version. I do not expect VERSION 1.x to be the same as 6.x.

*SORRY* for the mixup.

I really thought you were complaining that vyatta 6 didn't run/understand the config of vyatta 1.
It turns out you were referring to vmware 1 and vyatta 6
So it must be the lack of decent coffee or something to make me interpret that different.

Mea Culpa

fromport
Is there a way to display the IP my vm is using for DHCP?

gte wrote:
But just for the sake of clarity (I still may be the one that misunderstood something), it is VMwares vmdk of the Vyatta router software ... and I don't know if " revision 1.0.1 " means VMware revised version 1 of Vyatta version 1, or another version that is called revision 1.x . So to reiterate, VMware provided a download a customized version of the Vyatta router for their virtual environment.

I try and keep a copy of most released versions of vyatta at http://ftp.het.net/iso/vyatta/
Most of the different versions have vyatta-virtual-appliance-vcX.Y.Z.zip in the directories.
It's a pitty you started with revision/version 1 (unless you started in 2007 ;-) )

gte
Is there a way to display the IP my vm is using for DHCP?

I was given that by a coworker actually, and I don't know when they downloaded the vmdk from VMware.

The fact that you have the versions and related documents in the same directories is nice.

I'll compare on Monday and see what I can figure out here. At the very least I might be able to get the proper documentation (or verify that I have it) for the version I end up having. I'll post an update next week, thank you.

fromport wrote:

I try and keep a copy of most released versions of vyatta at http://ftp.het.net/iso/vyatta/
Most of the different versions have vyatta-virtual-appliance-vcX.Y.Z.zip in the directories.
It's a pitty you started with revision/version 1 (unless you started in 2007 ;-) )

pirateghost
Is there a way to display the IP my vm is using for DHCP?

ok. lol. that makes much more sense. apologies, i was scratching my head and wondering WTF?

i never use vmdks...i always use the virt-iso now. i see no purpose in a prebuilt appliance, when i have to reconfigure it to suit my needs anyway.

just so you know, the virt-iso you can get off the download page works excellently with esxi from my experience. i have used it in vmware workstation as well. you shouldnt have a problem with it in vmware server.

so that explains the confusion and the reason you are seeing different things.

stick with the official stuff from vyatta. ;)