?
Solved

Need to configure second NIC network card

Posted on 2008-10-04
7
Medium Priority
?
274 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
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 
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

Limited time offer using promo code EXPERTS25

Designed with a wealth of functionality and convenience, ATEN's new Thunderbolt™ 2 Sharing Switch takes your Thunderbolt setup to the next level. Now through August 31, 2017, Experts Exchange members get 25% off the US7220 on the ATEN USA eShop using promo code EXPERTS25.

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.
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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…

770 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