You are not logged in.

#1 2007-05-15 20:57:09

dids22
Member
Registered: 2007-01-02
Posts: 251

change ip - bash command

hey
what is the command for get  ip address from the dhcp?

Offline

#2 2007-05-15 21:11:33

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: change ip - bash command

dhcpcd

Offline

#3 2007-05-15 21:19:59

dids22
Member
Registered: 2007-01-02
Posts: 251

Re: change ip - bash command

[root@myhost chch]# ifconfig eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255
[root@myhost chch]# ifconfig eth0 eth0      Link encap:Ethernet  HWaddr 00:0F:EA:5D:67:47 
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:576  Metric:1
          RX packets:519 errors:0 dropped:0 overruns:0 frame:0
          TX packets:323 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:121907 (119.0 Kb)  TX bytes:86505 (84.4 Kb)
          Interrupt:18 Base address:0xc000

[root@myhost chch]# dhcpcd eth0
Error, eth0: dhcpcd already running (/var/run/dhcpcd-eth0.pid)

hmm

Last edited by dids22 (2007-05-15 21:20:31)

Offline

#4 2007-05-15 21:22:49

High|ander
Member
From: Skövde, Sweden
Registered: 2005-10-28
Posts: 188
Website

Re: change ip - bash command

killall dhcpcd ; dhcpcd eth0


When death smiles at you, all you can do is smile back!
Blog

Offline

#5 2007-05-15 21:25:42

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: change ip - bash command

an easy way to do that is "dhcpcd [interface] -k"

Offline

#6 2007-05-15 21:32:42

dids22
Member
Registered: 2007-01-02
Posts: 251

Re: change ip - bash command

ty its working
there is a way to release the ip? (the ip will be 0.0.0.0)

Offline

#7 2007-05-16 09:13:36

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: change ip - bash command

release. dhcpcd [interface] -K as stated above.

Offline

Board footer

Powered by FluxBB