Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with accessing internet with eth0

Status
Not open for further replies.

FadeOut

Programmer
Mar 27, 2004
14
CA
Hi,


I got a problem with accessing internet via a router who don't have DHCP (so i'm using static ip address). The thing is, when i've install linux, i had dhcp, so i'm a little bit embarassed to change it to static.


this is what i wrote in the ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.2.15
NETMASK=255.255.255.0
GATEWAY=192.168.2.1
HWADDR=00:50:04:1B:4E:76
 
Here is mine. I also have a static ip because I use it as a server.

Code:
# VIA Technologies, Inc. VT6102 [Rhine-II]
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0C:76:19:B5:9F
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.1.10
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=192.168.1.1
TYPE=Ethernet

 
Can you ping 192.168.2.1 alright?

What do you have in /etc/sysconfig/network? You might need to add GATEWAY=192.168.2.1 in there to set your default route.

Annihilannic.
 
Also do not forget to setup your DNS config. /etc/resolv.conf : nameserver xxx.xxx.xxx.xxx




Regards Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top