LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   routing between interfaces (https://www.linuxquestions.org/questions/linux-networking-3/routing-between-interfaces-4175679692/)

00x 07-31-2020 04:36 AM

routing between interfaces
 
I am using NetBSD not linux here but I'm pretty sure my problem is in not understanding networking, so the OS should be irrelevant.
I have read the other threads on this, but they didn't help.

Here is a diagram of the network:

Code:

  ||
  ||
[ISP-internet-modem/router]
[      (192.168.0.1)      ]
        ||
        ||
        ||
[(mue0 192.168.0.108) ]
[      NetBSD        ]
[      (ure0 10.0.0.0)]
                ||
                ||
                ||
[      (fxp0 10.0.0.2)]
[      OpenBSD      ]

NetBSD is connected to the ISP modem through it's ethernet port (mue0, ip 192.168.0.108)
NetBSD is connected to OpenBSD through a USB-to-Ethernet adapter (ure0, ip 10.0.0.0) to OpenBSD's ethernet port (fxp0 10.0.0.2)

OpenBSD can successfully ping 10.0.0.0 and 192.168.0.108,
but fails to ping 192.168.0.1 and anything on the internet.
(I have made OpenBSD's default gateway 10.0.0.0, "route add -inet default 10.0.0.0")
I hope to be able to replace OpenBSD with a switch or other computer, so it shouldn't need anything more than a gateway configured, NetBSD should be doing all the work.

I want NetBSD to be able to (route?, bridge?, forward?, proxy?)send traffic from ure0 to mue0.
(I don't understand how OpenBSD can ``see'' mue0's IP of 192.168.0.108 but not mue0's gateway of 192.168.0.1)

I have set
Code:

net.inet.ip.forwarding=1  => /etc/sysctl.conf
gateway_enable="YES"      => /etc/rc.conf

on NetBSD which is (apparently) all that is needed to enable routing.
Firewalls are off on NetBSD and OpenBSD.

I am not sure what the problem is, I don't know much about networking.

mredc 07-31-2020 07:15 AM

You do realize that you are using the network address "10.0.0.0" on ure0. I'm not sure about the route add statement but you need to to change "10.0.0.0" on ure0 to a host address in the range of "10.0.0.1 - 10.0.0.254" barring the address "10.0.0.2".

00x 07-31-2020 08:20 AM

Quote:

Originally Posted by mredc (Post 6151264)
You do realize that you are using the network address "10.0.0.0" on ure0. I'm not sure about the route add statement but you need to to change "10.0.0.0" on ure0 to a host address in the range of "10.0.0.1 - 10.0.0.254" barring the address "10.0.0.2".

Since I plan on that computer being a router, and that it's IP will be a gateway, and gateways are usually the `bottom' IP, I don't see how it is a problem.

mredc 07-31-2020 08:30 AM

Quote:

Originally Posted by 00x (Post 6151295)
Since I plan on that computer being a router, and that it's IP will be a gateway, and gateways are usually the `bottom' IP, I don't see how it is a problem.

You won't be able to use "10.0.0.0". Just try 10.0.0.1. It might save you some headaches.


All times are GMT -5. The time now is 09:30 AM.