Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,146
    Is 192.168.0.10 (the static address that you have assigned) outside of the range that your DHCP server issues IP addresses?
    If not then you could end up with the same IP address being used on different machines at the same time which would cause problems.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  2. #12
    Senior Member
    Join Date
    Dec 2020
    Posts
    129
    Quote Originally Posted by jezbo View Post
    OK I'm not sure why it would fail to find the DHCP but following some advice on https://www.raspberrypi.org/document...uration/tcpip/ I did this

    sudo nano /etc/dhcpcd.conf

    And just uncommented these lines:
    # Example static IP configuration:
    interface eth0
    static ip_address=192.168.0.10/24
    static ip6_address=fd51:42f8:caae:d92e::ff/64
    static routers=192.168.0.1
    static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

    Then rebooted and I do get the pi using 192.168.0.10 on eth0:

    route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    0.0.0.0 192.168.0.1 0.0.0.0 UG 202 0 0 eth0
    0.0.0.0 192.168.0.1 0.0.0.0 UG 303 0 0 wlan0
    192.168.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
    192.168.0.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0

    Not sure why that was necessary but if that fixes it long term i'm happy.
    With two NICs in the same segment you are messing up your routing table, e.g. if a package from 192.168.0.24 comes in on wlan0 then your Pi will send its reply through wlan0 because it has a lower metric (aka cost) which will be ignored by the original sender (192.168.0.24).

    You have several options here:
    1. Use a static address for the wired interface eth0
      Note that if you do this you should reserve that address in the DHCP server so that it won't assign this to another machine
    2. Create a bridge interface
      This will make eth0 and wlan0 behave like a single interface with one IP address. The bridge logic will take care that replies are sent through the correct physical interface
    3. Make the wireless interface on the Pi an access point
      I'm assuming here that you like to use the wireless interface to allow squeezeboxes to connect and access to the GUI as well as connection to the NAS would be guaranteed through the wired interface.

  3. #13
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    Quote Originally Posted by Paul Webster View Post
    Is 192.168.0.10 (the static address that you have assigned) outside of the range that your DHCP server issues IP addresses?
    If not then you could end up with the same IP address being used on different machines at the same time which would cause problems.
    No its inside, but I reserved the address on the router as well.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  4. #14
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    Quote Originally Posted by gordonb3 View Post
    With two NICs in the same segment you are messing up your routing table, e.g. if a package from 192.168.0.24 comes in on wlan0 then your Pi will send its reply through wlan0 because it has a lower metric (aka cost) which will be ignored by the original sender (192.168.0.24).

    You have several options here:
    1. Use a static address for the wired interface eth0
      Note that if you do this you should reserve that address in the DHCP server so that it won't assign this to another machine
    2. Create a bridge interface
      This will make eth0 and wlan0 behave like a single interface with one IP address. The bridge logic will take care that replies are sent through the correct physical interface
    3. Make the wireless interface on the Pi an access point
      I'm assuming here that you like to use the wireless interface to allow squeezeboxes to connect and access to the GUI as well as connection to the NAS would be guaranteed through the wired interface.
    Seems I am doing 1 and I did reserve 192.168.0.10 on the router as well.

    You seem to understand all this stuff, could you offer any explanation why the wired connection was causing such issues in the first place? I get the uncomfortable feeling I've just used a sticking-plaster solution. Also could you clarify what the /24 means in the IP address reservation (static ip_address=192.168.0.10/24)?
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  5. #15
    Senior Member
    Join Date
    Dec 2020
    Posts
    129
    Quote Originally Posted by jezbo View Post
    Seems I am doing 1 and I did reserve 192.168.0.10 on the router as well.

    You seem to understand all this stuff, could you offer any explanation why the wired connection was causing such issues in the first place? I get the uncomfortable feeling I've just used a sticking-plaster solution. Also could you clarify what the /24 means in the IP address reservation (static ip_address=192.168.0.10/24)?
    `/24` is the bitmask, i.e. the number of bits counted from the left where the IP address must be the same to belong to the defined range
    Code:
        192.168.0.1  <=> C0 A8 00 01 <=>  1100 0000 1010 1000 0000 0000 0000 0001
    Why eth0 caused issues? Don't know. Likely just chance, the order in which the OS initializes the interfaces. As said, if you have two NICs that are both defined as primary routers to your local network there is no guarantee that replies will be sent out through the same interface that a request entered and this effectively means that you are not replying (i.e. time-out).

    Honestly, you should check out option #3. There are a number of tutorials that you can find on the internet to turn your Pi into an access point. Basic elements consist of:
    1. hostapd - the access point daemon
    2. dnsmasq - a DNS caching daemon that incorporates a DHCP server
    3. iptables - to set up masquerading (for listening to remote streams and fetching linked art)


    I run a similar setup myself, although not on a Pi. I defined an `open` network (no password) with a /28 netmask, which leaves 6 possible IPs not counting the network base (the lowest number, '0') and broadcast (the highest number, '7'), all assigned to known hardware IDs (and of course one to the server itself).

  6. #16
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    Honestly I am almost at the point of giving up - my sticking plaster solution has failed today and its bringng down my entire wired network again, so I have to fall back to wireless-only.

    I just want the pi to be wired to my network, I can't believe so much complicated configuration is required. Might try a direct connection to my router rather than via powerline adapters later, but I'm not optimistic it will make any difference.
    Last edited by jezbo; 2021-02-13 at 06:14.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  7. #17
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    4,310
    Quote Originally Posted by jezbo View Post
    Honestly I am almost at the point of giving up - my sticking plaster solution has failed today and its bringng down my entire wired network again, so I have to fall back to wireless-only.

    I just want the pi to be wired to my network, I can't believe so much complicated configuration is required. Might try a direct connection to my router rather than via powerline adapters later, but I'm not optimistic it will make any difference.

    I have used the Raspberry PI OS on every rpi from one to four without such problems (there have been hiccups, but nothing major)

    I always try and use Ethernet connections as a first choice (either direct to router or via a switch)

    Wireless used to be a bit flakey, but now seems mostly without problems.

    I have never tried Powerline Adaptors (some people do use them with success

    You can maybe see where I am going with this...........................................

    ronnie

  8. #18
    Senior Member
    Join Date
    Jan 2007
    Location
    Scotland
    Posts
    1,043
    Quote Originally Posted by Man in a van View Post
    I have used the Raspberry PI OS on every rpi from one to four without such problems (there have been hiccups, but nothing major)

    I always try and use Ethernet connections as a first choice (either direct to router or via a switch)

    Wireless used to be a bit flakey, but now seems mostly without problems.

    I have never tried Powerline Adaptors (some people do use them with success

    You can maybe see where I am going with this...........................................

    ronnie
    Yeah problem with attaching direct to my Sky router is that it only has two output lines and I'm already using those, one for the master powerline dapter and one for my hive home hub. How does your "switch" option work? Presumably that has to be wired up to the router in order to benefit from wired speeds, our house topology just won't allow that.
    muso developer
    6 x SB3, 4 x SBBoom, 1 x SBTouch, rPi-4 based LMS on 2TB SSD (80,000+ tracks)
    Marantz, Denyo, & Bantam amps,
    Harbeth, Mordaunt Short & Monitor Audio speakers
    Heed Canamp + Beyerdynamic headphones

  9. #19
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    4,310
    Quote Originally Posted by jezbo View Post
    Yeah problem with attaching direct to my Sky router is that it only has two output lines and I'm already using those, one for the master powerline dapter and one for my hive home hub. How does your "switch" option work? Presumably that has to be wired up to the router in order to benefit from wired speeds, our house topology just won't allow that.
    I use a Cisco 8 port switch connected to the router and then run Ethernet cable to another switch.

    I use flat cat 5 cable, never had a problem with it

    ronnie

  10. #20
    Senior Member
    Join Date
    Jan 2010
    Location
    Hertfordshire
    Posts
    6,793
    Quote Originally Posted by jezbo View Post
    Honestly I am almost at the point of giving up - my sticking plaster solution has failed today and its bringng down my entire wired network again, so I have to fall back to wireless-only.

    I just want the pi to be wired to my network, I can't believe so much complicated configuration is required. Might try a direct connection to my router rather than via powerline adapters later, but I'm not optimistic it will make any difference.
    It really shouldn't be that difficult. I have had my Pi connected directly to the router and via powerline adaptors with no issues.

    Sent from my Pixel 3a using Tapatalk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •