What's new

[SOLVED] ifconfig add br0:net10 adding own routes?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

waeking

Regular Contributor
I have a qnap box on 192.168.1.241 with virtual hosts, I want to be able to access these host across the network. I have added these to my RT-AC68U running 384.5

Code:
ifconfig br0:net10 10.255.255.254 netmask 255.0.0.0 broadcast 10.255.255.255 up
ifconfig br0:net172 172.31.255.254 netmask 255.240.0.0 broadcast 172.16.255.255 up

this automatically adds routes
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.0.0      *               255.240.0.0     U     0      0        0 br0
10.0.0.0        *               255.0.0.0       U     0      0        0 br0

I need to route these to 192.168.1.241

Code:
route add 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.241 metric 10
route add 172.16.0.0 netmask 255.240.0.0 gw 192.168.1.241 metric 10
gives the error

Code:
route: netmask 00ffffff and host route conflict

Any ideas?
 
Code:
route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.241 metric 10
route add -net 172.16.0.0 netmask 255.240.0.0 gw 192.168.1.241 metric 10

You missed the -net switch.
 
Thanks, the final looked like this.

Code:
ifconfig br0:net10 10.255.255.254 netmask 255.0.0.0 broadcast 10.255.255.255 up
ifconfig br0:net172 172.31.255.254 netmask 255.240.0.0 broadcast 172.31.255.255 up
route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.241 metric 10
route add -net 172.16.0.0 netmask 255.240.0.0 gw 192.168.1.241 metric 10
route del -net 10.0.0.0 netmask 255.0.0.0 gw 0.0.0.0
route del -net 172.16.0.0 netmask 255.240.0.0 gw 0.0.0.0

Sometimes my eyes go funny, You miss that simple stuff!
 
Last edited:

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top