Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to configure second NIC network card

Posted on 2008-10-04
7
Medium Priority
?
276 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
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

Independent Software Vendors: 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

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Make the most of your online learning experience.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

597 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