Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DHCP: How to connect into internet?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kaysauter
n00b
n00b


Joined: 08 Jul 2003
Posts: 32
Location: Zurich, Switzerland

PostPosted: Fri Jul 11, 2003 12:18 am    Post subject: DHCP: How to connect into internet? Reply with quote

Well, I'm new to gentoo and I haven't got much experience about networking. However, i've got ADSL via router. My card is a

Realtek Surecom EP-320X-R.

When I was installing with LiveCD I could connect into internet. But now, after installation, I can't connect it any more.

One question is: What do I have to write in /etc/hosts? Do I have to write in some IP number etc if my machine should broadcast them over DHCP?

The second question is which code I have to write in /etc/conf.d/net ? I think here to the example in install guide chapter 21 : 3c59x ? I dont find the module for this card.

The last question: Do I have something to switch on in kernel configration for dhcp or is this only supposed to use by servers?
Back to top
View user's profile Send private message
r_yuan
n00b
n00b


Joined: 07 Jun 2003
Posts: 66
Location: Montreal, Canada

PostPosted: Fri Jul 11, 2003 1:58 am    Post subject: Reply with quote

Code may require root priviledges.

Find out which ethernet card(s) you have in LiveCD or Knoppix with:
Code:
cat /proc/pci | grep Ethernet

Find the network module used in LiveCD or Knoppix with internet configured, do:
Code:
dmesg | grep eth[0-9]
lsmod

The module for a Realtek network card is likely to be 8139too.o.
Code:

lsmod
modprobe 8139too
lsmod

If it doesn't work, then you'll need either to recompile your kernel with network support or to find the correct network module. Else, if it works, you kernel can dynamically load your network module.

Look for eth0 in your network interfaces:
Code:
ifconifg -a | less

Since I'm not using a router to connect to the internet, I will assume from this point onwards.

I will point you to http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chap4 , more specifically at "Code listing 4.5: Network configuration with DHCP":
Code:
dhcpcd eth0

Test your connection with:
Code:
ping -c 3 www.yahoo.com

I haven't forgotten your questions, I just don't have answers for them. Perhaps other users will have answers for you.
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Fri Jul 11, 2003 2:14 am    Post subject: Re: DHCP: How to connect into internet? Reply with quote

kaysauter wrote:
One question is: What do I have to write in /etc/hosts? Do I have to write in some IP number etc if my machine should broadcast them over DHCP?

No. /etc/hosts is a local file that allows your machine to resolve machine names (e.g. machine.foo.com) to IPs. You shouldn't need to edit it. :) When you DHCP your IP address from your ISP, it will supply your machine with th proper DNS servers so that you can visit websites.

kaysauter wrote:
The last question: Do I have something to switch on in kernel configration for dhcp or is this only supposed to use by servers?

There is no kernel "switch" for DHCP unless you mean turning off TCP/IP support. :) Gentoo supplies the necessary software to get a DHCP addresses, net-misc/dhcpcd . Just edit /etc/conf.d/net to use DHCP
Code:
iface_eth0="dhcp"
Back to top
View user's profile Send private message
kaysauter
n00b
n00b


Joined: 08 Jul 2003
Posts: 32
Location: Zurich, Switzerland

PostPosted: Fri Jul 11, 2003 10:52 am    Post subject: Reply with quote

Quote:
root@ttyp0[knoppix]# cat /proc/pci | grep Ethernet
Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 16).

root@ttyp0[knoppix]# dmesg | grep eth[0-9]
eth0: RealTek RTL8139 Fast Ethernet at 0xd4944000, 00:02:44:25:5c:fe, IRQ 12
eth0: Identified 8139 chip type 'RTL-8139C'
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 45e1.
eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 45e1.

root@ttyp0[knoppix]# lsmod

*snip*
Module Size Used by Not tainted

8139too 17128 1

*snip*

root@ttyp0[knoppix]# ifconfig -a | less

eth0 Protokoll:Ethernet Hardware Adresse 00:02:44:25:5C:FE
inet Adresse:192.168.1.3 Bcast:192.168.1.7 Maske:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:296 errors:0 dropped:0 overruns:0 frame:0
TX packets:277 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:100
RX bytes:290569 (283.7 KiB) TX bytes:58362 (56.9 KiB)
Interrupt:12 Basisadresse:0x4000

root@ttyp0[knoppix]# less /etc/resolv.conf
search linet-services.de
nameserver 192.168.1.1

Interesting:

root@ttyp0[hda4]# cd lib/modules/2.4.20-gentoo-r5/kernel/drivers/net/
root@ttyp0[net]# ls
dummy.o

dummy.o is the only file. It seems to be a binary file.


pinging to www.yahoo.com was OK, no packets loss.

Did everything with Knoppix.

I've just now done the advice of devon, so I reboot now. Lets see what happens. :)

This happened: The connection failed again.

The failure message of the kernel after boot was:

Failed to bring eth0 up
ERROR: Problem starting needed services "netmount" was not started.

In the beginging of the messages by from the kernel I cant't read because the monitor quality is too bad, but it changes somes seconds later and then I can read the "new" messages. But I see that there are some other failure messages because I can see red !!. Where is the file of the kernel messages in gentoo?

Thanx
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Fri Jul 11, 2003 3:27 pm    Post subject: Reply with quote

When you boot using the Gentoo kernel and not Knoppix, what does "dmesg | egrep eth0" show? Same with ifconfig. You should get similar output.

kaysauter wrote:
But I see that there are some other failure messages because I can see red !!. Where is the file of the kernel messages in gentoo?

Check out this thread. "dmesg" will show some kernel information, but won't show failures when Gentoo tries to start services. :(
Back to top
View user's profile Send private message
Neje
n00b
n00b


Joined: 04 May 2003
Posts: 71
Location: Netherlands

PostPosted: Fri Jul 11, 2003 5:07 pm    Post subject: Reply with quote

In your kernel, in the kernel config Network device support -> Ethernet (10 or 100 Mbit), check if you haven't forgotten to compile in support for your Realtek card (I think there are two Realtek cards there, if unsure, I think you could just compile in support for both of them).
Also, did you do "rc-update add net.eth0 default"?
I know these suggestions are very basic, but it's often the little things.
Good luck,
Neje
Back to top
View user's profile Send private message
r_yuan
n00b
n00b


Joined: 07 Jun 2003
Posts: 66
Location: Montreal, Canada

PostPosted: Fri Jul 11, 2003 5:25 pm    Post subject: Reply with quote

For sure, you'll be using 8139too.o. Since /lib/modules/*/kernel/drivers/net/* contained only dummy.o, RealTek support was not compiled as a kernel module. I doubt that RealTek was compiled directly in the kernel. What is the output of "grep CONFIG_8139TOO /usr/src/linux/.config"?

Enable RealTek in your kernel:
Code:
cd /usr/src/linux
make menuconfig
    Network device support --->
      Ethernet (10 or 100Mbit) --->
        [*] Ethernet (10 or 100Mbit)
        [*]   EISA, VLB, PCI and on board controllers
        <*>     RealTek RTL-8139 PCI Fast Ethernet Adapter support
make dep && make clean bzImage modules modules_install
mount /boot
mv /boot/bzImage /boot/bzImage.bck
cp /usr/src/linux/arch/i386/boot/bzImage /boot
umount /boot
shutdown -r now

Note that I have opted to compile RealTek support directly in the kernel as opposed to creating a kernel module.

Now what is the output of "ifconfig -a | less"? I'm only interested in the portion beginning with eth0.
Back to top
View user's profile Send private message
kaysauter
n00b
n00b


Joined: 08 Jul 2003
Posts: 32
Location: Zurich, Switzerland

PostPosted: Fri Jul 11, 2003 9:45 pm    Post subject: Reply with quote

YEAH! These few words are written with lynx on gentoo!

[for controlling under windows again:]

:lol: r_yuan: CHEERS! *putting you a glass of champaign in your hands*

kay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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