# Strange problem with connecting to server [SOLVED]

## oquol

Looks like my server refuses any connection unless both it's interfaces got their IP addresses.

My configuration:

1) router with configured dhcp server, nat, wan.

2) laptop with interfaces wlan0 and eth0. wlan0 obtains IP from router

3) server with interfaces eth0 and eth1. Both configured with dhclient.

What happens:

laptop connected via wlan0 (192.168.1.zzz) to router. Server connected via both eth0 (192.168.1.xxx) and eth1 (192.168.1.yyy) to router.

I login from laptop(wlan0) to server(eth0) via ssh. Then disconnect server's eth1 from router. Ssh still works, but if I try to relogin it says "ssh: connect to host 192.168.1.xxx port 22: Connection refused". Ping goes fine. If I reconnect server's eth1 to router I will be able to connect it again via ssh.

The same thing will happen if I use transmission-remote-gui instead of ssh.

What shout I change to make my server connectable via ssh without eth1 connected to anything.

----------

## NeddySeagoon

oquol,

Two interfaces (or more in the same subnet is broken *oquol wrote:*   

> both eth0 (192.168.1.xxx) and eth1 (192.168.1.yyy)

 

You will have two default routes and two router to get to 192.168.1.0/24.  Only one of there routes can ever be use and if you unplug it ...

If you really want to do that you need to set up bonding but every piece of equipment along the bonded route has to support bondind.

You can set an option in /etc/rc.conf to have the networking service considered up when any one interface is up.  The default is to require all interfaces to be up.

There are lots of comments in the file. Post back if you are seill having problems.

----------

## oquol

The only reason I have both interfaces connect to the same router was obtaining both of them with IP address. Actually I need only one of them connected.

 *NeddySeagoon wrote:*   

> You can set an option in /etc/rc.conf to have the networking service considered up when any one interface is up.  The default is to require all interfaces to be up.

 Ok. What exact option?

What I need is working ssh (so I could connect to server) when only one cable connected to server. And I don't want to remove net.eth1 from boot, so I could connect it somewhere if I needed it.

EDIT:

I guess I found this option  :Very Happy:  : rc_depend_strict.

I'll test it and report the results.

----------

## oquol

I have changed that option:

/etc/rc.conf

```
rc_depend_strict="NO"
```

NeddySeagoon, thank you for your help, so my "strange" problem is solved now.   :Very Happy: 

----------

