LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2006, 02:46 PM   #1
mazzo
Member
 
Registered: Jun 2003
Location: Thames Valley, UK
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142

Rep: Reputation: 15
changed to static Ip and now can't get internet


Hi

I've been struggling on this now for a couple of evenings and can't work out what I've done.

I used to have my server connecting to a cable modem using dhcp. I've just got a new modem with 4 ports, so thought it would be good to create a bit of a network through that, rather than multiple nic's.

It is an old Red Hat 7.3 (yes - past its sell by date) with two nic's. All lan ip's are static.

This is exactly what I have done (no more - no less)

Changed ifcfg-eth0 to:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.0.200
NETMASK=255.255.255.0
NETWORK=192.168.0.0
#GATEWAY=192.168.0.50 (I rem'd this out just to see if it made a difference)

ifcfg-eth1 is the same as before but uses a static address in the 10.0.0.x range. Nothing is currently connected to this.

/etc/sysconfig/network is:
NETWORKING=yes
HOSTNAME="Monty"
GATEWAY="192.168.0.100" (the router address)

I can ping other pc's on the network and can ssh into the 7.3 box from any of the other PC's, but I cannot get the 7.3 box to make its way out onto the net. I've turned off all firewalling on the 7.3 box. All other PC's can get straight out on the net without issue.

As I said, I have not done anything esle. What have I forgotten to do? It's worked fine for the last 4 years until I made the changes....

Last edited by mazzo; 08-22-2006 at 02:56 PM.
 
Old 08-22-2006, 03:21 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,983

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
For starters try:

BOOTPROTO=static

and the Gateway should correspond to your router ip, i.e.:

GATEWAY=192.168.0.100

Also, if you can ping numeric ips on the internet but not names, you have a DNS problem and have to edit /etc/resolve.conf to add the ip for the DNS server from your ISP. To help with checking that:

Code:
$ ping -c3 www.linuxquestions.org
PING www.linuxquestions.org (64.179.4.146) 56(84) bytes of data.
64 bytes from web2.linuxquestions.org (64.179.4.146): icmp_seq=1 ttl=43 time=43.7 ms
64 bytes from web2.linuxquestions.org (64.179.4.146): icmp_seq=2 ttl=43 time=43.2 ms
64 bytes from web2.linuxquestions.org (64.179.4.146): icmp_seq=3 ttl=43 time=43.4 ms
Try pinging 64.179.4.146 directly or typing that into your browser and see if you can connect here.
 
Old 08-22-2006, 03:33 PM   #3
mazzo
Member
 
Registered: Jun 2003
Location: Thames Valley, UK
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142

Original Poster
Rep: Reputation: 15
Thanks - I had changed the ip of the router to play around a bit. I've now un-remarked it and set it to the same in both cases.

I have also changed back to static. I changed to "none" because RH 7.3 release notes stated that was the correct setting (they didn't even list static!)

Even direct ip addresses do not work, either ping or in a browser, so whatever it is, it still isn't getting out. I would blame the router, but all the other clients can get out fine).
 
Old 08-22-2006, 03:54 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Have you set the DNS IP value?
Use this address to see if you can get ggogle to pop up. http://216.239.39.99/
Check /etc/resolv.conf for that. Example.
nameserver xxx.xxx.xxx.xxx

If you do not know the IPs from your provider then use the lan side gateway IP.

Normally the default gateways on most store bought routers I have sen been like 192.168.0.1 or 192.168.1.1 depending on class C range choosing. You may have changed it or this is standard for that model. Can be done so many ways.
 
Old 08-22-2006, 04:13 PM   #5
mazzo
Member
 
Registered: Jun 2003
Location: Thames Valley, UK
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142

Original Poster
Rep: Reputation: 15
Thanks again. Yep DNS is set correctly. resolv.conf has both primary and secondary dns servers in.
 
Old 08-22-2006, 05:07 PM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Did the google ip from a web browser bring it up?
Only other thought if IP and gateway correct is maybe mac filtering or ip filtering enabled.

Brian1

Last edited by Brian1; 08-22-2006 at 05:08 PM.
 
Old 08-22-2006, 05:55 PM   #7
mazzo
Member
 
Registered: Jun 2003
Location: Thames Valley, UK
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142

Original Poster
Rep: Reputation: 15
You are spot on!!!

MAC filtering was the problem. I guess I must've been getting tired and was confused by the ability of the server or the clients to talk to each other (ssh) no problem. The server just couldn't get out - and that was why. I had set up MAC filtering but got the MAC of the server one character out!

Brilliant - and thank you.
 
Old 08-22-2006, 06:15 PM   #8
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I ran into the same thing on my network one day. Tried adding another machine to do some repair on and could not get it to work. Worked on that for about 2 hours and said I going to bed. I was laying there running my network through my mind and bam MAC FILTERING. Got up and added to the filter bam online.

Glad it is working now. Happy to be of help.
Brian1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Connect to Internet with Static IP deejross Linux - Networking 3 03-14-2006 09:32 AM
unable to access internet with static IP Big_Fatcow Linux - Networking 6 02-05-2006 09:36 AM
unable to use internet with static ip aw_wolfe Linux - Newbie 6 04-20-2005 06:40 PM
static ip, no internet... dslboy Slackware 4 09-19-2004 11:22 AM
changed ifcfg from dhcp to static ip monc Linux - Software 3 01-21-2004 08:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration