View previous topic :: View next topic |
Author |
Message |
diablo465 Apprentice
Joined: 10 Sep 2013 Posts: 194
|
Posted: Mon Dec 08, 2014 12:00 am Post subject: IP always change back to the orginal automatically [solved] |
|
|
I need to change my mac address to log on a network so that the machine can get ip address.
I usually use
Code: | ifconfig enp6s0 hw ether aa:bb:cc:dd:ee:ff |
or
Code: | ip link set dev enp6s0 adress aa:bb:cc:dd:ee:ff |
after that, one can see from ifconfig that the address has been changed to the one desired.
But, once dhcp starts off requesting ip, the ip address changes back to the original one the network card has, which results in no ip to the network system .
Gentoo used to work well using the abovementioned method. An recent update has caused this new problem. The UBUNTU system installed in the same computer still can get ip after using the abovementioned command.
Last edited by diablo465 on Wed Dec 10, 2014 10:29 pm; edited 1 time in total |
|
Back to top |
|
|
Schnulli Guru
Joined: 25 Jun 2010 Posts: 320 Location: Bremen DE
|
Posted: Mon Dec 08, 2014 1:08 pm Post subject: |
|
|
recompile your Kernel without DHCP-Auto , that would help you if you still want to use DHCPCD, i kicked it bec. the kernel can manage it fine
And dont forget to change/set your Symlinks in /etc/conf.d/ if your still on udev , the udev rules could be as well a reason, check them
<*> Packet socket │ │
│ │ < > Packet: sockets monitoring interface │ │
│ │ <*> Unix domain sockets │ │
│ │ < > UNIX: socket monitoring interface │ │
│ │ <M> Transformation user configuration interface │ │
│ │ [*] Transformation sub policy support │ │
│ │ [*] Transformation migrate database │ │
│ │ [*] Transformation statistics │ │
│ │ <M> PF_KEY sockets │ │
│ │ [ ] PF_KEY MIGRATE │ │
│ │ [*] TCP/IP networking │ │
│ │ [*] IP: multicasting │ │
│ │ [*] IP: advanced router │ │
│ │ [ ] FIB TRIE statistics │ │
│ │ [*] IP: policy routing │ │
│ │ [*] IP: equal cost multipath │ │
│ │ [ ] IP: verbose route monitoring │ │
│ │ [*] IP: kernel level autoconfiguration │ │
│ │ [*] IP: DHCP support ###!! deselect it if you want to use dhcpcd instead │ │
│ │ [ ] IP: BOOTP support │ │
│ │ [ ] IP: RARP support |
|
Back to top |
|
|
diablo465 Apprentice
Joined: 10 Sep 2013 Posts: 194
|
Posted: Wed Dec 10, 2014 10:29 pm Post subject: |
|
|
Thanks, deselecting DHCP support does help to preserve the new ip address.
But Somehow the laptop still can not get ip properly, which may result from some other reason.
I will mark this one solved. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3133
|
Posted: Wed Dec 10, 2014 11:03 pm Post subject: |
|
|
I suppose you're trying to use several ways to configure your network at the same time.
If you want to configure it manualy, remove net services from default runlevel.
If you want to configure network with static IP, use init scripts with static IP rather than automagic (e.g. empty config default to DHCP)
If you want to use DHCP set server correctly and don't mess with it manually. Half way through lease's lifetime it will attempt to rebind IP, so you can only be sure your setup will fail, sooner or later.
Finaly, if you use several networks and switch often, using some kind of manager might be the best way for you. There are plenty of those lying around, like networkmanager or wicd.
Pick ONE that suits your need. One. Not 2, not 3. They will conflict, possibly in ways you don't expect, but you will notice when it happens. And you likely will not know what the cause is. |
|
Back to top |
|
|
diablo465 Apprentice
Joined: 10 Sep 2013 Posts: 194
|
Posted: Mon Dec 15, 2014 1:02 am Post subject: |
|
|
Quote: |
I suppose you're trying to use several ways to configure your network at the same time.
If you want to configure it manualy, remove net services from default runlevel.
If you want to configure network with static IP, use init scripts with static IP rather than automagic (e.g. empty config default to DHCP)
If you want to use DHCP set server correctly and don't mess with it manually. Half way through lease's lifetime it will attempt to rebind IP, so you can only be sure your setup will fail, sooner or later.
Finaly, if you use several networks and switch often, using some kind of manager might be the best way for you. There are plenty of those lying around, like networkmanager or wicd.
Pick ONE that suits your need. One. Not 2, not 3. They will conflict, possibly in ways you don't expect, but you will notice when it happens. And you likely will not know what the cause is.
|
Thanks @szatox. I am trying to narronw down where am I and where to go in terms of the three methods to configure network.
I feel that I am under the third method. Currently networkmanager is enabled. but I am not sure how to figure out the commands that will be automatically excuted after the plugging in the network cable. Maybe there are several commands executed at the same time which are muturally conflicting, which causes the system stopped getting IP. |
|
Back to top |
|
|
diablo465 Apprentice
Joined: 10 Sep 2013 Posts: 194
|
Posted: Tue Jan 13, 2015 7:46 am Post subject: |
|
|
I have disabled the dhcpcd by
Code: | systemctl disable dhcpcd.service |
and disabled DHCP support in the kernel config
after plug in the network cable with changed ip, everything is working fine now. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|