Avatar billede ritajtaylor Nybegynder
18. april 2007 - 16:46 Der er 16 kommentarer og
4 løsninger

Linux network

How do I find out a dynamic ip address?
Avatar billede jazzjack Nybegynder
18. april 2007 - 23:00 #1
If you have configured your network adapter to use DHCP, then the protocol will do a broadcast on the network to ask for an IP address. It is up to the DHCP server to give it. You can see what your adapter is configured to in /etc/sysconfig/network-scripts/ifcfg-eth0 on RedHat ( and other distributions ). If BOOTPROTO=dynamic then you use DHCP, if its = Static then you use fixed IP.
Avatar billede ritajtaylor Nybegynder
19. april 2007 - 04:49 #2
Thank you very much. Just one more question. What do I type at the command prompt to get to find out the information if BOOTPROTO=dynamic.?
Avatar billede jazzjack Nybegynder
19. april 2007 - 08:27 #3
try cat /etc/sysconfig/network-scripts/ifcfg-eth0.
Avatar billede ritajtaylor Nybegynder
19. april 2007 - 09:03 #4
I am trying it now and will get back to you smart and helpful jazzjack.
Avatar billede ritajtaylor Nybegynder
19. april 2007 - 09:37 #5
I get BOOTPROTO=none. Are the ips dynamic or static? If they are static what do I type on the command line to find out the ip?
Avatar billede jazzjack Nybegynder
19. april 2007 - 10:08 #6
The easiest way is proberly to run /usr/bin/redhat-config-network
Avatar billede jazzjack Nybegynder
19. april 2007 - 19:27 #7
did redhat-config-network solve your problem?
Avatar billede ritajtaylor Nybegynder
20. april 2007 - 06:00 #8
I'll check and get back with you magical jazzjack.
Avatar billede ritajtaylor Nybegynder
20. april 2007 - 09:03 #9
I'm running CentOS release 4.2 and there is not a /usr/bin/redhat-config-network file but there is
/usr/bin/system-config-network. It is a symbolic link to /usr/bin/consolehelper and when I run
/usr/bin/system-config-network it is a GUI interface that asks to configure the system.
Avatar billede jazzjack Nybegynder
20. april 2007 - 09:34 #10
Well basically it is the same application. The main thing is that you can configure the network. :-)
Avatar billede ritajtaylor Nybegynder
20. april 2007 - 15:50 #11
The user explained today that his screen was hung and couldn't do anything but turn it off.
Avatar billede langbein Nybegynder
20. april 2007 - 18:02 #12
To check the ip on your local client, from shell: ifconfig

To check your external ip, from browser: http://www.myip.dk/
Avatar billede langbein Nybegynder
20. april 2007 - 18:03 #13
To renew the ip from the dhcp server, from shell:

dhcpcd or dhclient
Avatar billede jazzjack Nybegynder
20. april 2007 - 22:35 #14
Well if BOOTPROTO=none, then the interface is not configured to get an IP. If you can't change the file manually (/etc/sysconfig/network-scripts/ifcfg-eth0), then you must use an utility like system-config-network.

Why the user got stuck in the config console...Well can't give you a good answer on that one. I assume that the user ran the script as root.Right?

/jazz
Avatar billede ritajtaylor Nybegynder
23. april 2007 - 05:45 #15
I'll find out.
Avatar billede ritajtaylor Nybegynder
23. april 2007 - 12:15 #16
I can change BOOTPROTO in /etc/sysconfig/network-scripts/ifcfg-eth0. Do I type small or capital letters and do a make? Then what do I type as a command to get the dynamic ip address?
Avatar billede jazzjack Nybegynder
24. april 2007 - 08:27 #17
BOOTPROTO=dhcp
Avatar billede jazzjack Nybegynder
24. april 2007 - 08:28 #18
You dont need to do make. Just restart your network or boot the server.
Avatar billede ritajtaylor Nybegynder
24. april 2007 - 14:30 #19
How do I restart my network? Will anyone notice? People are on the server night and day.
Avatar billede jazzjack Nybegynder
25. april 2007 - 08:52 #20
I'm a little puzzled here... There is no IP on your LAN interface, and yet people are on the server day and night???

If this is a secondary interface then you can try:
cd /etc/sysconfig/network-scripts
./ifup eth1      (That is if it is eth1).

There is an ifdown script aswell.

If it is the primay network interface, then you have a problem.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester