LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2011, 02:46 PM   #1
exotichead
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Rep: Reputation: 0
Can't connect to Internet after changing the IP to STATIC in RHEL


Hi,
I'm a Newbie to Linux.

I have installed RHEL 5 in 4 machines.They are RAC Servers.

I changed the IP Address to static for my first machine and its working fine and i can connect to internet and access the host in my network.

I was able to change the IP Address to static for my other machines but cannot connect to Internet. I'm using eth0 to connect to internet with a LAN Connection.

I tried different ways by disabling the firewall and enabling a firewall. No Luck.

Can anyone please help me ..

Thanks in Advance.
 
Old 04-13-2011, 03:04 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
sounds like you've not set a gateway or something. you should show us the ifconfig of the working and non working boxes, and the output of "route -n" from each box as well.
 
Old 04-13-2011, 03:06 PM   #3
sibe
Member
 
Registered: Apr 2011
Location: Jakarta, Indonesia
Distribution: Fedora, CentOS
Posts: 122

Rep: Reputation: 21
Can you ping the gateway?
 
Old 04-13-2011, 03:25 PM   #4
exotichead
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks Chris for the reply.

Here is my working server configuration.


[root@headstream1 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:14:22:16:2A2
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18629202 errors:0 dropped:0 overruns:0 frame:0
TX packets:16832657 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:1225413654 (1.1 GiB) TX bytes:680927645 (649.3 MiB)

eth1 Link encap:Ethernet HWaddr 00:14:22:16:2A3
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

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:1871103 errors:0 dropped:0 overruns:0 frame:0
TX packets:1871103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:458568949 (437.3 MiB) TX bytes:458568949 (437.3 MiB)

[root@headstream1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.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
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth[B]0


Here is my unworking server config


eth0 Link encap:Ethernet HWaddr 00:11:43:E7:A1:50
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:60 (60.0 b) TX bytes:3648 (3.5 KiB)

eth1 Link encap:Ethernet HWaddr 00:11:43:E7:A1:51
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

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:1623 errors:0 dropped:0 overruns:0 frame:0
TX packets:1623 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4033040 (3.8 MiB) TX bytes:4033040 (3.8 MiB)

[root@headstream3 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.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
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

Thanks..
 
Old 04-13-2011, 03:29 PM   #5
exotichead
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Sibe,
I'm unable to ping the gateway.
100% packet loss from my unworking server.
 
Old 04-13-2011, 03:58 PM   #6
sibe
Member
 
Registered: Apr 2011
Location: Jakarta, Indonesia
Distribution: Fedora, CentOS
Posts: 122

Rep: Reputation: 21
Well you need to be able to ping the gateway. But that's weird, as your config looks fine. How about pinging to .102?
Do you have any VLAN setting on the switch?
 
1 members found this post helpful.
Old 04-13-2011, 04:28 PM   #7
exotichead
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks Sibe for your help.

It is the switch. I connected my first machine to switch and my other machines to the router.
I changed the other machine to the switch and i'm now able to ping the gateway and establish the connections in the network like ssh,ftp etc., but i'm still unable to connect to the internet.

do i need to add anything in /etc/resolve.conf file for connecting to the internet.

Thanks,
Susheel.
 
Old 04-13-2011, 04:39 PM   #8
sibe
Member
 
Registered: Apr 2011
Location: Jakarta, Indonesia
Distribution: Fedora, CentOS
Posts: 122

Rep: Reputation: 21
If you're able to ping 8.8.8.8 but not google.com for example, then you need to add your DNS ip to /etc/resolv.conf;

nameserver 1.2.3.4

-> 1.2.3.4 is your DNS address.


----
sibe
 
1 members found this post helpful.
Old 04-13-2011, 04:54 PM   #9
exotichead
LQ Newbie
 
Registered: Apr 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Yeah..
I added the dns server entry in /etc/resolv.conf file and was able to connect to internet now.


Thanks a lot for you help sibe.

Thanks,
Susheel.
 
Old 04-13-2011, 04:57 PM   #10
sibe
Member
 
Registered: Apr 2011
Location: Jakarta, Indonesia
Distribution: Fedora, CentOS
Posts: 122

Rep: Reputation: 21
Anytime Susheel..

and as you're happy with your config now, don't forget to mark this thread as solved


----
sibe
 
  


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
[SOLVED] Can't connect to internet using a static ip Nenya Linux From Scratch 10 01-17-2011 04:07 PM
can't connect to the internet using a static ip tjyorkshire Linux - Networking 11 07-03-2007 07:19 AM
internet cant connect with static in suse lsu420luv Linux - Networking 2 03-27-2006 02:27 AM
Cannot Connect to Internet with Static IP deejross Linux - Networking 3 03-14-2006 10:32 AM
Unable to connect to Internet when using static IP on SuSE 9.2 fyhuang Linux - Networking 2 01-26-2005 02:00 PM


All times are GMT -5. The time now is 07:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration