LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-20-2009, 06:34 PM   #1
webofunni
LQ Newbie
 
Registered: Jul 2006
Distribution: debian,mandriva,ubuntu
Posts: 15

Rep: Reputation: 0
network interface question in debian


Hi,

My system contains two nics.

1. On-board LAN card.
2. One PCI card.

My on-board LAN card get damaged after a short circute or something. So I purchased the PCI card. After inserting the PCI card, I started the system. Then executed 'ifconfig'. But the system was showing eth0 as my old LAN and the second NIC was not listed at all.

So I desabled the on-board LAN in BIOS and restarted the system. The 'ifconfig' shows only the loop back interfce. After trying some commands, I found :

Code:
dhclient3 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp3/dhclient.eth0.leases eth1
After executing that the ifconfig changes to :

Code:
debian:~# ifconfig 
eth1      Link encap:Ethernet  HWaddr 00:80:48:62:2a:33  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::280:48ff:fe62:2a33/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:129895 errors:169 dropped:0 overruns:0 frame:0
          TX packets:106324 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:171903761 (163.9 MiB)  TX bytes:11565616 (11.0 MiB)
          Interrupt:11 Base address:0xe800 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4962 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4962 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:297988 (291.0 KiB)  TX bytes:297988 (291.0 KiB)
After that I am able to access internet. But each time after the reboot I need to execute that command.

I need :

Code:
1. A permanent solution to configure the second card so that system will setup that automatically after each reboot
2. I want to make it as eth0 ( As you can see there is no eth0 but a eth1 )
How can I do that ?
 
Old 05-21-2009, 10:31 AM   #2
scheidel21
Senior Member
 
Registered: Feb 2003
Location: CT
Distribution: Debian 6+, CentOS 5+
Posts: 1,315

Rep: Reputation: 99
open up a text editor, like nano or vim in a terminal window (as root or using sudo), then view /etc/network/interfaces i.e.

localhost#nano /etc/network/interfaces

you should see something like below

Code:
  GNU nano 2.0.7          File: /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp






^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
^X Exit      ^J Justify   ^W Where Is  ^V Next Page ^U UnCut Text^T To Spell
add your other interface to the file, you can even just change the eth0 to eth1 and reboot or run /etc/init.d/networking restart the interfaces file is used when calling ifup which is executed when networking is brought up during boot. If you need to assign IP information statically, you can do a quick search for "static IP assignment debian network interfaces"
 
Old 05-21-2009, 02:21 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
another option if the onboard nic is disabled in BIOS is to edit the /etc/udev/rules.d/70-persistent-net.rules and change the mac address so the PCI card will come up as eth0...

it-lenny:/# cat /etc/udev/rules.d/70-persistent-net.rules
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.

# PCI device 0x14e4:0x170c (b44)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:a0:08:67:08", NAME="eth0"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Network interface stops responding - Debian Stable farslayer Debian 9 03-22-2012 06:11 AM
setting gateway for network interface (newbie question) Arrowx7 Linux - Networking 1 03-04-2007 10:06 AM
save network interface settings on debian with kde 3.5 sunpascal Linux - Newbie 2 02-03-2006 08:54 PM
KDE question about Network Browser in SuSe 9.2 Pro (debian) Lleb_KCir Linux - Software 5 04-19-2005 03:56 AM
Debian - Network Config Question ptesone Linux - Networking 4 04-04-2004 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:59 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration