You are not logged in.

#1 2008-04-04 19:26:46

The Orange Peanut
Member
Registered: 2008-01-06
Posts: 152

Static IP

I'm going to install Arch on my primary PC tonight because I've had it on my old PC that I have at my parents house and love it.  However, I've never been able to get a static IP to work; I've always had to choose dhcp.  I'm following the beginner's guide and I'm wondering:

1)  Is the gateway I configure the IP address of my router?  It's 192.168.1.1, like pretty much every other router.  I'm pretty sure that's how I did it on Ubuntu, but I want to make sure.

2)  What should my subnet mask be?  I assume its 255.255.255.0 because that's all I've EVER seen it set to for anything on a home network.

3)  What is my broadcast address?  I have no idea how I'm supposed to find that out.

4)  I haven't called my ISP to get my DNS server IP addresses, but there are two in my current /etc/resolv.conf file.  Is it safe to assume that those are the DNS servers I should use, and that the likelyhood of my ISP changing the IP addresses of those is unlikely?

Thanks for the help.  I'm headed down to the campus computer lab to print out the beginner's guide now smile

Offline

#2 2008-04-04 19:37:28

daf666
Member
Registered: 2007-04-08
Posts: 470
Website

Re: Static IP

you need something like this in your /etc/rc.conf:

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.1.1"
ROUTES=(gateway)

You can maybe find out your ISP's servers by typing this in bash:
nslookup ns1.yourisp.com
replace yourisp with the real domain of ur isp

Last edited by daf666 (2008-04-04 19:37:50)

Offline

#3 2008-04-04 20:10:15

The Orange Peanut
Member
Registered: 2008-01-06
Posts: 152

Re: Static IP

I know what it looks like, I'm asking if I have the right IP addresses for my gateway, netmask, and broadcast.  Are they going to be 192.168.1.1, 255.255.255.0, and 192.168.1.255 every time?

Offline

#4 2008-04-04 23:29:22

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Static IP

Broadcast is 192.168.1.255 providing your subnetmask is 255.255.255.0 (more than likely is).
If you're using dhcpd, the ip's in /etc/resolv.conf should be your default gateway. Depending on the router, some routers act as a dns server so you can specify the router's ip address.
I would consider it unlikely that your ISP would change name servers on you.


Website - Blog - arch-home
Arch User since March 2005

Offline

#5 2008-04-04 23:41:17

Tenken
Member
Registered: 2008-02-01
Posts: 126

Re: Static IP

To check if 192.168.1.1 is your routers IP address, type it into your browser's address bar, and you should get a web configuration interface for your router. All the information you will need it probably in there somewhere, for example, routers list their sub net mask, and also have the address of the DNS servers they are getting from your ISP.

For your broadcast address, here are a couple of example to figure it out.

IP: 1.2.3.4
Netmask: 255.0.0.0
Broadcast 1.255.255.255

IP: 1.2.3.4
Netmask: 255.255.0.0
Broadcast: 1.2.255.255

Offline

Board footer

Powered by FluxBB