2 NICs, network access on one, internet on the other
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.
2 NICs, network access on one, internet on the other
Hi,
I'm not particularly knowledgeable about routing so I'm turning to you guys for a helping hand.
I have been using 2 NICs in a Fedora 5 machine, one connected to the corporate internal network using DHCP and one to an ADSL modem's ethernet interface used to access the internet via pppoe. When ppp0 is disabled, I can access the corporate network but when ppp0 is enabled I can access the internet and only our local segment.
Today I installed a Thomson 530 Internet Gateway for internet access. I can now get to the internet and our local segment, but I cannot get to the corporate network, even when I disable eth0, the interface to the 530. The 530 acts as a DHCP server for eth0 and establishes itself as the default gateway and DNS relay. Eth1 gets its info from the corporate network.
Here's what I am trying to achieve:
- simultaneous access to the corporate network via one NIC and access to the internet via the other NIC.
- access the local PC from four others on the corporate network and use it as their internet gateway for updates etc.
I can't just stick the 530 on our local switch and access it and the network via one NIC since the switch is connected to the corporate network and it would be quite likely that others discover this bonus internet gateway.
I'm reasonably hopeful that there is a means of achieving my aims with routing tables etc. but I don't know where to even start.
If you check your routing table with route, you'll probably notice that you have 2 default gateways...pick one or the other. Each NIC using DHCP will more than likely get assigned a default gateway from the DHCP server. This could confuse the computer on which route to take as a default.
Hey there. I've run across that problem and I solved it using 'route add default ...' from the console. The problem is that I have to type it in every time I reboot my machine. How can I make it so that it will route on every boot without me having to drop to the console every time.
oh and btw I've enabled ntp at boot so now booting takes forever! (because it can't get out!)
Put that 'route add ... ' command in any of the startup scripts; As i am not aware about your distro; @ redhat part; you can certainly put this command in /etc/rc.local to let it run automatically on every boot.
Sorry about that. I'm using FC5. Am I right in assuming that rc.local runs after everything else? I'm just wondering because I've got ntp enabled at boot and it'll hang there for quite a while if it can't reach a server.
Sorry about that. I'm using FC5. Am I right in assuming that rc.local runs after everything else? I'm just wondering because I've got ntp enabled at boot and it'll hang there for quite a while if it can't reach a server.
M
Place ntp in the same file as well then; just after your routing command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.