Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

changing ip address in RHEL5.3

0 views
Skip to first unread message

snehap...@gmail.com

unread,
Mar 14, 2009, 7:34:02 AM3/14/09
to
Hi all,
I am new to use linux. I have installed RHEL 5.3. While installing, I
chose the ip address to be set by DHCP.
The internet connection was working very well. But as I changed IP
address to static one using following command
ifconfig eth0 158.157.182.1
the internet connection went down.
What could be the reason.
Any help appreciated.
Thanks in advance.

Baron

unread,
Mar 14, 2009, 9:46:41 AM3/14/09
to
snehap...@gmail.com wrote:

Unless you have a static address assigned to you, change it back to DHCP
and all will be well !

--
Best Regards:
Baron.

Jean-David Beyer

unread,
Mar 14, 2009, 10:30:37 AM3/14/09
to
Wow! Who do you work for?

$ whois 158.157.182.1
[Querying whois.arin.net]
[whois.arin.net]

OrgName: DoD Network Information Center
OrgID: DNIC
Address: 3990 E. Broad Street
City: Columbus
StateProv: OH
PostalCode: 43218
Country: US


--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 10:25:01 up 52 days, 1:16, 3 users, load average: 4.03, 4.14, 4.20

Allen Kistler

unread,
Mar 14, 2009, 2:39:49 PM3/14/09
to
snehap...@gmail.com wrote:
> I am new to use linux. I have installed RHEL 5.3. While installing, I
> chose the ip address to be set by DHCP.
> The internet connection was working very well. But as I changed IP
> address to static one using following command
> ifconfig eth0 158.157.182.1
> the internet connection went down.
> What could be the reason.

Because there's more to IP than just the address. If you want to change
your address, either edit /etc/sysconfig/ifcfg-eth0 or run
system-config-network, then ifdown and ifup on eth0. Since you're a
newbie, I'd suggest using system-config-network until you figure out how
networks work.

snehap...@gmail.com

unread,
Mar 16, 2009, 12:08:42 AM3/16/09
to
On Mar 14, 7:30 pm, Jean-David Beyer <jeandav...@verizon.net> wrote:
> Baron wrote:

that is a random address i typed, mine ofcourse is different one.

ynotssor

unread,
Mar 16, 2009, 12:20:53 AM3/16/09
to
In news:d819b035-263b-40a3...@a39g2000yqc.googlegroups.com,
snehap...@gmail.com <snehap...@gmail.com> typed:

> that is a random address i typed, mine ofcourse is different one.

Then don't pollute Usenet and the actual address owner's environemt. Use a
bogus address such as w.x.y.z.


snehap...@gmail.com

unread,
Mar 16, 2009, 12:50:07 AM3/16/09
to
On Mar 14, 6:46 pm, Baron <baron.nos...@linuxmaniac.nospam.net> wrote:

ok, when I changed back to DHCP, it worked,but I have a static address
with me. I don't want DHCP address any longer.
so, I want network connection to work with that static address. Could
you please guide me in that direction, Thanks.

snehap...@gmail.com

unread,
Mar 16, 2009, 12:53:29 AM3/16/09
to
On Mar 14, 11:39 pm, Allen Kistler <ackist...@oohay.moc> wrote:

I have been able to change IP address as you said, but still network
connection is not working with the changed ip.
could you provide more details as in what additional configurations I
need to perform for network connection. Thanks for your reply.

snehap...@gmail.com

unread,
Mar 16, 2009, 12:56:27 AM3/16/09
to
On Mar 16, 9:20 am, "ynotssor" <ynots...@invalid.org> wrote:
> Innews:d819b035-263b-40a3...@a39g2000yqc.googlegroups.com,
> snehapshi...@gmail.com <snehapshi...@gmail.com> typed:

>
> > that is a random address i typed, mine ofcourse is different one.
>
> Then don't pollute Usenet and the actual address owner's environemt. Use a
> bogus address such as w.x.y.z.

I apologize for that.

Baron

unread,
Mar 16, 2009, 5:14:56 AM3/16/09
to
snehap...@gmail.com wrote:

> On Mar 14, 6:46 pm, Baron <baron.nos...@linuxmaniac.nospam.net> wrote:
>> snehapshi...@gmail.com wrote:
>> > Hi all,
>> > I am new to use linux. I have installed RHEL 5.3. While installing,
>> > I chose the ip address to be set by DHCP.
>> > The internet connection was working very well. But as I changed IP
>> > address to static one using following command
>> > ifconfig eth0 158.157.182.1
>> > the internet connection went down.
>> > What could be the reason.
>> > Any help appreciated.
>> > Thanks in advance.
>>
>> Unless you have a static address assigned to you, change it back to
>> DHCP and all will be well !
>>
>> --
>> Best Regards:
>> Baron.
>
> ok, when I changed back to DHCP, it worked,but I have a static address
> with me.

Is this a static address supplied by your ISP ?
How do you connect to the internet, by a modem or router ?

> I don't want DHCP address any longer.
> so, I want network connection to work with that static address. Could
> you please guide me in that direction, Thanks.

--
Best Regards:
Baron.

snehap...@gmail.com

unread,
Mar 16, 2009, 6:07:41 AM3/16/09
to
> Is this a static address supplied by your ISP ?
it is supplied by my network admin.

> How do you connect to the internet, by a modem or router ?
by router.

Jean-David Beyer

unread,
Mar 16, 2009, 6:51:13 AM3/16/09
to

Then why not ask your network admin for help? (S)He would know more about
the addresses and names on your network.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org

^^-^^ 06:50:01 up 6 min, 3 users, load average: 4.24, 2.74, 1.23

snehap...@gmail.com

unread,
Mar 16, 2009, 7:07:25 AM3/16/09
to
> Then why not ask your network admin for help? (S)He would know more about
> the addresses and names on your network.
Hmm, that was obvious question I was expecting :-)
But I wanted to do it myself, so that I will be able to figure out
networking problems in future.

Jean-David Beyer

unread,
Mar 16, 2009, 7:22:02 AM3/16/09
to

Perhaps your network admin could explain this to you. Learning by hands-on
experience can, if well done, be much quicker and easier than reading from a
book or the Internet, because it is more interactive.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org

^^-^^ 07:20:01 up 36 min, 3 users, load average: 4.22, 4.20, 3.78

Baron

unread,
Mar 16, 2009, 8:32:36 AM3/16/09
to
snehap...@gmail.com wrote:

>> Is this a static address supplied by your ISP ?
> it is supplied by my network admin.

So this is not a domestic network !

If I were your admin I would be quite upset that you weren't discussing
your issue with me ! Indeed what you are doing could be against
company policy !

>> How do you connect to the internet, by a modem or router ?
> by router.

--
Best Regards:
Baron.

snehap...@gmail.com

unread,
Mar 16, 2009, 8:57:58 AM3/16/09
to
I am quite honest with my institute and my institute knows that.

John Hasler

unread,
Mar 16, 2009, 9:15:07 AM3/16/09
to
This router you refer to: is it between you and the network run by your
network admin, or is it between his network and the internet?
--
John Hasler
jo...@dhh.gt.org
Dancing Horse Hill
Elmwood, WI USA

Greg Russell

unread,
Mar 16, 2009, 12:30:44 PM3/16/09
to
In news:825e2c2e-9c7c-429e...@h5g2000yqh.googlegroups.com,
snehap...@gmail.com <snehap...@gmail.com> typed:

You can "figure out" things without actually changing them. As a network
admin I view users (root or otherwise) attempting to change such parameters
as a security violation.


Baron

unread,
Mar 16, 2009, 12:59:15 PM3/16/09
to
snehap...@gmail.com wrote:

In that case this may help.

<http://www.faqs.org/rfcs/rfc1180.html>

--
Best Regards:
Baron.

Baron

unread,
Mar 16, 2009, 12:59:20 PM3/16/09
to
snehap...@gmail.com wrote:

> I am quite honest with my institute and my institute knows that.

The point is that you should be discussing this with your admin !
Whether or not (S)He is prepared to spend the time helping you is
another matter.

Its good to find out things for yourself ! But you need to be
accountable for the things you do ! On your own network if you cause a
problem it doesn't affect anybody else and you get to fix it ! That is
not true if there are other users that may be affected.

You say that DHCP works for you and so it should. If your admin had
really assigned you a static address then the change should have
worked !

--
Best Regards:
Baron.

David W. Hodgins

unread,
Mar 16, 2009, 12:59:05 PM3/16/09
to
On Mon, 16 Mar 2009 07:07:25 -0400, <snehap...@gmail.com> wrote:

> But I wanted to do it myself, so that I will be able to figure out
> networking problems in future.

It still isn't clear to me whether the static ip address you've been
given is supposed to be the address assigned to the router, or
if it's the address the router has been configured to use for your
computer.

If the static address is for the router, please identify which
make and model of router is being used.

If the address is for your computer, edit
/etc/sysconfig/network-scripts/ifcfg-eth0 to be similar to the following

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.10.101
NETMASK=255.255.255.0
GATEWAY=192.168.10.1
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=yes
USERCTL=yes
DNS1=127.0.0.1
DNS2=216.240.0.1
RESOLV_MODS=no

Then run "ifdown eth0" followed by "ifup eth0".

I'm running Mandriva, so the path to the file may be different.

More information, like the first octet of the real ip address would
make it easier to determine what you are trying to do.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)

Darren Salt

unread,
Mar 16, 2009, 1:46:27 PM3/16/09
to
I demand that ynotssor may or may not have written...

192.0.2.0/24 is good for example usage (and blackholing).

--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Use more efficient products. Use less. BE MORE ENERGY EFFICIENT.

You will be the victim of a bizarre joke.

ynotssor

unread,
Mar 16, 2009, 2:05:51 PM3/16/09
to
In news:504278115C%ne...@youmustbejoking.demon.cu.invalid,
Darren Salt <ne...@youmustbejoking.demon.cu.invalid> typed:

> {oneninetwo}.0.2.0/24 is good for example usage (and blackholing).

No it isn't. Involving an address that belongs to ep.net is the exact same
problem as the OP introduced.

If you want to use numeric IP addresses then either use your own
(80.176.152.238) or one from the RFC 1918 and RFC 4193 reserved address
range(s):

10./8
172.16./12
192.168./16

John Hasler

unread,
Mar 16, 2009, 2:38:33 PM3/16/09
to
Darren Salt wrote:
> {oneninetwo}.0.2.0/24 is good for example usage (and blackholing).

ynotssor writes:
> No it isn't. Involving an address that belongs to ep.net is the exact
> same problem as the OP introduced.

thumper/~ whois -H 192.0.2.0
Internet Assigned Numbers Authority RESERVED-192 (NET-192-0-0-0-1)
192.0.0.0 - 192.0.127.255
Internet Assigned Numbers Authority IANA (NET-192-0-2-0-1)
192.0.2.0 - 192.0.2.255

Darren Salt

unread,
Mar 16, 2009, 11:38:54 PM3/16/09
to
I demand that ynotssor may or may not have written...

> In news:504278115C%ne...@youmustbejoking.demon.cu.invalid,


> Darren Salt <ne...@youmustbejoking.demon.cu.invalid> typed:
>> {oneninetwo}.0.2.0/24 is good for example usage (and blackholing).

> No it isn't. Involving an address that belongs to ep.net is the exact same
> problem as the OP introduced.

> If you want to use numeric IP addresses then either use your own

> ({eightzero}.176.152.238) or one from the RFC 1918 and RFC 4193 reserved
> address range(s):

You need to read RFCs 3330 and 5156. You should pay particular attention to
paragraphs containing the words "documentation" and/or "example".

--
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army

| + Buy local produce. Try to walk or cycle. TRANSPORT CAUSES GLOBAL WARMING.

Internal error: unspeakable in Cthulhu at &[R'lyeh]

ynotssor

unread,
Mar 17, 2009, 3:27:33 PM3/17/09
to
In news:87fxhdm...@thumper.dhh.gt.org,
John Hasler <jo...@dhh.gt.org> typed:

> thumper/~ whois -H 192.0.2.0
> Internet Assigned Numbers Authority RESERVED-192 (NET-192-0-0-0-1)
> 192.0.0.0 - 192.0.127.255
> Internet Assigned Numbers Authority IANA (NET-192-0-2-0-1)
> 192.0.2.0 - 192.0.2.255

"tcptraceroute 192.0.2.117" might elucidate.


Moe Trin

unread,
Mar 18, 2009, 3:43:00 PM3/18/09
to
On Tue, 17 Mar 2009, in the Usenet newsgroup comp.os.linux.misc, in article
<72abt7F...@mid.individual.net>, ynotssor wrote:

>John Hasler <jo...@dhh.gt.org> typed:

>> thumper/~ whois -H 192.0.2.0
>> Internet Assigned Numbers Authority RESERVED-192 (NET-192-0-0-0-1)
>> 192.0.0.0 - 192.0.127.255
>> Internet Assigned Numbers Authority IANA (NET-192-0-2-0-1)
>> 192.0.2.0 - 192.0.2.255

>"tcptraceroute 192.0.2.117" might elucidate.

"might elucidate" what exactly? Using five different ISPs, three give
a '!H' (No Route To Host) at their perimeter routers, while the other
two black hole (no responses) from their perimeter out to _sixty_ hops.

Do yourself a favor and use a whois tool to query ARIN about the two
network names John lists above. Don't you have such a tool? Here:

[compton ~]$ whois -h whois.arin.net NET-192-0-2-0-1
[whois.arin.net]

OrgName: Internet Assigned Numbers Authority
OrgID: IANA
Address: 4676 Admiralty Way, Suite 330
City: Marina del Rey
StateProv: CA
PostalCode: 90292-6695
Country: US

NetRange: 192.0.2.0 - 192.0.2.255
CIDR: 192.0.2.0/24
NetName: IANA
NetHandle: NET-192-0-2-0-1
Parent: NET-192-0-0-0-1
NetType: Reassigned
Comment: Please see RFC 3330 for additional information.
RegDate:
Updated: 2002-10-14

[snip]

Gee Whiz - there is that reference to RFC3330 again. Did you look
that up?

3330 Special-Use IPv4 Addresses. IANA. September 2002. (Format:
TXT=16200 bytes) (Status: INFORMATIONAL)

and that document contains a paragraph which reads:

192.0.2.0/24 - This block is assigned as "TEST-NET" for use in
documentation and example code. It is often used in conjunction with
domain names example.com or example.net in vendor and protocol
documentation. Addresses within this block should not appear on the
public Internet.

Notice the last sentence, and compare that to what RFC3330 says about
another block you seem to have heard of:

192.168.0.0/16 - This block is set aside for use in private networks.
Its intended use is documented in [RFC1918]. Addresses within this
block should not appear on the public Internet.

And if you wonder why I chose to use ARIN for the whois query, please
look at http://www.iana.org/assignments/ipv4-address-space The
remarks on that page might even be enlightening - or boring, as they
ALSO refer to RFC3330 for some reason.

Old guy

0 new messages