[ECOS] Second ethernet port?

Colin Ford colin.ford@pipinghotnetworks.com
Fri May 11 02:30:00 GMT 2001


Hello Hugo,

I've included my output below. The odd thing is,
is that I can ping from my Linux box both:

1.1.2.239 & 1.1.2.187

after eCos has run and aquired thoes addresses.
Everthing seems to work apart from eCos thinking 
that eth1 failed when it did not?

I think the "SIOCIFADDR 2" origanates from:
packages/net/tcpip/current/src/lib/bootp_support.c

// Must do this again so that [sub]netmask (and so default route)
// is taken notice of.
addrp->sin_addr = bp->bp_yiaddr;  // The address BOOTP gave us
if (ioctl(s, SIOCSIFADDR, &ifr)) {
     perror("SIOCIFADDR 2");
     return false;
}

I'm not sure what your saying about the network segment?

Many thanks,
Col.

=========================================
.Network stack using 131072 bytes for misc space
                    131072 bytes for mbufs
                    262144 bytes for mbuf clusters

starting....
fec: AutoNeg Ack Not Complete
fec: AutoNeg Ack Not Complete
fec: AutoNeg Ack Complete
fec: Link Normall, Speed 100BaseT, Duplex Full
Starting Network
BOOTP[eth0] op: REPLY
       htype: Ethernet
        hlen: 6
        hops: 0
         xid: 0x1E198A
        secs: 0
       flags: 0x0
       hw_addr: 00:04:56:00:00:05
     client IP: 0.0.0.0
         my IP: 1.1.2.239
     server IP: 1.1.1.1
    gateway IP: 0.0.0.0
        server: Netopia R3100-S #250668
  options:
        DHCP message: 5 ACK
        DHCP server id: 1.1.1.1
        DHCP time 51: 3600
        DHCP time 58: 1800
        DHCP time 59: 3150
        subnet mask: 255.255.0.0
      domain server: 1.1.1.2, 194.112.32.1
BOOTP[eth1] op: REPLY
       htype: Ethernet
        hlen: 6
        hops: 0
         xid: 0x1E1BD6
        secs: 0
       flags: 0x0
       hw_addr: 00:04:56:00:00:04
     client IP: 0.0.0.0
         my IP: 1.1.2.187
     server IP: 1.1.1.1
    gateway IP: 0.0.0.0
        server: Netopia R3100-S #250668
  options:
        DHCP message: 5 ACK
        DHCP server id: 1.1.1.1
        DHCP time 51: 3600
        DHCP time 58: 1800
        DHCP time 59: 3150
        subnet mask: 255.255.0.0
      domain server: 1.1.1.2, 194.112.32.1
SIOCIFADDR 2: File exists
Network initialization failed for eth1
Starting Interfaces
Running Ping Test on eth0
PING server 1.1.1.1
64 bytes from 1.1.1.1: icmp_seq=0, time=0ms
64 bytes from 1.1.1.1: icmp_seq=1, time=0ms
64 bytes from 1.1.1.1: icmp_seq=2, time=10ms
64 bytes from 1.1.1.1: icmp_seq=3, time=10ms
64 bytes from 1.1.1.1: icmp_seq=4, time=0ms
64 bytes from 1.1.1.1: icmp_seq=5, time=0ms
64 bytes from 1.1.1.1: icmp_seq=6, time=0ms
64 bytes from 1.1.1.1: icmp_seq=7, time=10ms
64 bytes from 1.1.1.1: icmp_seq=8, time=10ms
64 bytes from 1.1.1.1: icmp_seq=9, time=0ms
64 bytes from 1.1.1.1: icmp_seq=10, time=0ms
64 bytes from 1.1.1.1: icmp_seq=11, time=0ms
64 bytes from 1.1.1.1: icmp_seq=12, time=10ms
64 bytes from 1.1.1.1: icmp_seq=13, time=0ms
64 bytes from 1.1.1.1: icmp_seq=14, time=0ms
64 bytes from 1.1.1.1: icmp_seq=15, time=0ms
Sent 16 packets, received 16 OK, 0 bad
UCD-SNMP version 4.1.2
... Done
========================================


On 10 May 2001 19:20:59 +0100, Hugo Tyson wrote:
> 
> Colin Ford <colin.ford@pipinghotnetworks.com> writes:
> > has anyone managed to get two ethernet ports working
> > at the same time under eCos? 
> 
> All the time.
>  
> > I keep getting:
> > 
> > SIOCIFADDR 2: File exists
> > Network initialization failed for eth1
> 
> Where from?  What reports that I mean?
>  
> > they both report there DHCP setting correctly and it
> > does not matter which way around the ports are 
> > initilised eth1 always fails with the above error?
> 
> If they are both initializing using DHCP correctly, what else is it doing
> that's going wrong?
> 
> Aha!  Are you connecting them both on the same network segment?  DHCP might
> well be setting up a route for eth1 which contradicts a route (to the same
> network segment) that's already set for eth0.  That's a guess about
> something that can "already exist [EEXIST]" during network bootup.
> 
> Send us (the list) the whole printout that lists the DHCP bootup so I can
> have a look at what the DHCP initialization would be doing with it?
> 
>       - Huge



-- 
===========================================
Colin Ford               PipingHot Networks
Software Engineer        +44 (0)1364 655510 



More information about the Ecos-discuss mailing list