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 have a server running CentOS 7 and I connect to it by ssh. SSH takes a little bit to connect compared to the other server I have setup. This server has 2 ethernet ports (1 motherboard and 1 card). I use the card to create a bridge network for Kvm virtual machines and it works fine. There are times I can't ping or if I use the route command it hangs. I think it has to do with the default gateway for the main ethernet port.
Route when having issues
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.1.1.3 0.0.0.0 UG 0 0 0 br0
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 em1
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
link-local 0.0.0.0 255.255.0.0 U 1002 0 0 em1
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
then I run sudo route add default gw 10.1.1.3 em1 or sudo route add default gw 10.1.1.3
Quote:
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.1.1.3 0.0.0.0 UG 0 0 0 em1
default 10.1.1.3 0.0.0.0 UG 0 0 0 br0
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 em1
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
link-local 0.0.0.0 255.255.0.0 U 1002 0 0 em1
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
I have added the default gateway to the /etc/sysconfig/network file, but still have issues.
Quote:
sudo cat /etc/sysconfig/network
# Created by anaconda
GATEWAY=10.1.1.3
Any ideas?
Thanks for the help.
P.S. I know that they should be static ip addresses and I'm working on it, but having to wait on the net admin.
First off you should not have two Default gateways.
Looking at what you have posted above it looks like the machine doesn't know what interface to use you have to clean up your network configuration. You should not be using the same network on both interfaces.
Right now or at least what I want is to have em1 dedicated to the main server and then p4p1 is being used for a bridge connection for Kvm virtual machines so br0 for vms. The server has 2 network cards one on the motherboard and one as a network card. Those cables go into a switch.
So what do I need to do to fix it? Sorry network knowledge is lacking, but I need to fix it.
P.S. I don't know if this matters or not, but some of the vms are only access local on the network while others have static ips setup for access outside of the network.
Sorry, but how do I do that and to what network then? since both of them still need to be accessed from outside the network and be able to access the outside network.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.