Author Topic: ip address  (Read 795 times)

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
ip address
« on: 18 August 2002, 00:32 »
how do i change the ip address of a certain ethernet card in Linux redhat?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
ip address
« Reply #1 on: 20 August 2002, 00:38 »
i find it odd that no one knows how to set an IP address. I only know that webmin can do it.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
ip address
« Reply #2 on: 20 August 2002, 02:12 »
I could have sworn I replied to this.  Did you post this question in another forum area or did I just reply to it in another forum area?

The command that configures the ethernet cards (including the IP address) on all Linux systems (and on most other UNIX systems) is "ifconfig".  However normally you set the addresses in a configuration file that a script will read and internally use the "ifconfig" command to set the IP address.

In RedHat the configuration files where you set the addresses for all of your network devices reside in /etc/sysconfig/network-scripts.  Since you have two ethernet cards you should have two configuration files. One would be called "ifcfg-eth0" and the other called "ifcfg-eth1".  Just edit the file assoctiated with the card you want to change and set the variable "IPADDRESS=xxx.xxx.xxx" to whatever you want.  If you change eth0 then the command to make it take effect would be:

# ifdown eth0
# ifup eth0
Someone please remove this account. Thanks...