LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-14-2005, 01:49 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
How do I set the ip address for eth0, eth1 and the default gateway?


How do I set the ip address for eth0, eth1 and the default gateway?
In RedHat its
/etc/sysconfig/network-scripts/ifcfg-eth0
and
/etc/sysconfig/network-scripts/ifcfg-eth1
What is the equivelent of those files in SuSE?

What is the equivlent of the file the default gateway is stored in?
In redhat its /etc/sysconfig/network, what would it be in SuSE?

This is what my /etc/sysconfig/network directory has:
linux:/etc/sysconfig/network # ls
. config if-down.d ifcfg-eth-id-00:0f:ea:e0:86:84 ifcfg.template providers scripts update-log.debug
.. dhcp if-up.d ifcfg-lo ifroute-lo routes update-log wireless

This is what /etc/sysconfig has:
linux:/etc/sysconfig # ls
. autofs clock dhcrelay hotplug joystick lirc network postfix scripts suseconfig xntp
.. backup console displaymanager ide kernel locate news powersave scsidev susehelp ypbind
SuSEfirewall2 boot cron esound isdn keyboard mail nfs proxy security sysctl
apache bootloader cups fonts-config ispell language mdadm onlineupdate saslauthd sound syslog
apache2 bootsplash dhcpd hardware java ldap mouse personal-firewall sax ssh windowmanager

Thanks in advance!

(Note, im working remotely through the command line)

Last edited by abefroman; 05-14-2005 at 01:51 PM.
 
Old 05-16-2005, 02:31 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
The naming of the network devices has changed. ifcfg-eth-id-00:0f:ea:e0:86:84 is the configuration of the detected device. The gateway is set in routes.

The easiest way of configuration is with YaST, which also runs from command-line.
 
Old 05-17-2005, 06:05 AM   #3
Bikerpete
Member
 
Registered: Jun 2003
Location: Germany
Distribution: OpenSuSE, SLES, Debian, Ubuntu, Eisfair
Posts: 79

Rep: Reputation: 15
Hiho ...

If you wanna stay on the command-line, type "yast network" to go directly to the network-section of yast. Or just type in yast to have access to all settings.

Greetz

Pete
 
Old 05-18-2005, 07:20 PM   #4
ivanlime
LQ Newbie
 
Registered: May 2005
Posts: 3

Rep: Reputation: 0
i am also trying to figure out how to configure the default gateway. mind to tell me a bit in detail how to configure in yast. i tried it before but cant. thanks
 
Old 05-19-2005, 03:32 AM   #5
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
Configure gateway with YaST:

YaST -> Network Devices -> Network Card -> 'Change' -> 'Edit' -> 'Routing' -> enter gateway address

This is from the graphical YaST, but the menus should be named identical on command -line.
 
Old 05-19-2005, 04:15 AM   #6
barrythai
Member
 
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381

Rep: Reputation: 30
In a terminal type

ifconfig eth0 192.168.1.5

where 192.168.1.5 is a sample of the address you want to attach to the chip associated with eth0

type ifconfig to ensure it has worked

type route to see if you have a gateway this should have an ip with the ug designation
 
  


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
Same address on eth0 as eth1 matrixcubed Linux - Networking 2 05-23-2005 12:25 PM
How do you switch the default ethernet adapter (eth0 to eth1)? scoobdoobery Linux - Networking 3 09-05-2004 01:29 PM
how do I add script to set default gateway on boot for eth1 abg Linux - Networking 3 10-01-2003 05:22 PM
how to set which NIC is eth0, & which is eth1 roshko Linux - Networking 4 09-01-2003 11:08 AM
IP Address stuff and eth0 and eth1 jarmstrong Linux - Networking 4 01-05-2003 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:29 AM.

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