LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Static Network Configuration on RHEL (https://www.linuxquestions.org/questions/red-hat-31/static-network-configuration-on-rhel-804486/)

dssr 04-27-2010 06:39 AM

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

AlucardZero 04-27-2010 08:35 AM

Post /etc/sysconfig/network-scripts/ifcfg-eth0

dssr 04-27-2010 04:24 PM

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

sycamorex 04-27-2010 04:57 PM

What's your network setup? Are you using a router?

dssr 04-27-2010 05:05 PM

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

AlucardZero 04-27-2010 05:31 PM

Are you sure your gateway (default router) should be 172.16.152.191? Are you given a broadcast address?

anomie 04-27-2010 05:34 PM

@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.

DrLove73 04-27-2010 05:52 PM

@dssr, please re-read you original document from ISP. Most likely your gateway is either 172.16.152.129 or 172.16.152.190.

dssr 04-28-2010 12:29 AM

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

?????

dssr 04-28-2010 12:31 AM

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,

DrLove73 04-28-2010 05:26 AM

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.

anomie 04-28-2010 10:14 AM

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).


All times are GMT -5. The time now is 09:23 PM.