LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-28-2006, 07:47 PM   #1
jen_p_s
LQ Newbie
 
Registered: Nov 2005
Location: Australia
Distribution: Fedora Core 3, 4 and 5
Posts: 1

Rep: Reputation: 0
Question 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.

Cheers,

Jen
 
Old 08-29-2006, 12:00 PM   #2
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 31
What you need is routing
and this is a awesome how to ! Give it a try
 
Old 08-29-2006, 08:56 PM   #3
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
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.
 
Old 08-30-2006, 08:06 AM   #4
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Make static routes with "route add -net A.B.C.D netmask w.x.y.z dev eth<respective> for both of these two interfaces.
 
Old 09-09-2006, 08:35 PM   #5
Maleki
LQ Newbie
 
Registered: Sep 2006
Distribution: FC6
Posts: 11

Rep: Reputation: 0
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!)

Last edited by Maleki; 09-09-2006 at 08:53 PM.
 
Old 09-10-2006, 06:10 AM   #6
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
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.
 
Old 09-10-2006, 04:02 PM   #7
Maleki
LQ Newbie
 
Registered: Sep 2006
Distribution: FC6
Posts: 11

Rep: Reputation: 0
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
 
Old 09-11-2006, 02:17 AM   #8
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by Maleki
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftp - Can access FTP within office network BUT cant access via Internet! kokfei77 Red Hat 2 03-07-2012 07:24 PM
Debian Woody: Can't access internet through router, but can access network computers marales314 Linux - Networking 3 06-09-2006 12:33 PM
Network Internet access axelwing Linux - Newbie 4 05-30-2005 02:34 PM
Connection to access point OK, but cannot access the network/internet Nymphetamine Linux - Wireless Networking 29 01-13-2005 02:59 PM
help on network and internet access new2itall Linux - Networking 5 10-29-2004 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration