Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> How to enable eth1?
yellowhat
 Posted: Nov 23 2011, 08:33 AM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









How to enable eth1?


My box is scientific linux 6.1 x64.


I tried to start dhcpd, but failed.

CODE
[root@RedLeoWebDev bin]# service dhcpd start
Starting dhcpd:                                            [FAILED]
[root@RedLeoWebDev bin]# service dhcpd restart
Starting dhcpd:                                            [FAILED]
[root@RedLeoWebDev bin]# dhcpd -d
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 leases to leases file.

No subnet declaration for eth1 (192.168.0.4).
** Ignoring requests on eth1.  If this is not what
  you want, please write a subnet declaration
  in your dhcpd.conf file for the network segment
  to which interface eth1 is attached. **


Not configured to listen on any interfaces!

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
   http://bugzilla.redhat.com

exiting.


So I opened "system-config-network", but there is not "eth1".

user posted image

The ifconfig is this.
CODE

[root@RedLeoWebDev Documents]# ifconfig
eth1      Link encap:Ethernet  HWaddr 08:00:27:3A:F7:6C  
         inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0
         inet6 addr: fe80::a00:27ff:fe3a:f76c/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
         RX packets:652491 errors:0 dropped:0 overruns:0 frame:0
         TX packets:202708 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:590783907 (563.4 MiB)  TX bytes:14016284 (13.3 MiB)

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



Thanks in advance.
PM
^
Code_Warrior
 Posted: Nov 24 2011, 12:11 PM
Quote Post


SLF Junior
**

Group: Members
Posts: 30
Member No.: 431
Joined: 12-July 11









So just choose "<new device>" in system-config-network and add eth1.
After that you can look in /etc/sysconfig/network-scripts/ifcfg-eth1 and check BOOTPROTO="dhcp"
Next sudo ifconfig eth1 up
PMEmail PosterIntegrity Messenger IMICQ
^
yellowhat
 Posted: Nov 25 2011, 01:08 AM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









I can manage to change eth1 to eth0, and the "/etc/sysconfig/network-scripts/ifcfg-eth0" is here.

CODE
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="08:00:27:D3:08:DB"
NM_CONTROLLED="yes"
ONBOOT="yes"


And I opened system settings - network settings, but there is another problem:
network settings "your system is not supported" at system settings.
user posted image
PM
^
Code_Warrior
 Posted: Nov 25 2011, 06:48 AM
Quote Post


SLF Junior
**

Group: Members
Posts: 30
Member No.: 431
Joined: 12-July 11









What version of KDE do you use? This version is stable?
Can you choose RedHat or CentOs in that list of supported systems?
PMEmail PosterIntegrity Messenger IMICQ
^
helikaon
 Posted: Nov 25 2011, 09:22 AM
Quote Post


SLF Moderator
******

Group: Moderators
Posts: 540
Member No.: 4
Joined: 8-April 11









Hi yellow smile.gif
from your post, i think we should start to clear network settings at first and after we have our network setup OK, then we can start to run network services like e.g. dhcpd.

1. i will presume, your box is server, supplying services on some kind of LAN. Services, like you mention dhcp, nfs, ftp, ssh etc etc.

If my presumption is right, then:

1. do (if you haven't done already)
mv /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth0

2. stop NetworkManager and let your network be managed only by 'network':

service NetworkManager stop
chkconfig NetworkManager off

3. start 'network' service
service network start
chkconfig network on

note: these last 2 steps do on servers, if you have laptop, it's good to have NM running to run 'ifup / ifdown' network scripts while accessig e.g. wifi networks in netcafes etc ...

4. change
/etc/sysconfig/network-scripts/ifcfg-eth0
e.g. like this:
CODE

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.0.2
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
HWADDR=00:0F:22:71:0A:53
USERCTL=no
PEERDNS=yes


reason for this is, that if you want to run DHCP service on the same box, you can't point your own network card to get IP from this service
why: because your network scripts initialize you network card first (of course) and while this process is underway, it looks for IP at your DHCP, but this service starts *after* your network card, so at the boot your netw, card can't get ip, getting it late and also while the DHCP service start it needs to have your network properly configured ... so you see the problem (cycle)

5. check you dhcpd config if it is setup properly

6. codewarrior asked about kde version - this could have impact while you try to edit over GUI tools, but if you edit using 'vi' or 'vim' you dont have to care ...


hope, this helps smile.gif



cheers,


--------------------
PMEmail Poster
^
yellowhat
 Posted: Nov 25 2011, 02:04 PM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









Code_Warrior/

I don't know the version of KDE, but I installed latest version.

CODE

[root@rainbowWebDev linux_apps]# uname -a
Linux rainbowWebDev 2.6.32-131.21.1.el6.x86_64 #1 SMP Tue Nov 22 14:15:09 CST 2011 x86_64 x86_64 x86_64 GNU/Linux


About "choose RedHat or CentOs in that list of supported systems", you can see this photo.

user posted image
user posted image


helikaon/

At "3. start 'network' service", the result of this tage has "failed" message.

CODE

[root@rainbowWebDev linux_apps]# service network start
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  
Determining IP information for eth0...dhclient(1479) is already running - exiting.

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
   http://bugzilla.redhat.com

exiting.
failed.
                                                          [FAILED]
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
[root@rainbowWebDev linux_apps]#
PM
^
yellowhat
 Posted: Nov 25 2011, 02:56 PM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









Ok I solved "service network start" problem by killing process with this command.

QUOTE
ps -eLF | grep dhclient


And I edited "/etc/sysconfig/network-scripts/ifcfg-eth0".

CODE
DEVICE=eth0
BOOTPROTO=none
IPADDR=192.168.0.4
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
HWADDR=08:00:27:d3:08:db
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no


But, still dhcpd cloud not start.

CODE

[root@rainbowWebDev linux_apps]# ifconfig eth0 down
[root@rainbowWebDev linux_apps]# ifconfig eth0 up
[root@rainbowWebDev linux_apps]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]
[root@rainbowWebDev linux_apps]# service dhcpd start
Starting dhcpd:                                            [FAILED]
[root@rainbowWebDev linux_apps]# dhcpd -f
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 leases to leases file.

No subnet declaration for eth0 (192.168.0.4).
** Ignoring requests on eth0.  If this is not what
  you want, please write a subnet declaration
  in your dhcpd.conf file for the network segment
  to which interface eth0 is attached. **


Not configured to listen on any interfaces!

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
   http://bugzilla.redhat.com

exiting.
PM
^
helikaon
 Posted: Nov 25 2011, 03:27 PM
Quote Post


SLF Moderator
******

Group: Moderators
Posts: 540
Member No.: 4
Joined: 8-April 11









Hi yellow,
as i said, step by step smile.gif
As we now have eth0 firmly declared, now we can continue with dhcp configuration.
Paste here your dhcpd config.
You can have a look at mine. I run dhcpd service on my home LAN server:

CODE

root@epsilon etc]$ cat /etc/dhcpd.conf                      
#                                                            
# DHCP Server Configuration file.                            
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample              
#                                                            

ddns-update-style interim;
ignore client-updates;

subnet 192.168.100.0 netmask 255.255.255.0 {

# --- default gateway
       option routers                  192.168.100.1;
       option subnet-mask              255.255.255.0;

#        option nis-domain               "domain.org";
#        option domain-name              "domain.org";
#        option domain-name-servers      192.168.1.1;
        option domain-name-servers      213.168.176.3;

#        option time-offset              -18000; # Eastern Standard Time
#       option ntp-servers              192.168.1.1;
#       option netbios-name-servers     192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#       option netbios-node-type 2;

       range dynamic-bootp 192.168.100.150 192.168.100.250;
       default-lease-time 21600;
       max-lease-time 43200;

       # we want the nameserver to appear at a fixed address
#        host ns {
#                next-server marvin.redhat.com;
#                hardware ethernet 12:34:56:78:AB:CD;
#               fixed-address 213.168.176.3;
#        }
}



as you can see i have very similar scenario to yours, only my subnet IP different.
My DNS server is server of my ISP (i dont run any DNS server at home)....
Probably you miss in your config exactly what your box complains about -> subnet specification ...

cheers,


--------------------
PMEmail Poster
^
yellowhat
 Posted: Nov 25 2011, 03:53 PM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









This is my dhcpd.conf.

[CODE]authoritative;
include "/etc/rndc.key";
# Server configuration:

server-identifier server;
ddns-domainname "test.dyndns.org.";
ddns-rev-domainname "in-addr.arpa.";
ddns-update-style interim;
ddns-updates on;
ignore client-updates;

# This is the communication zone
zone hanpedro.dyndns.org. {
primary 127.0.0.1;
key rndckey;
}
default-lease-time 21600; # 6 hours
max-lease-time 43200; # 12 hours

# Client configuration:
option domain-name "test.dyndns.org.";
option ip-forwarding off;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option routers 192.168.0.0; # default gateway
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name-servers 192.168.0.0;
zone 0.168.192.in-addr.arpa. {
primary 192.168.0.4;
key rndckey;
}
zone localdomain. {
primary 192.168.0.4;
key rndckey;
}
} [/CODE}
PM
^
helikaon
 Posted: Nov 26 2011, 06:45 AM
Quote Post


SLF Moderator
******

Group: Moderators
Posts: 540
Member No.: 4
Joined: 8-April 11









hi,
first thing to fix that i can see at 'first look' smile.gif

CODE

option routers 192.168.0.0; # default gateway
option domain-name-servers 192.168.0.0


-default gateway cant be with '0' at the end - this means whole subnet, you need spec. exact IP of your gateway
-same thing with dns - what is your dns server IP? you need to specify it too ..

cheers,


--------------------
PMEmail Poster
^
yellowhat
 Posted: Nov 26 2011, 01:05 PM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









I have used this files many years only changingprimary ip without any problem.

Anyway, I'll test.
PM
^
helikaon
 Posted: Nov 28 2011, 09:11 AM
Quote Post


SLF Moderator
******

Group: Moderators
Posts: 540
Member No.: 4
Joined: 8-April 11









QUOTE (yellowhat @ Nov 26 2011, 01:05 PM)
I have used this files many years only changingprimary ip without any problem.

Anyway, I'll test.

Oki,
let as know how you fare with this smile.gif

cheers,


--------------------
PMEmail Poster
^
yellowhat
 Posted: Jan 9 2012, 11:38 AM
Quote Post


SLF Member
***

Group: Members
Posts: 76
Member No.: 707
Joined: 18-August 11









helikaon/

Sorry for late answering for your kind comment.

This is the link of the guide which I learned how to set up dynamic dns at linux.

guide

I used this guide several years, but whenever I reinstall linux, I makes mistakes and gets difficulties. So I backup these files and restore them, but most of times I got errors in setting up.

At this time, I could repair this error by changing internet sharing modem.

Thanks a lot for your kind attention.
PM
^
helikaon
 Posted: Jan 11 2012, 11:02 AM
Quote Post


SLF Moderator
******

Group: Moderators
Posts: 540
Member No.: 4
Joined: 8-April 11









Hi,
good you got it up & running and thanks for sharing smile.gif

cheers,


--------------------
PMEmail Poster
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll