SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi
The thing is that I've got a computer with multiple network cards, and can't connet it to internet. It looks like everything has been installed, but after
"ifconfig" I've got something like this, without eth0 and eth1
[HTML]lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)[/HTML]
Did you run "netconfig" and enter information about your network (to use either DHCP or explicitly tell about IP address, netmask, gateway)
Did you connect a network cable to the network card that represents "eth0" device? The "netconfig" command will use the information you entered to configure "eth0" so if you have connected "eth1" you won't have a working network
To see the answer to question (1) please show us the output of the commands:
Code:
cat /etc/rc.d/rc.inet1.conf | grep -v "^#"
and
Code:
cat /etc/resolv.conf
For the second question, you can check what interface is actually connected to the network by checking the output of these two commands (the second and third command are only needed if the first command doesn't show anything conclusive), and could you please post this output if you can't find the answer yourself? Run the commands as user "root". Look for "link" information, like "Link detected: yes" or "Link OK"
Code:
mii-tool
ethtool eth0
ethtool eth1
If it is the eth1 interface that is connected, then you will have to edit the file /etc/rc.d/rc.inet1.conf by hand, and apply all the values for eth0 that you find there (the array elements with [0]) to eth1 (the array elements with [1]), and after editing run
Hi
ok, here is output for
[HTML]cat /etc/rc.d/rc.inet1.conf | grep -v "^#"
[/HTML]
[HTML]
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
# the default 'eth4'
# 1360 when you use NAT'ed IPSec traffic.
# your default gateway
# server
# defined in rc.wireless.conf, by prepending
# 'WLAN_' to the parameter's name. Useful for
# those with multiple wireless interfaces.
# Some drivers require a private ioctl to be
# set through the iwpriv command. If more than
# one is required, you can place them in the
# IWPRIV parameter (space-separated, see the
# example).
[/HTML]
[HTML]cat /etc/resolv.conf
search hcl.org[/HTML]
[HTML]
mii-tool
eth0:no link
negotiated 100baseTx-FD, link ok
[/HTML]
[HTML]ethtool etho
ethtool eth1
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: Unknown ! (655525)
Duplex: Unknown ! (255)
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: no[/HTML]
I used 'netconfig' "DHCP", but it could be the same with "STATIC IP" for multiple network cards, probably.
isn't it?.
Thx, and sorry for that late respond, I've been out of town.
hmm..u dont seems to using DHCP here. Are you sure the same thing happens when u set to static ip using netconfig? Maybe you can try to edit the /etc/rc.d/rc.inet1.conf directly without using netconfig. just a guess
Both "mii-tool" and "ethtool eth0" report no link. I don't see any output from the "ethtool eth1" command, but in any case, the network card that you connected to your network is certainly not eth0.
In /etc/rc.d/rc.inet1.conf I can see that you only configured the eth0 interface (which is what happens when you run "netconfig").
The simplest solution is open the file "/etc/rc.d/rc.inet1.conf" in an editor such as vi or pico, and add DHCP support for the eth1 interface - change
Code:
USE_DHCP[1]=""
into
Code:
USE_DHCP[1]="yes"
This way, it will not matter which interface is connected - one gets an IP address from the DHCP server, and the other one will wait a while until it decides there is no DHCP server to be found.
Hi
I had have dhcp connection but I'll have 5 static IP addresses and I want to use 3 of them for diferent domains(http,ftp)?
Does that make any sense?.
Thx
If you mean you own multiple domains and want to run http and ftp server, for all of those domains, with different content for these domains, and tie an IP address to each domain, then what you want to read about is "virtual hosts".
You will also have to bind all those IP addresses to the single network interface of your computer - you can do that by directly editing /etc/rc.d/rc.inet1.conf and adding sections for network interface aliases. Suppose your external NIC is called eth0, then it's aliases would be called eth0:1 eth0:2 etc...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.