FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-01-2008, 06:04 PM
"max bianco"
 
Default Specifying a static I.P. address for a Fedora 8 box - having issues

On Jan 31, 2008 2:09 PM, Kevin Kempter <kevin@kevinkempterllc.com> wrote:

Hi List;

I've installed Fedora 8 on 2 of my home servers. I want to specify an I.P.
address so I did this.

Running KDE, went to K-Menu --> Administration --> Network

entered the root passwd


In the Network Config tool I clicked on edit and I see that the "Automatically
obtain IP address via dhcp" is checked.

If I run an ifconfig I get this:
$ /sbin/ifconfig
eth0 * * *Link encap:Ethernet *HWaddr 00:E0:4C7:71:44

* * * * *inet addr:192.168.1.4 *Bcast:192.168.1.255 *Mask:255.255.255.0

* * * * *inet6 addr: fe80::2e0:4cff:fed7:7144/64 Scope:Link
* * * * *UP BROADCAST RUNNING MULTICAST *MTU:1500 *Metric:1
* * * * *RX packets:1250431 errors:0 dropped:0 overruns:0 frame:0
* * * * *TX packets:726057 errors:0 dropped:0 overruns:0 carrier:0

* * * * *collisions:0 txqueuelen:1000
* * * * *RX bytes:1762907258 (1.6 GiB) *TX bytes:49097625 (46.8 MiB)
* * * * *Interrupt:18 Base address:0xa000

I have a firewall which has the IP 192.168.1.1 and it's setup as my dhcp

server. If I log into the firewall and see the LAN settings I see this:

Name:
Device Name: * *ixp1
Status: Connected
Network: * * * *LAN
Connection Type: * * * *Ethernet
MAC Address: * *00:c0:49:f4:32:b6

IP Address: * * 192.168.1.1
Subnet Mask: * *255.255.255.0
IP Address Distribution: * * * *DHCP Server
Received Packets: * * * 4873480

Sent Packets: * 6792793


So, I did the following:

1) clicked the Statically set IP address button and entered the following:
-- Address: * * * * * * * * 192.168.1.71

-- Subnet Mask: * * * * 255.255.255.0
-- Default Gateway: *192.168.1.1


2) Exit the network config tool and save my changes


3) restart the network:
/etc/init.d/network restart

Now if I run ifup, then look at the output of ifconfig I see this:
# ifconfig
eth0 * * *Link encap:Ethernet *HWaddr 00:E0:4C7:71:44
* * * * *inet addr:192.168.1.71 *Bcast:192.168.1.255 *Mask:255.255.255.0

* * * * *inet6 addr: fe80::2e0:4cff:fed7:7144/64 Scope:Link
* * * * *UP BROADCAST RUNNING MULTICAST *MTU:1500 *Metric:1
* * * * *RX packets:1562719 errors:0 dropped:0 overruns:0 frame:0
* * * * *TX packets:916632 errors:0 dropped:0 overruns:0 carrier:0

* * * * *collisions:0 txqueuelen:1000
* * * * *RX bytes:2178981981 (2.0 GiB) *TX bytes:62483658 (59.5 MiB)
* * * * *Interrupt:18 Base address:0xa000

At this point I can ssh/scp to/from the server via 192.168.1.71 however I

cannot get anywhere on the web. If I try and ping google I get this:

# ping www.google.com
ping: unknown host www.google.com


Now if I change the settings back to automatically get an IP via dhcp, and
restart the network then I can ping www.google.com and get a reply.


What am I doing wrong here?


Sounds like DNS issue. Statically set the DNS to the same IP as your default gateway or manually enter the actual ip of the DNS servers. I prefer the first option so you don't have to worry about updating dns entries unless you have some reason to use specific dns servers.


-Max


--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 02-02-2008, 01:01 PM
"Kenneth Lee"
 
Default Specifying a static I.P. address for a Fedora 8 box - having issues

> > 1) clicked the Statically set IP address button and entered the following:
> > -- Address: 192.168.1.71
> > -- Subnet Mask: 255.255.255.0
> > -- Default Gateway: 192.168.1.1
> >
> >
> > 2) Exit the network config tool and save my changes
> >
> > 3) restart the network:
> > /etc/init.d/network restart
> >
> > Now if I run ifup, then look at the output of ifconfig I see this:
> > # ifconfig
> > eth0 Link encap:Ethernet HWaddr 00:E0:4C7:71:44
> > inet addr:192.168.1.71 Bcast:192.168.1.255 Mask:255.255.255.0
> > inet6 addr: fe80::2e0:4cff:fed7:7144/64 Scope:Link
> > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> > RX packets:1562719 errors:0 dropped:0 overruns:0 frame:0
> > TX packets:916632 errors:0 dropped:0 overruns:0 carrier:0
> > collisions:0 txqueuelen:1000
> > RX bytes:2178981981 (2.0 GiB) TX bytes:62483658 (59.5 MiB)
> > Interrupt:18 Base address:0xa000
> >
> > At this point I can ssh/scp to/from the server via 192.168.1.71 however I
> > cannot get anywhere on the web. If I try and ping google I get this:
> >
> > # ping www.google.com
> > ping: unknown host www.google.com
> >
> > Now if I change the settings back to automatically get an IP via dhcp, and
> > restart the network then I can ping www.google.com and get a reply.
> >
> >
> > What am I doing wrong here?
> >
> >
> Sounds like DNS issue. Statically set the DNS to the same IP as your default
> gateway or manually enter the actual ip of the DNS servers. I prefer the
> first option so you don't have to worry about updating dns entries unless
> you have some reason to use specific dns servers.


Max is right, you have a DNS issue - you can fix this by manually
updating the contents of you /etc/resolv.conf file. You will have to
be root or able to use sudo to modify this file.

So the question is how do get the correct settings: If you have a
router, the you can get the settings from that. Just go to your
routers configuration web page (or whatever software allows you to
change router configuration), and find the primary and secondary DNS
addresses - should be in the wan config.
Add these to your /etc/resolv.conf file. Add "nameserver " without
quotes before each one.

Another method - If you have a windows pc attached to your
network/router/whatever and it is using DHCP, just type the following
at a dos prompt/command window:
ipconfig /all

Grab the lines (yours will be different):
IP Address. . . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 205.171.3.65
205.171.2.65


>From the information above, /etc/resolv.conf would be:
nameserver 192.168.1.1
nameserver 205.171.3.65
nameserver 205.171.2.65


It is possible that all you need is the first entry, and your router
will resolve your URL's into IP's.

Last solution: If all else fails, set your server back to DHCP, reboot
or restart /etc/init.d/network - now copy /etc/resolv.conf to
something like /etc/resolv.dhcp. Verify that you can ping -c3
www.yahoo.com for instance first. Then go back and set the static IP
up, and copy /etc/resolv.dhcp to /tec/resolv.conf. (Must be root to
use the cp command in the /etc directory). Either reboot or run
/etc/init.d/network restart as root or sudo (if it is setup).

Good Luck!
Ken

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 10:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org