Re: Configuring hostname, domainname, and IP address
linuxquestion_at_yahoo.com
Date: 01/08/04
- Next message: san: "Re: Windows->Linux. Graphical terminal emulator."
- Previous message: philo: "Re: Running Linux on pentium 100mhz"
- In reply to: linuxquestion_at_yahoo.com: "Configuring hostname, domainname, and IP address"
- Next in thread: Garry Knight: "Re: Configuring hostname, domainname, and IP address"
- Reply: Garry Knight: "Re: Configuring hostname, domainname, and IP address"
- Reply: CL (dnoyeB) Gilbert: "Re: Configuring hostname, domainname, and IP address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 7 Jan 2004 15:27:51 -0800
Ok, I've got it working. This is what I did.
The fundamental problem was not going to be
solved by tweaking the hosts file. It was that
the ethernet drivers were not installed. Hmm.
Why the installation missed them, I don't know.
I downloaded the ethernet drivers specific for my
motherboard from intel: e100-2.3.33.tar.gz,
and installed it, using:
make install
I could then run a few commands to configure the
network on the fly.
insmod e100
ifconfig eth0 10.0.0.1
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
-----------
When I rebooted (shutup), /usr/sbin/kudzu came up.
It is a character based configuration tool for
new hardware. It prompted me for a few parameters
and then filled in the rest.
Everything seems fine now. The file ifcfg-eth0,
now exists in three places.
/etc/sysconfig/network-scripts/ifcfg-eth0: ASCII text
/etc/sysconfig/networking/devices/ifcfg-eth0: ASCII text
/etc/sysconfig/networking/profiles/default/ifcfg-eth0: ASCII text
and all have the same content:
cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.0.0.1
NETMASK=255.0.0.0
GATEWAY=10.255.255.254
cat /etc/resolv.conf
nameserver 10.0.0.1
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.255.255.254 0.0.0.0 UG 0 0 0 eth0
And, the machine can find itself as the IP address
that I assigned.
ping -c 1 10.0.0.1
PING 10.0.0.1 (10.0.0.1) from 10.0.0.1 : 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=0 ttl=255 time=18 usec
--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.018/0.018/0.018/0.000 ms
I'm sure that this one node network can be tweaked
better yet, but I'm glad to get the fundamentals working.
The now minor subject, how to config the /etc/hosts file,
seems to be a matter of preference. Depending on where
the hostname is listed first, a ping will return that IP address.
However, editing the host file did not solve the original
question of how to assign the local IP address.
I hope that others will post their solutions once
they are discovered, with specific commands and syntax
as I have done here.
Thanks for all your help.
---------------------------
linuxquestion@yahoo.com wrote in message news:<672ceaed.0401011713.7e5c12ca@posting.google.com>...
> HI,
>
> Sorry to ask another dumb question.
>
> I want to configure my Redhat Advanced server 2.1 to
> into a local network. I plan to have only two nodes.
>
> hostname: red
> ip address: 10.0.0.1
> domainname: testrac.com
>
> hostname: white
> ip address: 10.0.0.2
> domainname: testrac.com
>
> So far, I am only working with the first machine, red.
> I'm trying to get the machine to recognize itself as
> red.testrac.com, at IP 10.0.0.1. On domain: testrac.com
>
>
> I have modified these files:
>
> cat /etc/hosts
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1 red red.testrac.com localhost.localdomain localhost
> 10.0.0.1 red red.testrac.com
>
>
> cat /etc/sysconfig/network
> NETWORKING=yes
> HOSTNAME=red.testrac.com
>
>
>
> hostname
> red.testrac.com
>
> hostname --short
> red
>
> hostname --long
> red
> (odd. Why not the whole name?)
>
>
> domainname
> (none)
>
> dnsdomainname
> - nothing
>
>
> ping red.testrac.com
>
> PING red (127.0.0.1) from 127.0.0.1 : 56(84) bytes of data.
> 64 bytes from red (127.0.0.1): icmp_seq=0 ttl=255 time=281 usec
>
> - looks at 127.0.0.1, not 10.0.0.1
>
>
> ping 10.0.0.1
> connect: Network is unreachable
>
> ------------
>
> I would like the command domainname to return:
> testrac.com, and ping 10.0.0.1 to find itself.
>
> What am I missing here? It is something with the dns?
>
>
> Thanks
- Next message: san: "Re: Windows->Linux. Graphical terminal emulator."
- Previous message: philo: "Re: Running Linux on pentium 100mhz"
- In reply to: linuxquestion_at_yahoo.com: "Configuring hostname, domainname, and IP address"
- Next in thread: Garry Knight: "Re: Configuring hostname, domainname, and IP address"
- Reply: Garry Knight: "Re: Configuring hostname, domainname, and IP address"
- Reply: CL (dnoyeB) Gilbert: "Re: Configuring hostname, domainname, and IP address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|