Announcement

Collapse
No announcement yet.

No internet with static IP

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    No internet with static IP

    Hello I have a problem with my network. I can't connect to the Internet.

    I have to use an static IP, here is the information:
    IP address: 192.168.8.18
    Netmask: 255.255.255.224
    Gateway: 192.168.8.1
    DNS: 192.168.11.1 and 192.168.11.2

    I tried doing all this via network settings but I can't write by hand the netmask I need. So I went to the interfaces (/etc/network/interfaces) file, here is the info:

    auto lo
    iface lo inet loopback
    address 127.0.0.1
    netmask 255.0.0.0

    auto eth0
    iface eth0 inet static
    address 192.168.8.18
    netmask 255.255.255.0
    gateway 192.168.8.1

    auto eth1
    iface eth1 inet dhcp

    auto eth2
    iface eth2 inet dhcp

    auto ath0
    iface ath0 inet dhcp

    auto wlan0
    iface wlan0 inet dhcp

    Before making changes in the interfaces file, in the console, I executed "ifdown eth0", then I changed the netmask to 255.255.255.224 in the interfaces file. I saved the changes and then "ifup eth0".

    I went to konqueror and tried to see if I had my internet working but it wasn't working.

    Then I went to the terminal and wrote ifconfig eth0, here is the information:

    eth0 Link encap:Ethernet HWaddr 00:01:6C:F6:3C:0E
    inet addr:192.168.8.18 Bcast:192.168.8.31 Mask:255.255.255.224
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:155 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:56 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:15414 (15.0 KiB) TX bytes:0 (0.0 b)
    Interrupt:217 Base address:0xe000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:40 errors:0 dropped:0 overruns:0 frame:0
    TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:3204 (3.1 KiB) TX bytes:3204 (3.1 KiB)

    I noticed I had the broadcast like this Bcast:192.168.8.31, so I went again to the interfaces file and I added "broadcast 192.168.8.255". I'm not sure if what I did with the broadcast is right but in I noticed in many posts that the broadcast looks like that. Now my interfaces file looks like this:

    auto lo
    iface lo inet loopback
    address 127.0.0.1
    netmask 255.0.0.0

    auto eth0
    iface eth0 inet static
    address 192.168.8.18
    netmask 255.255.255.224
    gateway 192.168.8.1
    broadcast 192.168.8.255

    auto eth1
    iface eth1 inet dhcp

    auto eth2
    iface eth2 inet dhcp

    auto ath0
    iface ath0 inet dhcp

    auto wlan0
    iface wlan0 inet dhcp


    Here is the "more /etc/resolv.conf" information:

    nameserver 192.168.11.1
    nameserver 192.168.11.2

    I don't know what else to do, I just installed kubuntu dapper. I used to work with ubuntu (breezy)

    Please help!!!!!

    #2
    Re: No internet with static IP

    What is the result when you ping the gateway address?

    What is the result of the terminal command: route

    Comment


      #3
      Re: No internet with static IP

      Originally posted by randcoop
      What is the result when you ping the gateway address?

      What is the result of the terminal command: route

      Here are the results, ping 192.168.8.1 (ping gateway):

      PING 192.168.8.1 (192.168.8.1) 56(84) bytes of data.
      From 192.168.8.18 icmp_seq=2 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=3 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=4 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=15 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=16 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=17 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=18 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=19 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=20 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=22 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=23 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=24 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=26 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=27 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=28 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=30 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=31 Destination Host Unreachable
      From 192.168.8.18 icmp_seq=32 Destination Host Unreachable

      --- 192.168.8.1 ping statistics ---
      32 packets transmitted, 0 received, +18 errors, 100% packet loss, time 34001ms, pipe 3

      Here are the results, route:
      Kernel IP routing table
      Destination Gateway Genmask Flags Metric Ref Use Iface
      192.168.8.0 * 255.255.255.224 U 0 0 0 eth0

      I noticed that there's no gateway (*) so I tried to add it but I failed trying. If you can give me a hint I'll appreciate it

      Thanks for the help

      Comment


        #4
        Re: No internet with static IP

        Try adding the gateway with:

        Code:
        sudo route add default gw 192.168.8.1

        Comment


          #5
          Re: No internet with static IP

          Originally posted by randcoop
          Try adding the gateway with:

          Code:
          sudo route add default gw 192.168.8.1
          Here are the results:

          Kernel IP routing table
          Destination Gateway Genmask Flags Metric Ref Use Iface
          192.168.8.0 * 255.255.255.224 U 0 0 0 eth0
          default 192.168.8.1 0.0.0.0 UG 0 0 0 eth0

          Comment


            #6
            Re: No internet with static IP

            Try deleting the 192.168.8.0 routing.
            sudo mount del 192.168.8.0

            I'll bet you are using an ethernet router and the system wants to route the
            Internet connection to the router. I have the same problem and have to run a bash script
            to setup the routing the way I want it.

            YumaJim

            Comment

            Working...
            X