LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-27-2010, 06:39 AM   #1
dssr
LQ Newbie
 
Registered: Nov 2009
Posts: 5

Rep: Reputation: 0
Static Network Configuration on RHEL


Hii all I am new to RHEL, plss help me to set up my static network connection

Here are my details :
IP : 172.16.152.137
Subnet : 255.255.255.192
Gateway : 172.16.152.191
Primary DNS : 172.16.0.1

to configure i took the following steps according to my knowledge
at first
#setup
I entered IP, Subnet, Gateway there
& when i see #ifconfig eth0
it's shown there & then to setup my DNS i modified /etc/resolv.conf
now it reads
# made by SOMETHING SOMETHING (i tried a PPPOE connection once)
# search localdomain
nameserver 172.16.0.1

but after this setup when i restart my network
#service network restart
while bringing up the eth0 the following message is displayed before [OK] -
RTNETLINK answers : Invalid Argument

now it seems either this setup is wrong or not sufficient to set up the connection, whenever i try to ping 172.16.0.1 it showing
connect : Network is Unreachable

plss suggest me the correct way
 
Old 04-27-2010, 08:35 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Post /etc/sysconfig/network-scripts/ifcfg-eth0
 
Old 04-27-2010, 04:24 PM   #3
dssr
LQ Newbie
 
Registered: Nov 2009
Posts: 5

Original Poster
Rep: Reputation: 0
here you go
DEVICE=eth0
HWADDR=00:1e:ec:96:75:8c
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.192
IPADDR=172.16.152.137
GATEWAY=172.16.152.191
USERCTL=no
IPV6INIT=no
PEERDNS=yes
BOOTPROTO=none
 
Old 04-27-2010, 04:57 PM   #4
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
What's your network setup? Are you using a router?
 
Old 04-27-2010, 05:05 PM   #5
dssr
LQ Newbie
 
Registered: Nov 2009
Posts: 5

Original Poster
Rep: Reputation: 0
well let me tell you, i dont know much about network, i am taking internet from an ISP who gave me these details to set up my net connection, in their side they must use router but i dont know the details of it, i can set up my net using these datas in windows,Fedora Core 9(though i used GUI tools)but here i tried everything of my knowledge but in vain,

btw i tried stopping my firewall and then ping the network but the results are same
 
Old 04-27-2010, 05:31 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Are you sure your gateway (default router) should be 172.16.152.191? Are you given a broadcast address?
 
Old 04-27-2010, 05:34 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@dssr:

I think he's asking if you use a "home router" (i.e. NAT device). If so, that's what you should be configuring with the static IP info. Your RHEL box would likely be a dhcp client in that case.

---

edit: Good point about the default router. That is almost certainly bogus. With 172.16.152.137/255.255.255.192 his network range is:

172.16.152.128 - 172.16.152.191

So 172.16.152.191 should be the broadcast address.

Last edited by anomie; 04-27-2010 at 05:39 PM.
 
Old 04-27-2010, 05:52 PM   #8
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
@dssr, please re-read you original document from ISP. Most likely your gateway is either 172.16.152.129 or 172.16.152.190.
 
Old 04-28-2010, 12:29 AM   #9
dssr
LQ Newbie
 
Registered: Nov 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Yeah i am provided with this informations only, i hv rechecked & yeah it's broadcast address, i figured that out before, it's odd but i dint understand it's implication,

rite now i am accessing net from fedora core 9 from my desktop with the same connection i am posting details of this machine -
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:24:21:32:96:76
inet addr:172.16.152.137 Bcast:172.16.152.191 Mask:255.255.255.192
inet6 addr: fe80::224:21ff:fe32:9676/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8255 errors:0 dropped:0 overruns:0 frame:0
TX packets:8182 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7137720 (6.8 MiB) TX bytes:1428544 (1.3 MiB)
Interrupt:23

this one matches with my laptop output (RHEL where i want to configure the connection)

but /etc/sysconfig/network-scripts/ifcfg-eth0 is different here
# nVidia Corporation MCP61 Ethernet
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:24:21:32:96:76
ONBOOT=yes
DHCP_HOSTNAME=localhost.localdomain
NM_CONTROLLED=no
TYPE=Ethernet

?????
 
Old 04-28-2010, 12:31 AM   #10
dssr
LQ Newbie
 
Registered: Nov 2009
Posts: 5

Original Poster
Rep: Reputation: 0
and btw when i goto setup
#setup
the DHCP is on, there's no static ip address is given there
i configure this Fedora 9 connection with GUI tools,
 
Old 04-28-2010, 05:26 AM   #11
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
If you set DHCP in RHEL also, it should work like on Fedora.

If you want to set it manually, then see the output of "ip route" command and use IP from last row.

Mine is:
Quote:
[root@kancelarija ~]# ip route
xxx.yyy.219.88/29 dev eth0 proto kernel scope link src xxx.yyy.219.91
192.168.204.0/24 dev vboxnet0 proto kernel scope link src 192.168.204.100
169.254.0.0/16 dev eth0 scope link
default via xxx.yyy.219.94 dev eth0
IP in the last row with default route (xxx.yyy.219.94) is my gateway address.
 
Old 04-28-2010, 10:14 AM   #12
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by dssr
Yeah i am provided with this informations only, i hv rechecked & yeah it's broadcast address, i figured that out before, it's odd but i dint understand it's implication
The implication is when you set your system's default router to a broadcast address, you're going to have a hard time with layer 3 communication (which means you're not leaving your subnet).
 
  


Reply



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
CentOS/RHEL Linux small network configuration help linux_newb Linux - Networking 4 01-15-2010 09:05 AM
RHEL Gnome GUI Network Configuration tool pellicle Linux - Networking 3 07-16-2008 11:16 AM
Network Configuration/Troubleshooting in Fedora 7 (static routing/hardware config) Linux_Questions Linux - Networking 20 10-15-2007 05:22 PM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 12:01 PM
Network configuration files: where to write the static ip? zvonSully Ubuntu 3 04-20-2005 03:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:35 AM.

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