# Help with Network (URGENT)



## Vinicius Agassi (Dec 10, 2015)

Hi dudes, so no I have a big problem with my dedicated server...

It was working perfectly, but then, I run the command `/etc/rc.d/netif restart` and my server falls...

My service provider has no experience with FreeBSD and provided me access to KVM / IP.

I need put this in configuration:

```
IP
Primary IP: 199.168.98.146
Primáry IP mask : 255.255.255.248
Gateway : 199.168.98.145

SECONDARY IP ADDRESS
SECONDARYS IPS: 199.168.98.146 - 199.168.98.150
MASKS : 255.255.255.248

BANDWIDTH AND MONTHLY TRANSFER [IMG]https://ci4.googleusercontent.com/proxy/2BC8JEg50d6ybpHQu_1W85MgfXQbEr2P69E20OlbeVkKCbmYDh6vfB_sLoYBOAP_F-Eo3iIjpIqd-bMeLdiIg_zzvs22Z-cXoFA=s0-d-e1-ft#https://pay.iw.ca/client/images/icons/icone.help.gif[/IMG]
Monthly transfer allocation : 20 TB
Port speed : 1 Gbps
```


----------



## ondra_knezour (Dec 10, 2015)

Type in `ifconfig`, which will show you current configuration of all network interfaces. You have to figure out, which interface you want to configure. Usually there would be one lo0 interface and one or more "real" interfaces, which have names according attached driver.

Then you would like to do something like

```
su
ifconfig <interface> 199.168.98.146/29 up
route add default 199.168.98.145
```
and your VM should be back online.

See ifconfig(8) and route(8) manual pages for more info.


----------



## Vinicius Agassi (Dec 10, 2015)

ondra_knezour said:


> Type in `ifconfig`, which will show you current configuration of all network interfaces. You have to figure out, which interface you want to configure. Usually there would be one lo0 interface and one or more "real" interfaces, which have names according attached driver.
> 
> Then you would like to do something like
> `su
> ...



Thanks, i will try!


----------



## Vinicius Agassi (Dec 10, 2015)

Noh, I have this problem


----------



## Vinicius Agassi (Dec 10, 2015)

someone can help me?


----------



## ondra_knezour (Dec 10, 2015)

Image isn't visible, at least for me.


----------



## wblock@ (Dec 10, 2015)

It's a broken image link.


----------



## Vinicius Agassi (Dec 10, 2015)

Hi again, the problem is: my service provider

I'm new on FreeBSD, so I will post my all networks configs

On e-mail, my service provide the config ips:


```
IP
Primary IP: 199.168.98.146
Primáry IP mask : 255.255.255.248
Gateway : 199.168.98.145

SECONDARY IP ADDRESS
SECONDARYS IPS: 199.168.98.146 - 199.168.98.150
MASKS : 255.255.255.248

BANDWIDTH AND MONTHLY TRANSFER [IMG]https://ci4.googleusercontent.com/proxy/2BC8JEg50d6ybpHQu_1W85MgfXQbEr2P69E20OlbeVkKCbmYDh6vfB_sLoYBOAP_F-Eo3iIjpIqd-bMeLdiIg_zzvs22Z-cXoFA=s0-d-e1-ft#https://pay.iw.ca/client/images/icons/icone.help.gif[/IMG]
Monthly transfer allocation : 20 TB
Port speed : 1 Gbps
```

But I don't have DNS names and hostname.

My configs:


`ifconfig`




rc.conf




/etc/hosts




resolv.conf


----------



## Vinicius Agassi (Dec 10, 2015)

Last error


----------



## ondra_knezour (Dec 10, 2015)

The last error isn't visible again. However screenshots in the previous post are OK.

From the easiest points:
- You can choose any hostname you want, for example agassi.
- If not provided with DNS servers from your provider, use anything freely available. For example Google have free DNS servers at 8.8.8.8 and 8.8.8.4
- Your em0 inteface has no carrier status, which is not what you want. On physical computer it means there is no live link with other device (e.g. switch). Did you tried commands I wrote above?


----------



## ondra_knezour (Dec 10, 2015)

Regarding your config files - you want to add following to the /etc/rc.conf file

```
ipv4_addrs_em0="199.168.98.146/29"
defaultrouter="199.168.98.145"
```

and this to the /etc/resolv.conf (remove/comment out existing domain domain line)

```
nameserver 8.8.8.8
nameserver 8.8.8.4
```

And then you can try to restart your VM.


----------

