Solved

Need to configure second NIC network card

Posted on 2008-10-04
7
271 Views
Last Modified: 2013-12-23
I need to configure two cards in my Linux system: one connected to the local lan and one connected to the Internet. Does anyone have any expertise on this at the ifconfig and route add level? I've tried posting this twice before with no luck. If there is a taker, I will post details of my configuration.
0
Comment
Question by:jmarkfoley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Expert Comment

by:sciphre
ID: 22640765
Sounds like a very common setup, can you please explain what you intend for this to achieve?
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22640769
what linux system do you have?

most come with setup command that let you configure network cards
0
 
LVL 3

Expert Comment

by:cnjuguna
ID: 22641271
ifconfig and route will work as long as you do not reboot your system. for more permanent results you wil need to use a configuration program or directly edit some files.

pls post more info. linux version and your final scenario for farther assistance.
0
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 
LVL 12

Expert Comment

by:ibu1
ID: 22643521
From the above question I guess that u have problem with route add command.Below is the very good example for route add and how to make is persistant after rebooting the system:
echo "ip route add 172.16.0.0/24 via 192.168.0.3" >> /etc/rc.local
echo "ip route add 192.168.5.0/24 via 192.168.0.3" >> /etc/rc.local

THis is a very good method of appending lines to the /etc/rc.local file in linux. This file is like a autoexec.bat file and is executed every time you reboot. So next time you reboot, these two lines (i.e. the text inside the quotes.) will be present in this file and thus will be executed and you will again have your routes setup.


Cheers
0
 
LVL 5

Expert Comment

by:sciphre
ID: 22647409
ibu1: that's a very good way of doing it wrong.

You should always use the distribution's configuration files, unless you don't like the distribution.
In which case you should be using one you like.

One of the more obvious reasons why doing network initialization in rc.local is wrong is that rc.local is always the LAST file called.
Which means that your network will not be up when you're running firewall settings, daemon initialization, etcetera.
Some of these programs are often set up to "require network" and always make sure the networking scripts get run before they do. Guess what happens when you're not using the networking scripts.
The second obvious reason for why doing it in rc.local is wrong is the fact that you completely lose hotplug support and configurable reinitialisation.

Finally, reinventing the wheel and making it square in the process is just silly.
0
 
LVL 1

Accepted Solution

by:
jmarkfoley earned 0 total points
ID: 22745562
Gentlemen, thank you for your input, but I figured it out. The problem turned out to be none of the above.  The solution turned out to be that I needed to configure my NIC addresses in /etc/udev/rules.d/75-network-devices.rules, which is apparently new for slackware 12.0. When I did that, everything ran just fine and I didn't have to add routes or any such thing.
0
 
LVL 12

Expert Comment

by:ibu1
ID: 22747222
The comment I posted above is working very well in my network.I don't know the reason behind this comment posted by the author :-ibu1: that's a very good way of doing it wrong.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question