LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-26-2007, 01:02 AM   #1
guelzimtr
LQ Newbie
 
Registered: Sep 2004
Distribution: Fedora 7
Posts: 15

Rep: Reputation: 0
Configuring two NIC cards in linux , one for internet and the other for private LAN


I have a computer with 2 NICs cards. one is wireless and the other is ethernet, how do I tell linux to use the wireless card for internet and the ethernet for the private lan. it is in the inverse situation now where linux uses the ethernet to access the internet.
 
Old 09-26-2007, 01:50 AM   #2
epicmove
LQ Newbie
 
Registered: May 2006
Posts: 13

Rep: Reputation: 0
I would recommend viewing the following article http://www.novell.com/coolsolutions/feature/11505.html. Regardless of distribution the principle is the same. Are you wanting this machine to serve as a dhcp server for your private network? I have a similar set up to this other than I have two ethernet cards.
My first ethernet card is set to dhcp and connects to my broadband router (network 192.168.160.0/24). My second card is set to a static IP address of 192.168.0.1 and serves as a dhcp server for other clients on the private network (192.168.0.0/24) - feed for private switch. When you have configured the dhcp server you need to enable port forwarding and either specify the address of your broadband router/interface or set up a static route of 192.168.0.1 > 192.168.160.1.
I am still fairly new to this so others may be able to offer better advice.
Hope that helps
Ben
 
Old 09-26-2007, 02:27 AM   #3
guelzimtr
LQ Newbie
 
Registered: Sep 2004
Distribution: Fedora 7
Posts: 15

Original Poster
Rep: Reputation: 0
i got the dhcp part to work as well as making the router get an ip address but I cant ping to the private lan.

any help
 
Old 09-26-2007, 01:02 PM   #4
epicmove
LQ Newbie
 
Registered: May 2006
Posts: 13

Rep: Reputation: 0
what address are you trying to ping and where from? You will only be able to ping a machine on your private lan from another machine on the same subnet i.e. pc001 on 192.168.0.10 can ping pc002 at 192.168.0.11 (unless blocked by firewall)
You should however be able to ping your router from a machine on your private network i.e. 192.168.0.10 can ping 192.168.160.1 (or whatever your router's lan address is) providing you have enabled IP forwarding and correctly entered the address of your router.

If you describe your setup in more detail I may be able to help you better:
What subnets are you using?
What is the address of your router?
What are the addresses of both your network devices (do an "ifconfig" to get this info)
Have you correctly configured your pc to be a dhcp server for other clients on your private network?
 
Old 09-26-2007, 01:55 PM   #5
guelzimtr
LQ Newbie
 
Registered: Sep 2004
Distribution: Fedora 7
Posts: 15

Original Poster
Rep: Reputation: 0
here's the topology:

DSL
|
Router(192.168.2.1)
|
|
My Box -----> Wlan0(192.168.2.101)
|
|
eth0(192.168.0.1)
|
DHCP
|
|
ROUTER(192.168.0.100)
|
|
Private LAN (192.168.0.x)


should the router(192.168.0.100) and the eth0 and the private LAN be in the same subnet 192.168.0 or should I choose a different subnet for both the router(thru DHCP) and the private LAN thru the web config interface.

Last edited by guelzimtr; 09-26-2007 at 01:59 PM.
 
Old 09-27-2007, 06:08 AM   #6
epicmove
LQ Newbie
 
Registered: May 2006
Posts: 13

Rep: Reputation: 0
not quite sure what you are using another router for? is this a router or just a switch?
Your PC provides the routing between the two networks. If you are wanting to use the 192.168.0.100 router as your switch, you will need to make sure that it is not set up as a dhcp server as it is possible your clients are picking up an IP from this rather than your box (192.168.0.1).
Other than that it looks okay to me
 
  


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
Private LAN accessing the Internet - Using route, how do I use it? sbabcock23 Linux - Networking 2 05-19-2007 03:21 PM
cannot reach internet from private LAN toodr Linux - Networking 12 10-23-2005 07:44 PM
Route a private LAN with 1 NIC freelinuxcpp Linux - Networking 4 11-01-2003 05:05 AM
configuring dual NIC cards Kris_mayco Linux - Hardware 2 08-21-2003 02:19 PM
Multiple NIC cards - public and private IPs harryinjapan Linux - Networking 2 12-02-2001 04:25 AM

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

All times are GMT -5. The time now is 10:32 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