Internet/lan-only lan working

Discussion in 'Installation/Configuration' started by Nejko, Jan 14, 2006.

  1. Nejko

    Nejko New Member

    I have reinstalled my fedora core 4 like toturial said on howtoforge. I get lan working with eth0 but internet is'nt working. I have router. Server's IP is 192.168.2.103 , my ip and the newtork is 192.168.2.1. How to configure eth0?

    THNX !
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have a dedicated router or is your server the router?
     
  3. Nejko

    Nejko New Member

    dedicated router, with 4 computers on it. hod do i know that internet is not working? yum update gave me that:

    [root@localhost ~]# yum update
    Setting up Update Process
    Setting up repositories
    Cannot find a valid baseurl for repo: updates-released
    [root@localhost ~]#

    and i can ping only computers in my network.

    and here is my eth0's config:

    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=192.168.2.103
    NETMASK=255.255.255.0
    NETWORK=192.168.2.1
    BROADCAST=192.168.2.255
    ONBOOT=yes
    MII_NOT_SUPPORTED=yes

    what's wrong with it?

    thanx for your answers!
     
    Last edited: Jan 15, 2006
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    In your eth0 config the gateway is missing.
     
  5. Nejko

    Nejko New Member

    what do i add then?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Not shure how to do it in FC4 as i have currently Ubuntu installed.

    Please post the output of:

    netstat -rn

    If the default route does not point to your gateway, you can set the routing on the commandline with:

    /sbin/route add -net 0.0.0.0 gw 1.1.1.1 eth0

    where you have to replace 1.1.1.1 with the IP address of your gateway.
     
  7. Nejko

    Nejko New Member

    [root@localhost ~]# netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
    [root@localhost ~]#



    /sbin/route add -net 0.0.0.0 gw 192.168.2.1 eth0

    network restart.. still nothing :(
     
    Last edited: Jan 15, 2006
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, seems that your gateway is not set.

    Do you have a file: /etc/sysconfig/network

    and in the file the setting:

    GATEWAY=1.1.1.1

    where you have to replace 1.1.1.1 with the internal IP address of your router (gateway).
     
  9. Nejko

    Nejko New Member

    i have set the file to:


    NETWORKING=yes
    HOSTNAME=localhost.localdomain
    GATEWAY=192.168.2.1



    still not working :(
     
    Last edited: Jan 15, 2006
  10. Nejko

    Nejko New Member

    got it now workin' with my ppoe gateway :D:confused:

    thanks for all your help
     
  11. Nejko

    Nejko New Member

    edit: not working again :S


    [root@localhost ~]# ping www.google.com
    connect: Network is unreachable
    [root@localhost ~]#

    wtf?! i'll get crazy :(
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Does
    Code:
    ping -c4 64.233.183.99
    work? What does /etc/resolv.conf look like?
     
  13. Nejko

    Nejko New Member

    [root@localhost ~]# ping -c4 64.233.183.99
    connect: Network is unreachable
    [root@localhost ~]#

    ; generated by /sbin/dhclient-script
    nameserver 193.189.160.11
    search localdomain

    my eth0:

    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=192.168.2.103
    NETMASK=255.255.255.0
    NETWORK=192.168.2.1
    BROADCAST=192.168.2.200
    GATEWAY=192.168.2.103
    ONBOOT=yes

    hope that helps :S
     
  14. falko

    falko Super Moderator Howtoforge Staff

    Why don't you use

    Code:
    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=192.168.2.103
    NETMASK=255.255.255.0
    NETWORK=192.168.2.[B][COLOR="Red"]0[/COLOR][/B]
    BROADCAST=192.168.2.2[B][COLOR="Red"]55[/COLOR][/B]
    GATEWAY=192.168.2.103
    ONBOOT=yes
    ?
     
  15. Nejko

    Nejko New Member

    i replaced, and restarted network, but still:


    [root@localhost ~]# ping -c4 64.233.183.99
    PING 64.233.183.99 (64.233.183.99) 56(84) bytes of data.
    From 192.168.2.103 icmp_seq=0 Destination Host Unreachable
    From 192.168.2.103 icmp_seq=1 Destination Host Unreachable
    From 192.168.2.103 icmp_seq=2 Destination Host Unreachable
    From 192.168.2.103 icmp_seq=3 Destination Host Unreachable

    --- 64.233.183.99 ping statistics ---
    4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3017ms
    , pipe 4
    [root@localhost ~]#
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Is your gateway really 192.168.2.103? Because that's the same IP address that you use for IPADDR...
     
  17. Nejko

    Nejko New Member

  18. falko

    falko Super Moderator Howtoforge Staff

    Your gateway is 192.168.2.1.
     
  19. Nejko

    Nejko New Member

    well, i have like that:


    DEVICE=eth0
    BOOTPROTO=static
    IPADDR=192.168.2.103
    NETMASK=255.255.255.0
    NETWORK=192.168.2.1
    BROADCAST=192.168.2.255
    GATEWAY=192.168.2.1
    ONBOOT=yes


    but it's not working :S is there any other network config file i should edit?
     
  20. falko

    falko Super Moderator Howtoforge Staff

    Please change
    Code:
    NETWORK=192.168.2.[B][COLOR="Red"]1[/COLOR][/B]
    to
    Code:
    NETWORK=192.168.2.[B][COLOR="Red"]0[/COLOR][/B]
    and restart the network. If it doesn't help, reboot your server.

    Also have a look at this page: http://www.subnetmask.info/
     

Share This Page