Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: [SOLVED] Static IPv4 Address gives multiple ping failures

  1. #1
    Join Date
    Mar 2021
    Beans
    19

    [SOLVED] Static IPv4 Address gives multiple ping failures

    Hello forum attendees!

    Although new to Ubuntu I have been delving into Unix for a while on Raspberry Pi's but am now stuck! I have many years experience in IT support although not a network specialist - usually on OpenVMS. However, all that experience counts for nothing at the moment!

    Due to utter frustration with Windows 10, I decided to wipe the drive and install Ubuntu from scratch on my Samsung laptop. (File Explorer crashed around 50% of the time I used it. Samsung stated that the model - NP350E7C - is not compatible with Win 10. I asked why on earth did it volunteer for the upgrade then!

    I have been quite impressed with how easy it was to install and that it utilised an additional monitor without any intervention. I quickly got to grips with the GUI and the overall response speed is impressive.

    I am hoping to use it as a testbed for web technologies so installed the LAMP stack - again without any issue.

    To ease access from the LAN, I followed instructions on setting up a static IP address - also, I wanted the quickest network response from it so connected it via Ethernet cable into the router. I soon noticed that Firefox was timing out on websites. Pings showed that some were actually working but there was about 85% failure rate. I also noticed that the speed of the link was varying from 1Gb to 1Mb within a few seconds.

    Hours of investigation including swapping cables and the like made me realise that the problem was with the static IP address as the same issue occurs on the wireless interface too. I noted that, although I attempted to disable the IPv6 address in the settings the interface would still obtain an IPv6 address. The router recognises it as a "Link Local" address even though I did not set that up either.

    I have had to set the interface to DHCP for the link to be stable.

    I have searched these forums as best as I can but can see nothing which resembles what I am seeing. I have downloaded the wireless diagnostic script so will switch back to wireless tomorrow and see if setting the static address will give any useful info.

    I can understand that there can be many problems with proprietary drivers and the like but I would just like to state that I am impressed with the technical and diplomatic skills of many contributors on these forums! Thank you from an old but still enthusiastic techie.
    Last edited by germarsh; March 13th, 2021 at 03:03 PM.

  2. #2
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    26,047
    Distro
    Ubuntu Development Release

    Re: Static IPv4 Address gives multiple ping failures

    With a DHCP connection, please run and post:

    Code:
    ip addr show
    What static address did you set? What DNS nameserver(s)?

    A link-local IPv6 address; typically fe80:xxx is normal and entirely expected.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, B.Sc., M.Sc., M.A., Ph.D., Sc.D.

  3. #3
    Join Date
    Mar 2021
    Beans
    19

    Re: Static IPv4 Address gives multiple ping failures

    Thank you very much for the quick response. I have configured the router only to allocate addresses from 192.168.0.125 and I attempted to set the static address of .65. In the Settings I put 24 as the mask - which I noted was translated to the ip address format - and the address of the router as the gateway and the single nameserver: 192.168.0.1

    Here is the output from the command:

    Code:
    gerald@Linux-Laptop:~$ ip addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether b8:88:e3:6a:5c:09 brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.181/24 brd 192.168.0.255 scope global dynamic noprefixroute enp2s0
           valid_lft 568064sec preferred_lft 568064sec
        inet6 fe80::fabe:e358:f9dd:e235/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever
    3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 50:b7:c3:4e:2f:c6 brd ff:ff:ff:ff:ff:ff

  4. #4
    Join Date
    Mar 2021
    Beans
    19

    Re: Static IPv4 Address gives multiple ping failures

    The router has an option to always allocate the IP address to that link and I am thinking of using that. It should be fairly simple to set up a static address though - so I thought!

    I note too that there seem to be different "network managers" involved in the command line configs. Some configuration files suggested on line do not exist on my system. I get a 01-network-manager-all.yaml in /etc/netplan where one suggestion was to modify a different file. (I know the yaml format as I run Home Assistant on Raspberry Pi which uses it extensively.)

  5. #5
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    26,047
    Distro
    Ubuntu Development Release

    Re: Static IPv4 Address gives multiple ping failures

    Quote Originally Posted by germarsh View Post
    The router has an option to always allocate the IP address to that link and I am thinking of using that. It should be fairly simple to set up a static address though - so I thought!

    I note too that there seem to be different "network managers" involved in the command line configs. Some configuration files suggested on line do not exist on my system. I get a 01-network-manager-all.yaml in /etc/netplan where one suggestion was to modify a different file. (I know the yaml format as I run Home Assistant on Raspberry Pi which uses it extensively.)
    If Network Manager is running, then please do not adjust netplan. Is it?

    Code:
    sudo service NetworkManager status
    If so, then make your changes there:

    Substitute your details, of course. Restart NM:

    Code:
    sudo service NetworkManager restart
    Check to see if you got the requested address:

    Code:
    ip addr show
    ping -c3 www.ubuntu.com
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, B.Sc., M.Sc., M.A., Ph.D., Sc.D.

  6. #6
    Join Date
    Mar 2021
    Beans
    19

    Re: Static IPv4 Address gives multiple ping failures

    The only difference I made to the manual settings was that I used the address of the router to be the single DNS. I shall try as you say.

    Here is the output of the service status:

    Code:
    ● NetworkManager.service - Network Manager
         Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendo>
         Active: active (running) since Mon 2021-03-08 22:46:10 GMT; 20h ago
           Docs: man:NetworkManager(8)
       Main PID: 738 (NetworkManager)
          Tasks: 3 (limit: 9354)
         Memory: 16.0M
         CGroup: /system.slice/NetworkManager.service
                 └─738 /usr/sbin/NetworkManager --no-daemon
    
    Mar 09 12:47:42 Linux-Laptop NetworkManager[738]: <info>  [1615294062.1881] age>
    Mar 09 13:14:25 Linux-Laptop NetworkManager[738]: <info>  [1615295665.0359] age>
    Mar 09 13:30:40 Linux-Laptop NetworkManager[738]: <info>  [1615296640.3489] age>
    Mar 09 13:36:37 Linux-Laptop NetworkManager[738]: <info>  [1615296997.3517] age>
    Mar 09 15:22:39 Linux-Laptop NetworkManager[738]: <info>  [1615303359.0723] age>
    Mar 09 15:33:33 Linux-Laptop NetworkManager[738]: <info>  [1615304013.9088] age>
    Mar 09 16:04:55 Linux-Laptop NetworkManager[738]: <info>  [1615305895.1643] age>
    Mar 09 18:27:19 Linux-Laptop NetworkManager[738]: <info>  [1615314439.2252] age>
    Mar 09 19:19:31 Linux-Laptop NetworkManager[738]: <info>  [1615317571.8214] age>
    Mar 09 19:33:02 Linux-Laptop NetworkManager[738]: <info>  [1615318382.0179] age>
    lines 1-20/20 (END)

  7. #7
    Join Date
    Mar 2021
    Beans
    19

    Re: Static IPv4 Address gives multiple ping failures

    The service restarted ok and the pings were successful but this looks like it has not picked up the manual address:

    Code:
    gerald@Linux-Laptop:/var/www$ ip addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether b8:88:e3:6a:5c:09 brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.181/24 brd 192.168.0.255 scope global dynamic noprefixroute enp2s0
           valid_lft 529329sec preferred_lft 529329sec
        inet6 fe80::fabe:e358:f9dd:e235/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever
    3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 50:b7:c3:4e:2f:c6 brd ff:ff:ff:ff:ff:ff

  8. #8
    Join Date
    Mar 2021
    Beans
    19

    Re: Static IPv4 Address gives multiple ping failures

    I have just checked the Wired setting and find that all fields and tags are greyed out.

    Not seen that before!

  9. #9
    Join Date
    Mar 2021
    Beans
    19

    Re: Static IPv4 Address gives multiple ping failures

    Switched off the wired connection and switched it on again. Still greyed out. (Except the Cancel button.)

    Now the address is correct though!...

    (Network died when it picked up the manual address - I think the setup was greyed out as there was another running. Now set it back to DHCP so I can post this.

    Just discovered that ip addr show gives a different address to ifconfig...

    Code:
    gerald@Linux-Laptop:/var/www$ ifconfig
    enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 192.168.0.181  netmask 255.255.255.0  broadcast 192.168.0.255
            inet6 fe80::fabe:e358:f9dd:e235  prefixlen 64  scopeid 0x20<link>
            ether b8:88:e3:6a:5c:09  txqueuelen 1000  (Ethernet)
            RX packets 411052  bytes 147040222 (147.0 MB)
            RX errors 0  dropped 26550  overruns 0  frame 0
            TX packets 76660  bytes 9056279 (9.0 MB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 11087  bytes 1207119 (1.2 MB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 11087  bytes 1207119 (1.2 MB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    gerald@Linux-Laptop:/var/www$ ip addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether b8:88:e3:6a:5c:09 brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.181/24 brd 192.168.0.255 scope global dynamic noprefixroute enp2s0
           valid_lft 604713sec preferred_lft 604713sec
        inet 192.168.0.65/24 brd 192.168.0.255 scope global secondary noprefixroute enp2s0
           valid_lft forever preferred_lft forever
        inet6 fe80::fabe:e358:f9dd:e235/64 scope link noprefixroute 
           valid_lft forever preferred_lft forever
    3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 50:b7:c3:4e:2f:c6 brd ff:ff:ff:ff:ff:ff

  10. #10
    Join Date
    Mar 2021
    Beans
    19

    Re: Static IPv4 Address gives multiple ping failures

    OK - Now I am really confused! Firefox is working as are pings to www.ubuntu.com but pinging 192.168.0.1 fails!...

    Code:
    erald@Linux-Laptop:/var/www$ ping -c3 www.ubuntu.com
    PING www.ubuntu.com (91.189.91.45) 56(84) bytes of data.
    64 bytes from fautso.canonical.com (91.189.91.45): icmp_seq=1 ttl=53 time=86.6 ms
    64 bytes from fautso.canonical.com (91.189.91.45): icmp_seq=2 ttl=53 time=93.8 ms
    64 bytes from fautso.canonical.com (91.189.91.45): icmp_seq=3 ttl=53 time=86.1 ms
    
    --- www.ubuntu.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2004ms
    rtt min/avg/max/mdev = 86.108/88.840/93.846/3.544 ms
    gerald@Linux-Laptop:/var/www$ ping -c3 192.168.0.1
    PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
    
    --- 192.168.0.1 ping statistics ---
    3 packets transmitted, 0 received, 100% packet loss, time 2037ms
    
    gerald@Linux-Laptop:/var/www$

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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