LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-23-2005, 04:04 AM   #1
haodongdong
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
trouble with redhat-network-config and ifconfig


i have to change my ethernet card's MAC addr ,to avoid changing it every time after reboot ,i add the
ifconfig commands:
ifconfig eth0 down
ifconfig eth0 hw ether XX:XX:XX:XX:XX:XX
ifconfig eth0 up
to the file
/etc/rc.d/rc.local
However it dosen't work .That's one thing i'am puzzled ,and the following is another :
if i run the ifconfig command directly in the console ,it dosen't work!
However, the redhat-config-network can work only if the 'ifconfig' commands have been added to the file /etc/rc.d/rc.local.
So how does redhat-config-network do the job changing MAC address and give such a puzzle ??

Thanks
 
Old 09-23-2005, 10:10 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You probably need to edit your ifcfg for the interface. For etho it is:

/etc/sysconfig/network-scripts/ifcfg-eth0

On my RedHat AS3 this looks like:
# Intel Corp.|82541EI Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=none
BROADCAST=xx.xx.xx.255
HWADDR=xx:xx:xx:xx:xx:xx
IPADDR=xx.xx.xx.xx
NETMASK=255.255.255.0
NETWORK=xx.xx.xx.xx
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
GATEWAY=xx.xx.xx.1
ETHTOOL_OPTS="autoneg off speed 100 duplex full"


the HWADDR line is where the MAC address would be. You can run ifdown eth0 then ifup eth0 to stop and start just this interface.

The ETHTOOL_OPTS is something I added so it turns off autonegotiate and hard sets the speed to 100 and the duplex to full.
 
  


Reply



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
redhat-config-network and trouble Pedroski Linux - Software 1 04-18-2004 12:48 PM
Redhat Config Network Keynote Linux - Newbie 0 03-02-2004 10:39 PM
redhat 8 printer config trouble unclegerry Linux - General 2 09-01-2003 04:26 PM
redhat-config-network jimmye68 Linux - Networking 1 08-23-2003 08:57 PM
Network Config Trouble GabeF Linux - Networking 0 09-06-2002 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09: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
Open Source Consulting | Domain Registration