# Error in configuration network DHCP i cannot associate IP



## Twain (Nov 15, 2019)

Hey Forum Freebsd

I have a question if i configurate like this my machine with DHCP  but i cannot connect to PUTTY because i don`t know which IP adress is there already configurated 
please help me with this how to associate an IP adress to use in PUTTY .


----------



## Phishfry (Nov 16, 2019)

I like to use nmap to find the new IP:
`nmap -sP 192.168.1.1/24`
This will scan the 192.168.1.1 network for all machines.
Adjust IP to your gateway/dhcp server for your network.

Another method you can use is at the very end of FreeBSD bsdinstall you can drop to a post install shell.
Simply type `ipconfig` there to see what IP your network adapter is assigned.
Then type `exit` to finish.


----------



## Twain (Nov 16, 2019)

Phishfry said:


> I like to use nmap to find the new IP:
> `nmap -sP 192.168.1.1/24`
> This will scan the 192.168.1.1 network for all machines.
> Adjust IP to your gateway/dhcp server for your network.
> ...


I already used 
	
	



```
ifconfig
```
 and i see is this up adress 192.168.0.22 when i try to log in via PUTTY is says Connection error network still not working


----------



## Twain (Nov 16, 2019)

This is what i got  i try to use all 2 commands that you say but is seem like command not exists "ipconfig"


----------



## Twain (Nov 16, 2019)

I think that is the ip adress we should use to connect to PUTTY but i can not connect i don`t know why i have already enable PermitSSHLogin and still giving me same error when i try to connect on Putty  " Connection Error"


----------



## Phishfry (Nov 16, 2019)

Sorry that should have been `ifconfig`.
Nothing looks unreasonable from here.


----------



## gpw928 (Nov 16, 2019)

That "vtnet0" suggests to me that you are running FreeBSD inside a virtual machine.

If you have obtained 192.168.0.22 from a DHCP server, then the good news is that your networking works, at least on the local subnet (192.168.0.0/24).

Do you have any other Unix/Linux systems available to test from?

Can you ping 192.168.0.22 from any other host on the network?  Try as many as you can.

How have you configured the NIC for the VM on the virtualisation server?  There are usually a lot of options, some of which limit access.


----------



## SirDice (Nov 18, 2019)

Twain said:


> i try to connect on Putty " Connection Error"


You either get a "connection timed-out" or a "connection refused". If you get a "connection refused" make sure SSHD is actually running.


----------

