You are not logged in.
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
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
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
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
For ifconfig etc, read the man pages. For netcfg, read the Network Profiles wiki page and look in /etc/network.d/examples/.
Offline
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
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