eth0 fixed IP. eth1 DHCP gateway. Need access to eth0
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I guess we should give this a new start. Restart the machine and see what routes are available. Then just add an extra route for that 192.168.1.6.
What I'm not sure of is which route takes precedence. I might just be that the extra route for the 192.168.1.6 host comes after the route entry for the network 192.168.1.0/24.
I'll see if I can dig some up on this
Just a sitenote to be not confused with those extra names of route try route -n so you just get the numbers.
i just noticed something; you have a 192.168.1 network and you also have a 192.16.1 (eth0) network; is that correct? and the ip address of the controller you're trying to communicate to has an ip address 192.168.1.6? or is it 192.16.1.6?
I think i missed some parts of your post. could you give us an overview of your nw again, with ip addresses and the specific route you're trying to setup?
I have been misreading your IP address for eth0. It is on the 192.16.1.0 network. The device is on the 192.168.1.0 network.
Is 192.168.1.6 a typo?
Things would work out a lot better if your lan used 192.168.0.0 instead, or if you connected the device to a switch on the 192.168.1.0 LAN. This would eliminate the need for a host route.
One thing you could try is shut down eth1, and leave eth0 up on 192.168.1.20 and see if netcat works then.
I have been misreading your IP address for eth0. It is on the 192.16.1.0 network. The device is on the 192.168.1.0 network.
Is 192.168.1.6 a typo?
I do not know where 192.16.1.0 is derived from. I agree it looks like a typo and could probably be removed but as I said before I cannot find the file in which it resides.
192.168.1.6 is not a typo - it is the fixed IP address of the controller board hard linked into eth0.
Quote:
Things would work out a lot better if your lan used 192.168.0.0 instead, or if you connected the device to a switch on the 192.168.1.0 LAN. This would eliminate the need for a host route.
A switch is not an option because of the physical restraints and breaking backward compatibility.
Why would 192.168.0.0 be a better option?
Quote:
One thing you could try is shut down eth1, and leave eth0 up on 192.168.1.20 and see if netcat works then.
This is how it was previously and it works just fine with eth0 as the default gateway (even if eth1 is enabled).
This is how it was previously and it works just fine with eth0 as the default gateway (even if eth1 is enabled).
After reading this I dare to say that if you would delete the 192.168.1.0/24 route on the eth1 device you should be set. The problem here is that if you need any other computer in this network.
This also might be done by completly deleting the routes to the 192.168.1.0/24 network on both devices and set up host routes for all computers you need/want to talk to.....
After reading this I dare to say that if you would delete the 192.168.1.0/24 route on the eth1 device you should be set. The problem here is that if you need any other computer in this network.
This also might be done by completly deleting the routes to the 192.168.1.0/24 network on both devices and set up host routes for all computers you need/want to talk to.....
That sounds fine but if I had any idea how to modify the "default" routes already set up I would happily do so. As I already have said WTF are these routes set and in what file?
They certainly don't show in Network Manager GUI and none of the suggested paths/files contain this information.
Eth0 was set up with the wrong IP address. You probably mistyped it when configuring the device (by not typing the 8). Change it from 192.16.1.20 to 192.168.1.20.
The routes for the 192.168.1.0/24 networks are setup automatical when the two devices get their IP and are set up (don't pin me on the order ). The default route normaly gets set through the dhcp client on eth1.
Take a look at /etc/network/if-up.d there are scripts that are run when a nic comes up. Just add your own script that kills the two route for the 192.168.1.0/24 network. Leave the default route as is and add a route to the 192.168.1.6 host...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.