Re: An elementary question on LANs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/16/2011 02:04 PM, Timothy Murphy wrote:
> g wrote:
> 
>> so, to op, Timothy Murphy,
>>
>> do you wish to know;
>>
>>  1- what determines mapping of nic [network interface card/chipset] to an
>>   ip address?
> 
> I assume that this is set in ifcfg-ethX .

You are right. Either by 'IPADDR=...' or 'BOOTPROTO="dhcp"' and then
that ethX will get an IP from the DHCP server.

>>  2- what determines mapping of nic [network interface card/chipset] to an
>>   ethx position?
> 
> That is an interesting question.
> I see that in CentOS-6 there is a file 
> /etc/udev/rules.d/70-persistent-net.rules
> which matches interface (ethX) to MAC address.
> But this file does not seem to be present in CentOS-5.6 .
> 
> I assume that in CentOS-5.6 the match is set in ifcfg-ethX ;
> but I'm not sure which of the two is dominant in CentOS-6.

In EL5 (CentOS 5.x), the only place to do the mapping was using the
HWADDR= setting in the 'ifcfg-ethX' file. In recent Fedora's and in EL6
(CentOS 6.x), it is *also* set in the udev file. I suspect that you
could forgo the 'HWADDR' entry in the ifcfg-ethX files, and let udev be
the sole config location, but I've not tried this. I always keep them
both set.

>>  3- what determines order of mapping of nic [network interface
>>  card/chipset]
>>   to an ip address?
> 
> I'm not sure what you mean by the _order_ of the mapping?
> My guess is that in the absence of any action by the user
> which NIC is assigned to eth0 and which to eth1 (etc)
> is determined by the position of the NICs in the PCI device table?
> But I'd be interested to know the answer to this.

I think g was talking about some corolation between the network card's
physical location on the motherboard and the 'ethX' name. Until
recently, there was no reliable way to determine this. In the most
recent Fedora 15, an attempt is made to provide a mapping. This method
mostly does away with the traditional 'ethX' naming though.

>>  4- what determines order of mapping of nic [network interface
>>  card/chipset]
>>   to an ethx position?
> 
> I don't see how this differs from the previous question.

I don't either. :)

>>  5- none of above?
> 
> I think my question was slightly different to any of the above.
> I was asking how the connection between an interface (ethX)
> and a subnet (192.168.2.0) was, or could be, established,
> since that seems to be what dhcpd wants before it starts.

DHCP requests go out on 255.255.255.255 iirc. Regardless, you do not
need to specify anything when requesting an IP address from a DHCP
server, beyond telling ifcfg-ethX to use DHCP in the first place.

> My problem basically is the error message
> ------------------------------------
> alfred dhcpd: No subnet declaration for eth1 (no IPv4 addresses).
> alfred dhcpd: ** Ignoring requests on eth1.  If this is not what
> alfred dhcpd:    you want, please write a subnet declaration
> alfred dhcpd:    in your dhcpd.conf file for the network segment
> alfred dhcpd:    to which interface eth1 is attached. **
> alfred dhcpd:
> alfred dhcpd:
> alfred dhcpd: Not configured to listen on any interfaces!
> ------------------------------------

OOOOhhhhh, you're trying to configure a DHCP server itself! I see.

This may or may not help;

http://wiki.alteeve.com/index.php/DHCP_on_an_RPM-based_OS

As for which interfaces are used to listen for requests, take a boo at
this part from the DHCP daemon's man page (man dhcpd):

===
The names of the network interfaces on which dhcpd should listen for
broadcasts may be specified on the command line.  This should be done on
systems where dhcpd is unable to identify  non-broadcast  interfaces,
but  should  not  be required on other systems.  If no interface names
are specified on the command line dhcpd will identify all network
interfaces which are up, eliminating non-broadcast interfaces if
possible, and listen for DHCP broadcasts on each interface.
===

> It seems that dhcpd requires that a connection should have been established
> between eth1 and the subnet 192.168.2.0 _before_ dhcpd starts.
> 
> I have a subnet declaration for the subnet 192.168.2.0
> in /etc/dhcpd.conf :
> ------------------------------------
> subnet 192.168.2.0 netmask 255.255.255.0 {
> 
>         authoritative;
> 
> # --- default gateway
>         option routers                  192.168.2.1;
>         option subnet-mask              255.255.255.0;
> 
> #       option nis-domain               "gayleard.com";
>         option domain-name              "gayleard.com";
>         option domain-name-servers      208.67.222.222,208.67.220.220;
> 
>         range 192.168.2.100 192.168.2.250;
>         range dynamic-bootp 192.168.2.128 192.168.2.254;
> 
>         host alfred {
>                 hardware 00:1B:21:AB:C9:4C;
>                 fixed-address 192.168.2.2;
>         }
> ...
> }
> ------------------------------------
> 
> Also ifconfig contains
> 
> eth1      Link encap:Ethernet  HWaddr 00:1B:21:AB:C9:4C  
>           inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
> 
> But it seems this is not sufficient to establish 
> "a subnet declaration for eth1".
> 
> I tried adding an empty declaration for 192.168.1.0 ,
> and also (as was suggested) sandwiching the subset declartion(s) in
> shared-network opt {
> ...
> }
> but neither seemed to make any difference.
> 
> If anyone can tell me what I am missing I should be very grateful.
>   
> http://wiki.alteeve.com/index.php/Changing_the_ethX_to_Ethernet_Device_Mapping_in_EL6_and_Fedora_12%2B
>>
>> is a  good read.
> 
> I did look at this, but it did not seem relevant to my problem.

It was not. The initial impression most of us got was that the problem
you were having was with the basic network card setup. You did not
indicate that you were configuring a DHCP server. :)

-- 
Digimer
E-Mail:              digimer@xxxxxxxxxxx
Freenode handle:     digimer
Papers and Projects: http://alteeve.com
Node Assassin:       http://nodeassassin.org
"At what point did we forget that the Space Shuttle was, essentially,
a program that strapped human beings to an explosion and tried to stab
through the sky with fire and math?"
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux