You are not logged in.

#1 2008-11-27 08:08:31

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

[SOLVED] Manual IP configuration

Hi,
I have a question about IP configuration. Normally i use:
# dhcpcd eth1
to configure my ip address but how do I do it so I can choose my IP manually?
Thanks in advance

Last edited by zowki (2008-11-27 12:36:54)


How's my programming? Call 1-800-DEV-NULL

Offline

#2 2008-11-27 08:51:57

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: [SOLVED] Manual IP configuration

This would depend on the server you are connecting to, whether it's a router or your ISP's gateway. If you connect to the Internet via a router, you can likely disable DHCP within the router's administrative interface and configure a manual IP. Check your product's documentation for details.


thayer williams ~ cinderwick.ca

Offline

#3 2008-11-27 09:35:24

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [SOLVED] Manual IP configuration

IMO, the best solution is to configure the router (if you have access to it) to assign specific IPs to machines based on their MAC addresses -- that way you can keep using dhcpcd, which is the simplest option.

Another way is to use ifconfig/iwconfig/route tools instead of dhcpcd; or you can use something like netcfg which allows you to create a static IP profile and automates the process for you.

Offline

#4 2008-11-27 09:42:36

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED] Manual IP configuration

fwojciec wrote:

IMO, the best solution is to configure the router (if you have access to it) to assign specific IPs to machines based on their MAC addresses -- that way you can keep using dhcpcd, which is the simplest option.

Another way is to use ifconfig/iwconfig/route tools instead of dhcpcd; or you can use something like netcfg which allows you to create a static IP profile and automates the process for you.

I would prefer using the ifconfig/iwconfig/route tools or netcfg whatever it is. How do I use them?


How's my programming? Call 1-800-DEV-NULL

Offline

#5 2008-11-27 11:37:18

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Manual IP configuration

For ifconfig etc, read the man pages. For netcfg, read the Network Profiles wiki page and look in /etc/network.d/examples/.

Offline

#6 2008-11-27 12:36:34

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: [SOLVED] Manual IP configuration

Thanks I managed to do it with ifconfig. This is what I did;
# ifconfig eth1 192.168.0.110
# route add default gw 192.168.0.1

192.168.110 was the ip I wanted


How's my programming? Call 1-800-DEV-NULL

Offline

#7 2008-11-27 12:41:43

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: [SOLVED] Manual IP configuration

here's my usual routine for a wired connection through my own nice lil router:

# these vars are just there to show what goes where for ifconfig/route
@carddev=eth0
@myip=192.168.1.2
@netmask=255.255.255.0
@broadcast=192.168.1.255
@router=192.168.1.1

ifconfig @carddev @myip @netmask @broadcast
route add default gw @router

And define some dns-servers in /etc/resolv.conf

# /etc/resolv.conf
nameserver 4.2.2.1
nameserver 4.2.2.2
nameserver 4.2.2.3

Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

Board footer

Powered by FluxBB