PDA

View Full Version : Static IP & Name Resolution



Leguleius
07-26-2005, 05:26 AM
I have two questions:

1. How do I configure eth0 with a static IP address that it remembers everytime it boots up? (I am installed on the HD).

2. How do I make the computer NAME visible to Windows workstations?


Thank you.

holymoo
07-26-2005, 07:01 AM
1. I can't help you with, since that is the reason I'm at these forums right now...

2. Ok, become Root and going into /etc/samba/ and open up smb.conf with your favorite text based text editor. Then add "netbios name = NameOfServer

hopes this helps. The smb.conf file is pretty self explanatory.

UnderScore
07-26-2005, 08:00 AM
You must edit the /etc/network/interfaces file.
Yours might currently look like this
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Mine is
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.51
newtork 192.168.1.0
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255

Leguleius
07-26-2005, 09:17 AM
1. I can't help you with, since that is the reason I'm at these forums right now...

2. Ok, become Root and going into /etc/samba/ and open up smb.conf with your favorite text based text editor. Then add "netbios name = NameOfServer

hopes this helps. The smb.conf file is pretty self explanatory.

I'm afraid that didn't work. I still can't see the NAME from Windows.

Leguleius
07-26-2005, 09:26 AM
You must edit the /etc/network/interfaces file.
Yours might currently look like this
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Mine is
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.51
newtork 192.168.1.0
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255

I'm afraid this hasn't worked. Following is my current interfaces file:

auto lo eth0
iface lo inet loopback

iface eth0 inet static
address 10.10.1.151
network 10.10.1.1
netmask 255.255.255.0
gateway 10.10.1.1
broadcast 10.10.1.255

holymoo
07-26-2005, 11:00 PM
iface eth0 inet static
address 10.10.1.151
network 10.10.1.1
netmask 255.255.255.0
gateway 10.10.1.1
broadcast 10.10.1.255


Where did you come up with those address numbers? Are in a home network?[/quote]

UnderScore
07-26-2005, 11:14 PM
The network line is incorrect.

iface eth0 inet static
address 10.10.1.151
network 10.10.1.1
netmask 255.255.255.0
gateway 10.10.1.1
broadcast 10.10.1.255

Based on your IP & netmask, the network should be 10.10.1.0.

Also, how did you install Knoppix to the HD? What type of HD install did you do? See HD Install: Types of installation (http://www.knoppix.net/wiki/Hd_Install_HowTo#Types_of_installation).

Leguleius
07-27-2005, 01:11 AM
The network line is incorrect.

iface eth0 inet static
address 10.10.1.151
network 10.10.1.1
netmask 255.255.255.0
gateway 10.10.1.1
broadcast 10.10.1.255

Based on your IP & netmask, the network should be 10.10.1.0.

Also, how did you install Knoppix to the HD? What type of HD install did you do? See HD Install: Types of installation (http://www.knoppix.net/wiki/Hd_Install_HowTo#Types_of_installation).

I changed the network, as you suggested, with no effect.

I am using the Beginner Default install.

Leguleius
07-27-2005, 01:26 AM
iface eth0 inet static
address 10.10.1.151
network 10.10.1.1
netmask 255.255.255.0
gateway 10.10.1.1
broadcast 10.10.1.255


Where did you come up with those address numbers? Are in a home network?[/quote]

This is our office LAN.

UnderScore
07-27-2005, 01:54 AM
I am using the Beginner Default install.
I think this is the problem. The beginner & Knoppix installs are not normal and do not behave like a normal HD installed Linucx distro. I think it is breaking the networking. In fact, most Knoppix HD installs tend to break something, usually networking and this is why we recommend to not install Knoppix to the HD, especially beginner mode. The link I posted above explains in detail why the HD install is not recommended.



Two things to narrow down, (1) what version of the Knoppix CD did you use and (2) does your network connection work under a CD boot Knoppix?

To verify #2, if you still have the Knoppix CD, then boot off of it with the cheat code:
knoppix 2 nodhcp vga=normal
which will force knoppix to not use DHCP and will drop you to a root console prompt.

Then run the command:
netcardconfig
and configure the eth0. Again do not use DHCP and then input your static IP info.
Once that is successful, type:
ifconfig -a
to get a output of the eth0 and its net address.

Try pinging the gateway:
ping 10.10.1.1

If it is successful, then continue to confirm that the network is up. Use the command:
init 5
to go to the Knoppix KDE GUI and run firefox and browse either a local website or even an internet site.

If networking is fully working when boot off the CD, then something in the HD install has broken networking. I have a Debian 3.1 (codename sarge) PC that is working right next to me and the /etc/network/interfaces file I posted came from that PC. If the /etc/network/interfaces is failing on your system, then the HD install is to blame.


You need to decide if really want to run Knoppix from the HD, & if so, then you will need to re-run the knoppix-installer program and reinstall Knoppix to the HD. This time you should choose Debian method & not beginner or Knoppix method.

Please keep us updated with your progress.

Leguleius
07-27-2005, 01:57 AM
I am using the Beginner Default install.
I think this is the problem. The beginner & Knoppix installs are not normal and do not behave like a normal HD installed Linucx distro. I think it is breaking the networking. In fact, most Knoppix HD installs tend to break something, usually networking and this is why we recommend to not install Knoppix to the HD, especially beginner mode. The link I posted above explains in detail why the HD install is not recommended.



Two things to narrow down, (1) what version of the Knoppix CD did you use and (2) does your network connection work under a CD boot Knoppix?

To verify #2, if you still have the Knoppix CD, then boot off of it with the cheat code:
knoppix 2 nodhcp vga=normal
which will force knoppix to not use DHCP and will drop you to a root console prompt.

Then run the command:
netcardconfig
and configure the eth0. Again do not use DHCP and then input your static IP info.
Once that is successful, type:
ifconfig -a
to get a output of the eth0 and its net address.

Try pinging the gateway:
ping 10.10.1.1

If it is successful, then continue to confirm that the network is up. Use the command:
init 5
to go to the Knoppix KDE GUI and run firefox and browse either a local website or even an internet site.

If networking is fully working when boot off the CD, then something in the HD install has broken networking. I have a Debian 3.1 (codename sarge) PC that is working right next to me and the /etc/network/interfaces file I posted came from that PC. If the /etc/network/interfaces is failing on your system, then the HD install is to blame.


You need to decide if really want to run Knoppix from the HD, & if so, then you will need to re-run the knoppix-installer program and reinstall Knoppix to the HD. This time you should choose Debian method & not beginner or Knoppix method.

Please keep us updated with your progress.

I'm willing to do the reinstall this very minute! :) But before I do, will my laptop be auto-configured with the Debian install as it is now? I mean, I don't have to worry about setting up any of the devices, it figures it all out. Will it be the same under Debian?

UnderScore
07-27-2005, 02:07 AM
I make no absolute promises about it, but yes, it should detect the HW all the same. You did not tell me what version of the CD you are running. Each version breaks something and needs to be fixed in its own way.

Leguleius
07-27-2005, 02:13 AM
I make no absolute promises about it, but yes, it should detect the HW all the same. You did not tell me what version of the CD you are running. Each version breaks something and needs to be fixed in its own way.

I'm using the "latest" version -- it was downloaded just last week for me. The CD is marked Knoppix Linux 9.x.

I'm backing up the old install now -- it'll take about an hour. Then I'll repartition the drive, and install the Debian.

Thank you for your assistance thus far. I'll come back and let you know how things have gone, or if I encounter any difficulties in the interim.

paradigm_shift
07-28-2005, 12:23 AM
i can't ping and my attempts at setting gateway address failed. but at this point if i do dhcpcd ethx it works. any ideas?

paradigm_shift
07-28-2005, 12:26 AM
i can see access points on my wireless adapter configuration so i am connected to NIC but maybe name resolution failed??? but in dhcp settings it used gateway address as nameserver in /etc/resolv.conf. wtf??? i tried to set it the same way in command line for static configuration by `ifconfig ethx gw ---` but that doesn't work. it says host name not found!