Configuring two Internet gateways

Gateways and routing is something I can't get my head around.

If you want to connect to two different networks, 192.168.0.0 and 192.168.1.0 using two interfaces, em0 and ue0, can you set one as DHCP and the other as static and the adjust defaultrouter to change gateways?

Apologies for the newbie type questions.
 
Gateways and routing is something I can't get my head around.

If you want to connect to two different networks, 192.168.0.0 and 192.168.1.0 using two interfaces, em0 and ue0, can you set one as DHCP and the other as static and the adjust defaultrouter to change gateways?

Apologies for the newbie type questions.

Do you know the difference between forwarding and routing?
 
You can assign gateways using your dhcpd as well.

Unfortunately, I'm using a broadband router as dhcpd and don't have admin access to it.

I'm hoping to configure an alternative server using a Teltonika RUT955 router, but that is taking some time, although I may resort to using pfSense on a laptop, but don't have a spare router/switch. My RUT955 has four ports so I was hoping to set up a VLAN using two ports so I could test my pfSense setup, without interfering with my existing LAN.
 
There's some free courses in Cisco academy for networking. I advice you to start with them. Also you will get free access to the Cisco packet tracer which is great software for learning and if you like games you can try "Cisco Aspire Networking Academy Edition" It will simulate real word scenarios where you can learn by gameplay the basics of computer networking.

Regarding my first question about FIB and RIB you can check this short presentation
 
/etc/rc.conf
Code:
ifconfig_em0="DHCP"
ifconfig_ue0="inet 192.168.1.2 netmask 255.255.255.0 fib 1"
static_routes="fibue0"
route_fibue0="default 192.168.1.1 -fib 1"
/boot/loader.conf
Code:
net.fibs=2

DHCP will be the defaultrouter for em0 which is fib 0.
 
/etc/rc.conf
Code:
ifconfig_em0="DHCP"
ifconfig_ue0="inet 192.168.1.2 netmask 255.255.255.0 fib 1"
static_routes="fibue0"
route_fibue0="default 192.168.1.1 -fib 1"
/boot/loader.conf
Code:
net.fibs=2

DHCP will be the defaultrouter for em0 which is fib 0.
My head hurts when I try to figure out how all this works, and I'm not sure f I have it set up properly.

If I have things configured correctly, how could I use net/py-speedtest-cli aka speedtest to compare the speed of the two gateways?
 
speedtest-cli --source <ip>
Where the IP would be from either NIC, and the ue0 IP should get routed through fib 1.

I guess there are some versions of speedtest which have a -I option:
speedtest-cli -I ue0
 
Back
Top