Can't ping ip's or hostnames on fresh CentOS 6.2 install

30

.56 is the subnet address. You can't use it as a host address. When you try to reach the gateway, the source IP address is the subnet address, leaving the gateway baffled as to how to respond. By assigning .56 to the physical interface, you have made it the default source IP address.

Share:
30

Related videos on Youtube

Nooby Coder
Author by

Nooby Coder

Updated on September 18, 2022

Comments

  • Nooby Coder
    Nooby Coder almost 2 years
    public void onClick(View v) {
            if (v == button1){
                counter++;
                textView2.setText(Integer.toString(counter));
                textView2.setText(counter);
            }
    
        }
    

    I have tried to create a program that counts the number of clicks on a button, but for some reason it is not displaying it. Here is my textview component.

    <TextView
            android:id="@+id/textView2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="180dp"
            android:layout_alignParentTop="true"
            android:layout_above="@+id/button1"
            android:layout_toRightOf="@+id/textView1"
            android:layout_centerHorizontal="true"
            android:textColor="#000000"/>
    

    I can't seem to find an attribute for display the number of clicks. Is this because it interprets it as an interger instead of a string?

    • user1686
      user1686 over 12 years
      Why do you have HWADDR set at all?
    • David Schwartz
      David Schwartz over 12 years
      What happens when you try to ping the gateway?
    • Vlad Fedotov
      Vlad Fedotov over 12 years
      @grawity HWADDR was just there whenever I first edited the file, and then I just carried it over to the aliases since it complained about wrong HWADDR whenever I tried removing it.
    • Vlad Fedotov
      Vlad Fedotov over 12 years
      @DavidSchwartz It tries to ping, then it shows "Destination Host Unreachable"
    • Neeraj
      Neeraj almost 8 years
      Try removing textView2.setText(counter); This method accepts only an integer resource (as in R.string.someValue) . Also, make sure that the TextView is actually displayed, in case the layout is not proper.
  • Vlad Fedotov
    Vlad Fedotov over 12 years
    Ah yea, that was dumb. I fixed that and modified my eth1 and alias. I still can't get a response from the gateway with ping.
  • David Schwartz
    David Schwartz over 12 years
    What is the source address of the ping packets now? Did you wait for ARP to expire?
  • Vlad Fedotov
    Vlad Fedotov over 12 years
    The source address is now the .58 address. arp -na shows incomplete, and arping never gets a response