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.
ls -al /etc/sysconfig/network-scripts/ | grep ifcfg
If for security reasons you want to mask the IP just change the first octet. I mean if you are using 192. then you can change it to 10. or 172. Please do not change the subnet mask or anything else as it might be more confusing for me.
As per your suggestion i turned off NetworkManager and created below files:
-created ifcfg-eth1 with device set to eth4
-created also ifcfg-eth2 with device set to eth3
The default settings of ifcfg-eth0 i never do anything i just leave the default config.
and reboot the VM works like magic...
route -n shows this one, below no more 192.168.2.1 gateway but the subnet still accessible using the 192.168.1.1 gateway..
Quote:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth3
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth4
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth3
Maybe I can conclude that NetworkManager could be messing up.
And the ifconfig should be set in sequence like ifcfg-eth0 then ifcfg-eth1 then ifcfg-eth2 and so on..
Yes, when making configuration change via files it is better to keep NetworkManager off. As I mentioned earlier NetworkManager is a legacy tool. It is there for the people who are new to Linux to give gui / tui access in order to setup the network.
NetworkManager has got drawbacks as well for example you cannot configure alias IP on the interface with NetworkManager running. It simply mess it up.
Yes, when making configuration change via files it is better to keep NetworkManager off. As I mentioned earlier NetworkManager is a legacy tool. It is there for the people who are new to Linux to give gui / tui access in order to setup the network.
NetworkManager has got drawbacks as well for example you cannot configure alias IP on the interface with NetworkManager running. It simply mess it up.
Yes, thank you. Command line works great..but of course need to know what to type..hehehe...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.