I am using RPI3 with raspbian and I have it connected to my personnal network via wifi (works fine) but I also connected it to company network with cable. Also I am new to RPi and Linux.
So I have two interfaces active wlan0 and eth0. I dont use DHCP for neither. Problem is that I am able to ping just some of my company devices, not all of them so I think the problem is with routers so I tried to setup my RPI as any other PC inside company network.
My eth0 should be:
IP: 172.23.125.128
Mask: 255.255.255.0
Gateway: 172.23.125.250
but when I run route -n
I get this:
0.0.0.0 192.168.1.1 0.0.0.0 UG 200 0 0 wlan0
0.0.0.0 172.23.125.250 0.0.0.0 UG 300 0 0 eth0
172.23.0.0 0.0.0.0 255.255.0.0 U 300 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 200 0 0 wlan0
As I said wlan0 is fine, metric works fine but I dont know why there is 172.23.0.0 and mask 255.255.0.0
I tried route add {ip} via {gw}
without any change. I also tried to change my dhcpcd.conf file which now looks like this:
interface wlan0
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
static domain_search=192.168.1.1
static ip_address=192.168.1.112
noipv6
metric 200
interface eth0
noipv6
metric 300
static ip_address=172.23.125.128/24
static routers=172.23.125.250
static domain_name_servers=
static domain_search=
But there is no way to setup netmask. So how should I do that?
EDIT
ip route result
default via 192.168.1.1 dev wlan0 src 192.168.1.112 metric 200
default via 172.23.125.250 dev eth0 src 172.23.125.128 metric 300
172.23.0.0/16 dev eth0 proto kernel scope link src 172.23.125.128 metric 300
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.112 metric 200
I cant ping 172.21.205.96 but I can ping 172.23.126.212