LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-31-2003, 10:03 PM   #1
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
ifconfig: From DHCP to static IP


I have a little question here.

I connect my Slackware 9.0 machine to the Internet through a switch(hub?), then from the switch to the ADSL modem(with router function built-in), then to the Internet. When I do ifconfig I get the following information:

[QUOTE]
eth0 Link encap:Ethernet HWaddr 00:20:ED:23:57:5F
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:158 errors:0 dropped:0 overruns:0 frame:0
TX packets:173 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:85073 (83.0 Kb) TX bytes:27204 (26.5 Kb)
Interrupt:10 Base address:0x3f00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 b) TX bytes:100 (100.0 b)
[/QOUTE]

When I installed Slackware 9.0, I set it to use DHCP to probe for the network settings instead of using static IP. But this gives me some warning messages everytime I boot up. Although I can use the Internet without any problems but I feel no good with the warnings. So now I am thinking of setting it back to using static IP instead of DHCP.

How should I do that?

*p/s: I wanted to show you guys the warning messages but I can't find it when I do dmesg... sorry...

Thanks.
 
Old 08-31-2003, 11:08 PM   #2
65_289
Member
 
Registered: May 2002
Distribution: Ubuntu 5.04, Kanotix
Posts: 163

Rep: Reputation: 30
As root, try running "netconfig".

http://www.slackware.com/config/network.php
 
Old 09-01-2003, 12:54 AM   #3
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
I tried that but if I set the addresses statically, I cannot access webpages through Mozilla. However, when I do "ping 192.168.0.1"(which is the router modem), it works normally. I am wondering if this is because that I set the nameserver wrongly or ... well I have no idea... btw I don't have a nameserver in my network. The switch connects 6 computers but we are just sharing the Internet connection. All computers are working individually.

Thanks for your help
I think I will have to bear with the warning messages for a while
 
Old 09-01-2003, 11:37 AM   #4
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Quote:
I tried that but if I set the addresses statically, I cannot access webpages through Mozilla.
Did you add your ISP's DNS in /etc/resolv.conf
Here is an example of /etc/resolv.conf :
Code:
nameserver x.x.x.x
nameserver x.x.x.x
 
Old 09-01-2003, 10:53 PM   #5
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
No, I didn't. But I cannot try this now as I just switched to Vine Linux(a japanese distro) because I need full japanese support to complete my reports. I will go back to Slackware after I finish my reports and try the tips you gave me. Thanks a lot.
 
Old 09-02-2003, 04:08 AM   #6
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
It worked~~~!!!!

Quote:
Originally posted by Mathieu
Did you add your ISP's DNS in /etc/resolv.conf
Here is an example of /etc/resolv.conf :
Code:
nameserver x.x.x.x
nameserver x.x.x.x
You know what... after I overwrote Slackware with Vine... I felt like missing something.... So I wiped out FreeBSD on hda3 and put Slackware into it !

I tried the solution you told me and it wonderfully worked!!!
I know ppl at LQ.org are great~!

Thanks
 
  


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
IFConfig and static IP Buto Slackware 4 10-21-2004 03:47 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
Setting up static IP using ifconfig firefly2442 Linux - Networking 6 07-19-2004 09:57 AM
DHCP - Redhat - ifconfig/eth0 Akito Linux - Networking 6 09-28-2003 02:28 PM
ifconfig/netconfig in Redhat 9 (static IPs) GomiCowboy Linux - Networking 6 09-07-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:36 PM.

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