Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> How do I change from debian eth0:0 to SL style?
spottyrover
 Posted: Jan 29 2014, 03:17 AM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









My friend set up my web server a long time ago using debian and virtualbox.
I am considering changing all my computers to fedora and use scientificlinux for the web server but I have no idea of how to change this file (/etc/network/interfaces) from debian to SL style.
I have installed SL6.4 liveminicd

Any help would be appreciated.

# 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
### For the Internet ###
allow-hotplug eth0
auto eth0
iface eth0 inet static
address 203.xxx.xxx.xxx
netmask 255.255.255.0
network 203.122.236.0
broadcast 203.xxx.xxx.255
gateway 10.3.3.1

auto eth0:0
iface eth0:0 inet static
address 10.3.3.99
netmask 255.255.255.0
network 10.3.3.0
broadcast 10.3.3.255
gateway 10.3.3.1


Thanks
Dave
PM
^
spottyrover
 Posted: Jan 30 2014, 07:11 AM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









First I don't know if I'm on the right track.
this looks like it might be except it did not work.

An article said to copy ifcfg-eth0 to ifcfg-eth0:0 then edit it.

I did not have an ifcfg-eth0 so I copied ifcfg-lo to ifcfg-eth0 and edited it to look like the article

"DEVICE=eth0
BOOTPROTO=static
IPADDR=10.3.3.49
BROADCAST=10.3.3.255
NETMASK=255.255.255.0
NETWORK=10.3.3.0
GATEWAY=10.3.3.1
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)

ONBOOT=yes
###NAME=loopback"

after a reboot I could ping the gateway ip but I could not use the internet


icfonfig -a
eth0 Link encap:Ethernet HWaddr 08:00:27:6A:AA:78
inet addr:10.3.3.49 Bcast:10.3.3.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6a:aa78/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3682 errors:0 dropped:0 overruns:0 frame:0
TX packets:3184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3564136 (3.3 MiB) TX bytes:360134 (351.6 KiB)

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:112 errors:0 dropped:0 overruns:0 frame:0
TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6720 (6.5 KiB) TX bytes:6720 (6.5 KiB)

any ideas would be welcome

Thanks
Dave
PM
^
spottyrover
 Posted: Jan 31 2014, 05:28 AM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









I am one step closer
I added DNS1=10.3.3.1
to the ifcfg-eth0 file
now I have a static ip which can surf the net

"DEVICE=eth0
BOOTPROTO=static
IPADDR=10.3.3.49
BROADCAST=10.3.3.255
NETMASK=255.255.255.0
NETWORK=10.3.3.0
GATEWAY=10.3.3.1
DNS1=10.3.3.1
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)

ONBOOT=yes
NAME=eth0"


Problem eth0 does not turn on at startup
Any ideas on how do I do that.


Thanks for your help.

Dave
PM
^
burakkucat
 Posted: Jan 31 2014, 03:36 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 204
Member No.: 14
Joined: 10-April 11









Here is a typical example --

TYPE=Ethernet
BOOTPROTO=none
IPADDR=
ip address
PREFIX=24
GATEWAY=
gateway address
DNS1=
DNS1 address
DNS2=
DNS2 address
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="
name by which you recognise this"
ONBOOT=yes


You will need to enter the relevant details at the points which I have shown in italics.

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
spottyrover
 Posted: Feb 2 2014, 01:02 AM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









Thanks Burakkucat for your help

But the network still did not startup at boot.
It does when I use a terminal

my ifcfg-eth0 file is

DEVICE=eth0
# needed to add DEVICE=eth0 to get it to start in the terminal
TYPE=Ethernet
BOOTPROTO=none
IPADDR=10.3.3.151
PREFIX=24
GATEWAY=10.3.3.1
DNS1=10.3.3.1
#DNS2=DNS2 address
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=eth0
ONBOOT=yes
#BROADCAST=10.3.3.255
#NETMASK=255.255.255.0
#NETWORK=10.3.3.0

Thanks
Dave
PM
^
burakkucat
 Posted: Feb 2 2014, 02:30 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 204
Member No.: 14
Joined: 10-April 11









Hmm . . . You mention --

QUOTE

But the network still did not startup at boot.
It does when I use a terminal

Please explain what you mean (just show the command(s) used) by "when I use a terminal".

I am now wondering if the problem you are still experiencing is due to which service(s) is (are) currently started and operational. There is the network service and the NetworkManager service. When both of them are enabled, they can cause problems by conflicting with each other . . .

The simplest thing would be to show the output produced by --

chkconfig --list | grep -i network

Depending upon the result, the solution may be quite straightforward.




--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
spottyrover
 Posted: Feb 5 2014, 06:37 AM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









If I remember corectly I could not start up the network using "ifup eth0" then
I read some where to remove "network manager" so I did.



Now after a boot I start the network with "ifup eth0"

This is the result after I have started the network

chkconfig --list | grep -i network
network 0:off 1:off 2:off 3:off 4:off 5:off 6:off

If I remember correctly this is different to what I had a while ago ( just to confuse things)

Thanks for your help

Dave

p.s. I noticed a couple of days ago that using eth0:0 is considered obsolete.
Am I on the right track

from another site
"Both the ifconfig command and the ethx:y syntax have been obsolete for more than a decade (since the 2.4 kernel came out).

The correct way to manually add an IP address to an interface is:
ip addr add 172.16.16.126/27 dev eth0

The correct way to set this up on a RedHat system is in the ifcfg-eth0 file add additional lines such as:
IPADDR2=172.16.16.127
NETMASK2=255.255.255.224

The correct way to list the IPs on a system is ‘ip addr ls’. The ifconfig command is not compatible with the modern networking features of the Linux kernel."
PM
^
burakkucat
 Posted: Feb 5 2014, 03:34 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 204
Member No.: 14
Joined: 10-April 11









QUOTE

chkconfig --list | grep -i network
network 0:off 1:off 2:off 3:off 4:off 5:off 6:off

That is the problem.

Please execute the following command line --

chkconfig --level 2345 network on

Now the networking sub-system will be active upon all subsequent system (re-)boots.

Don't worry about what you have read elsewhere. What you have configured is perfectly appropriate for SL 6. smile.gif

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
spottyrover
 Posted: Feb 5 2014, 11:06 PM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









Thanks
that works. I now have eth0 and eth0:0 working.
Noticed that I had renamed ifcfg-lo
Should I change it back or delete it?

Could the renaming of it be the cause of the large delay when highlighting text, right clicking the mouse (to copy and paste)

Dave
PM
^
burakkucat
 Posted: Feb 5 2014, 11:16 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 204
Member No.: 14
Joined: 10-April 11









I didn't realise you had renamed the loopback interface (ifcfg-lo) file! (I thought you had just used it as a template.)

So yes, please reinstate that file. Odd things will happen / certain actions will fail if it is not present.

This is the contents of my ifcfg-lo file --

CODE

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

You might find it useful to have a read of Section III of the RHEL 6 Deployment Guide, specifically chapter nine.

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
spottyrover
 Posted: Feb 5 2014, 11:30 PM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









You beat me back

after putting the last post I rememberd I working on a virtual box
So backed it up and just renamed the file back and yes that fixed the delay.


Now that I have learnt enough to start from scratch again
my web server uses a 386 debian image. Is there any advantage to running a 64 bit host over a 386 with pae kernel.
Is there any advantage to running 386 images over 64 bit.


My reasoning is that the 64bit uses twice the ram as a 386 bit effectively halving the amount of addressable ram you have.


Thanks for all of your help

Dave
PM
^
burakkucat
 Posted: Feb 5 2014, 11:51 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 204
Member No.: 14
Joined: 10-April 11









Hmm . . . starting to drift out of my comfort zone. blink.gif

However, if all the VMs you intend to run within VirtualBoxes on that host hardware will all be 32-bit then perhaps a 32-bit host will be sufficient.

That said, the native virtualization method for RHEL 6 (hence SL 6) is KVM . . . 64-bit then makes sense.

Perhaps other members, more familiar with virtualization, would care to advise?

(b*cat looks in a westerly direction towards toracat . . . wink.gif )

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
spottyrover
 Posted: Feb 5 2014, 11:57 PM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









Thanks for all of your help.
Have a good day

I will start a new post re virtualbox
How do I mark the post as solved?

Dave
PM
^
burakkucat
 Posted: Feb 6 2014, 12:05 AM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 204
Member No.: 14
Joined: 10-April 11









QUOTE (spottyrover @ Feb 5 2014, 11:57 PM)

How do I mark the post as solved?

As far as I know, you have just done so! biggrin.gif

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
toracat
 Posted: Feb 6 2014, 12:05 AM
Quote Post


SLF Geek
****

Group: Members
Posts: 302
Member No.: 11
Joined: 10-April 11









How much RAM does your host have? Running a PAE kernel would have some overhead (or performance penalty) although that may not be significant. Otherwise, there is no compelling reason to change to 64-bit. But as burakkucat pointed out, kvm is available only for 64-bit in SL.

--------------------
ELRepo: repository specializing in hardware support for EL
PMUsers Website
^
spottyrover
 Posted: Feb 6 2014, 12:23 PM
Quote Post


SLF Junior
**

Group: Members
Posts: 40
Member No.: 98
Joined: 25-April 11









QUOTE (toracat @ Feb 6 2014, 09:05 AM)
How much RAM does your host have? Running a PAE kernel would have some overhead (or performance penalty) although that may not be significant. Otherwise, there is no compelling reason to change to 64-bit. But as burakkucat pointed out, kvm is available only for 64-bit in SL.



currently 12 gig. problem is the backup machine is older amd x2 ( I don't even remember the rest) I think??
So I would prefer to use 366 unless there is a significant difference.
I have not tried kvm
would an amd a8-5600k be any good for a webserver ( low usage ) or would a fx 4130 be better?
currently using an x4 620

Dave
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll