Solved 1 Host, 2 Interfaces, same network

Hey there,
I am new to FreeBSD, networking, and newer to the forums, so excuse me if this is a silly question or a repeat (i tried to search), but here it goes:

I have a server w/ 2 interfaces (igb0 and igb1) assigned IP X.X.X.2/24 and X.X.X.3/24.
igb0 is plugged into a serial device server (X.X.X.12/24) and igb1 is plugged into a switch (X.X.X.13).

igb0 (X.X.X.2) is working just fine. However, igb1 (X.X.X.3) cannot communicate with anything, even ping is failing.

I have not done any routing or further configuration.

Is there a problem having the two ports on the same network like this? What is causing igb1 to not be able to communicate?

Output of netstart -rn:
Code:
Destination                Gateway              Flags              Netif
127.0.0.1                    link#3                  UH                 lo0
X.X.X.0/24                  link#1                  U                    igb0
X.X.X.2                       link#1                  UHS                lo0
X.X.X.3                        link#2                 UHS                lo0
 
The problem with lagg(4) is that both cables need to go to the same device. So you should plug in both cables from the server to the switch and connect the serial device server also to the switch - which is, in my opinion, a better design anyway.

Not only will this result in a working setup, but using lagg(4) also adds redundancy to your network connections. Win-win.
 
Yes, you shouldn't do that. If you want to do this you should look into lagg(4) or bridge(4).

Because it's going to use igb0. Note your routing table, igb0 is the only interface that's "directly" connected to X.X.X.0/24.

How do I "directly" connect the other interfaces to X.X.X.0/24?

The problem with lagg(4) is that both cables need to go to the same device. So you should plug in both cables from the server to the switch and connect the serial device server also to the switch - which is, in my opinion, a better design anyway.

Not only will this result in a working setup, but using lagg(4) also adds redundancy to your network connections. Win-win.

I understand server>switch>device server is standard. But, I want to be able to connect to the serial device server even if the switch goes down. I already have redundancy built into the system in other ways. I want to know if this configuration is realizable and the best way to go about it (whether it be subnetting or different networks, something solvable by settings in software). If this is truly a bad setup, I can change it, but that is definitely not preferred.
 
How do I "directly" connect the other interfaces to X.X.X.0/24?
You don't because it's not possible to have two network interfaces on the same network. Think about it, how is the system going to determine which network interface to use to access the network?

But, I want to be able to connect to the serial device server even if the switch goes down.
Put your management interfaces on a separate network (OOB; Out-Of-Band management). For example, all your servers are on 192.168.1.0/24, your workstations on 192.168.2.0/24 and your management on 10.0.0.0/24 (preferably completely, physically, separated from the other networks).
 
Can you explain your network topology in more detail, please? What do you actually want to achieve with your setup? For example, is the switch connected to your uplink (i.e. it's your default router)? What exactly is the purpose of the “serial device server”, and why does it have to be on the same network? Is your server supposed to perform routing (or bridging) between those two interfaces?

As the others have explained, you cannot have two (or more) physical interfaces connected to the same network, because there is no way for the network stack to resolve the ambiguity. The only exception is link aggregation (lagg) for increasing the bandwidth and failover, but in this case both interfaces must be connected to the same switch (which must also support link aggregation)., and both interfaces have the same IP address, so this is clearly not what you want.
 
Can you explain your network topology in more detail, please? What do you actually want to achieve with your setup? For example, is the switch connected to your uplink (i.e. it's your default router)? What exactly is the purpose of the “serial device server”, and why does it have to be on the same network? Is your server supposed to perform routing (or bridging) between those two interfaces?

I am setting up an industrial control system. Both the switch and serial device server connect to end-points I want to control and automate. The FreeBSD server is where the automation software will be. The switch is also connected to a router so we can watch the system remotely.

Nothing has to be on the same network - all the devices have to be able to be monitored and controlled by the server.

From SirDice's explanation, it seems like I should have the switch on one network and the serial device server on another. Is this what you guys would recommend?
 
Nothing has to be on the same network - all the devices have to be able to be monitored and controlled by the server.

From SirDice's explanation, it seems like I should have the switch on one network and the serial device server on another. Is this what you guys would recommend?
Yes, exactly. If there's no reason to have the interfaces on the same network, then put them on separate ones. For example, you can split your /24 in half so you get two /25 subnets.

By the way, this is not FreeBSD-specific at all. It's the way TCP/IP works.
 
Last edited by a moderator:
Back
Top