View previous topic :: View next topic |
Author |
Message |
Bugen n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 06 Dec 2005 Posts: 5
|
Posted: Wed Dec 07, 2005 3:41 pm Post subject: ipaddress |
|
|
Hi, I can't seem to figure out how to set my ipaddress, subnet mask, gateway, and dns server. I'm very new to linux and don't know many commands. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ecosta Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/310043608433483b7dcc92.gif)
Joined: 09 May 2003 Posts: 477 Location: Brussels,BE
|
Posted: Wed Dec 07, 2005 3:54 pm Post subject: |
|
|
Hi,
If you are using gentoo, I'd have a look at this manual... the best!
http://www.gentoo.org/doc/en/handbook/index.xml
If you are not, state your distro or do it all manually.
ifconfig can setup your network card
/etc/resolv.conf will hold your DNS information.
man is your friend
$ man ifconfig
$ man resolv.conf
Best of luck and keep in touch if you need more help... but if you do, we will need more info
Ed. _________________ Linux user #201331
A8N-SLI Delux / AMD64 X2 3800+ / 1024 MB RAM / 5 x 250 GB SATA RAID 1/5 / ATI Radeon X700 256MB. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Bugen n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 06 Dec 2005 Posts: 5
|
Posted: Wed Dec 07, 2005 10:00 pm Post subject: |
|
|
Ok here is the deal.
At school I need to have a "hard-coded" ip address and at work and home I use dchp.
I've used windows my entire life until now and I have been using gentoo for less than a month.
I'll take a look at the manuel but I honestly don't entirely know what to look for.
EDIT: Ok I found it in the manuel, is nameserver the same as a dns server on windows? Also, what is a broadcast ip for? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pops45042 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1249922890413a7fc09ee66.jpg)
Joined: 07 Jan 2004 Posts: 278 Location: Cincinnati, Ohio
|
Posted: Thu Dec 08, 2005 4:45 am Post subject: |
|
|
Welcome to Gentoo!
I believe all settings for your network can be found and configured in /etc/conf.d/net. Here you can specify DHCP, static IP's or whatever you need. If you need a more in-depth example, take a look at /etc/conf.d/net.example
And yes, "nameserver" is the same as a DNS server (Domain Name Server), as defined under the /etc/resolv.conf file. That file holds your nameservers. If you are using DHCP, then nameservers are normally added automatically, and if static IP is set, then you normally have to add a nameserver entry.
A broadcast address is basically the way your computer finds stuff on its local network. It sends data to this broadcast address and that data gets looked at by every network device on the local network. A broadcast address always ends in 255.
For instance if your IP is 192.168.1.123, then your broadcast address is 192.168.1.255. Every network device on that network 192.168.1.xxx's broadcast address is the same -> 192.168.1.255
Hope that helps,
Paul _________________ "That which does not kill me only postpones the inevitable"
Laugh at my old system!
AMD Opteron 165@ 2750Mhz, 2gig 400mhz Cas2 Crucial Ballistix, Abit NF8 Ultra MB, WD 80gig (system), WD 120gig (storage), Geforce 8800GTS 320MB, Mushkin 550W PS |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ecosta Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/310043608433483b7dcc92.gif)
Joined: 09 May 2003 Posts: 477 Location: Brussels,BE
|
Posted: Thu Dec 08, 2005 9:11 am Post subject: |
|
|
If your computer has to juggle between static and DHCP you will have problems.
What I recomend you do, unless someone has a better idea, is to write a script you can launch when you are at school to set your static address.
So in short, set your network interface to use DHCP and then write a script that will set a static address if eth0 isn't up. I'm no good at scripting so no laughing ok
as root, run or add it to /etc/conf.d/local.start
Code: |
#! /bin/bash
if [ `ifconfig eth0 | grep inet | wc -l` -lt 1 ]; then
ifconfig eth0 111.222.333.444 netmask 255.255.255.0
fi
|
You might also have problems with your DHCP changing your /etc/resolv.conf (DNS) file so I would do a backup of your school settings (/etc/resolv.conf.school) and copy over the current one. Or just make sure DHCP can't over write the file and put the DNS of each location in your resolv.conf file instead... was that clear?
Best of luck.
Ed. _________________ Linux user #201331
A8N-SLI Delux / AMD64 X2 3800+ / 1024 MB RAM / 5 x 250 GB SATA RAID 1/5 / ATI Radeon X700 256MB. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
chrbecke Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/133843925942304840de767.jpg)
Joined: 12 Jul 2004 Posts: 598 Location: Berlin - Germany
|
Posted: Thu Dec 08, 2005 9:29 am Post subject: |
|
|
Have a look at this howto. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ecosta Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/310043608433483b7dcc92.gif)
Joined: 09 May 2003 Posts: 477 Location: Brussels,BE
|
Posted: Thu Dec 08, 2005 9:54 am Post subject: |
|
|
Well, so much for my pretty one liner
Better go with chrbecke recomendations
Thanks for the feedback chrbecke. _________________ Linux user #201331
A8N-SLI Delux / AMD64 X2 3800+ / 1024 MB RAM / 5 x 250 GB SATA RAID 1/5 / ATI Radeon X700 256MB. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|