Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

ip changes

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
htb.support
n00b
n00b
Posts: 4
Joined: Fri May 06, 2011 12:20 pm

ip changes

  • Quote

Post by htb.support » Fri May 06, 2011 12:53 pm

Hi,

I tried to change the ip address using the following command :-

ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up

Ip gets changed, but after I reboot the machine, the ip is revert back to the old one. :oops:

Any solution on it ?

Thanks,
Austiin
Top
chiefbag
Guru
Guru
User avatar
Posts: 542
Joined: Fri Oct 01, 2010 11:08 am
Location: The Kingdom

  • Quote

Post by chiefbag » Fri May 06, 2011 1:14 pm

You need to set this in your /etc/conf.d/net file

something like the following should do.

Code: Select all

config_eth0=( "192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255" )
OR

Code: Select all

config_eth0=( "192.168.1.5" )
routes_eth0=( "default via 192.168.1.254" )
Top
htb.support
n00b
n00b
Posts: 4
Joined: Fri May 06, 2011 12:20 pm

How do I check if DHCP is enabled

  • Quote

Post by htb.support » Sun May 08, 2011 8:57 pm

I tried to follow the above steps and then restarted the /etc/init.d/net.eth0 service, but it does not take the ip address, it shows 192 ip instead of 203

Any suggestion would be appricated.

- Austin
Top
htb.support
n00b
n00b
Posts: 4
Joined: Fri May 06, 2011 12:20 pm

Rebboted

  • Quote

Post by htb.support » Sun May 08, 2011 9:48 pm

Also, after I reboot my system, it still shows Mode = Normal, which I think it should show DHCP

Any idea about this ?

- Austin
Top
Hu
Administrator
Administrator
Posts: 24386
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon May 09, 2011 1:12 am

Please show us the output of nl /etc/conf.d/net and the full output of the command you think is returning incorrect output.
Top
chiefbag
Guru
Guru
User avatar
Posts: 542
Joined: Fri Oct 01, 2010 11:08 am
Location: The Kingdom

  • Quote

Post by chiefbag » Mon May 09, 2011 7:56 am

I tried to follow the above steps and then restarted the /etc/init.d/net.eth0 service, but it does not take the ip address, it shows 192 ip instead of 203
Where are you getting the "203" figure from?, I did,nt see any reference to that in your initial nor the config that I posted so therefore I would not expect to see 203 in any part of the ip address or route.
Top
Sysa
Apprentice
Apprentice
User avatar
Posts: 161
Joined: Wed Mar 16, 2005 8:52 am
Location: Europe

  • Quote

Post by Sysa » Mon May 09, 2011 10:03 am

What is your baselayout?
RedHat -> SuSE -> Debian -> Gentoo
Top
htb.support
n00b
n00b
Posts: 4
Joined: Fri May 06, 2011 12:20 pm

Solved

  • Quote

Post by htb.support » Mon May 09, 2011 4:11 pm

Thanks for all you help.

I was able to resolve this issue, I simple disable DHCP and connect the machine to direct connection instead of going through a switch. :P

I understand it was a silly mistake from my end. Thanks again for your response.

- Austin
Top
Post Reply

8 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic