[U-Boot] ip address confusion.

Ben Warren biggerbadderben at gmail.com
Fri Oct 23 16:18:04 CEST 2009


David,

On Fri, Oct 23, 2009 at 5:32 AM, David Collier
<from_denx_uboot at dexdyne.com>wrote:

>
> Our office network runs on
>
> 10.213.1.1/24
>
> so all addresses in 10.212 and 10.213 should be local.
>
As Jerry mentioned, this is not correct.  10.212 and 10.213 are on different
subnets if your mask is 24 bits in size:

10.212 = 0b00001010.0b11010100
10.213 = 0b00001010.0b11010101

As you can see, they only have 15 bits in common, so for them to be in the
same subnet (no routing required) your network would have to be
10.212.0.0/15 at the minimum.

>
> and I have a TFTP server on 10.213.1.105
>
> if I set my office pc to 10.212.0.99 I can ping 10.213.1.105
>
If this is so and the netmask listed above is correct, there's probably a
router on 10.212.  Running traceroute will tell you for sure.

>
> so far so good
>
> -----------------------------------------
> if I set u-boot up so the printenv at power-on looks like
>
> ethaddr=00:90:46:20:000:99
> eth1addr=00:90:46:20:100:99
> ipaddr=10.212.000.99
> serverip=10.213.1.105
> gatewayip=10.213.1.1

Try setting this to 10.212.1.1 and see what happens.

> netmask=255.254.0.0
> bootfile=99/uImage
> ethact=macb1
>
> then if I do
>
>    ping 10.213.1.105
>
> it fails.
>
> but after setting
>
>    setenv ipaddr 10.213.0.99
>
No surprise.

>
> it works
>
> Can anyone suggest why?
>
> David Collier
>
> regards,
Ben


More information about the U-Boot mailing list