LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Configuring two NIC cards in linux , one for internet and the other for private LAN (https://www.linuxquestions.org/questions/linux-networking-3/configuring-two-nic-cards-in-linux-one-for-internet-and-the-other-for-private-lan-587399/)

guelzimtr 09-26-2007 01:02 AM

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.

epicmove 09-26-2007 01:50 AM

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

guelzimtr 09-26-2007 02:27 AM

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

epicmove 09-26-2007 01:02 PM

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?

guelzimtr 09-26-2007 01:55 PM

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.

epicmove 09-27-2007 06:08 AM

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


All times are GMT -5. The time now is 06:27 PM.