You are not logged in.

#1 2009-07-26 00:05:14

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

[SOLVED] How to Connect to a Linksys Switch

Does anyone know how I can connect to a linksys ethernet switch? It seems dhcp isn't working....

Last edited by tony5429 (2009-07-27 22:03:30)

Offline

#2 2009-07-26 00:14:24

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [SOLVED] How to Connect to a Linksys Switch

Is it a switch or a router?

1) Switch = Level 2: understands Ethernet frames;
2) Router = Level 3: understands IP packets.

If it is a switch, just attach the right ethernet cable and you're good to go.

If it is a router, generally its address is 192.168.0.1 or 192.168.1.1 or 192.168.2.1; set your ip address to 192.168.x.10 and it should work.

Last edited by arkham (2009-07-26 00:17:40)


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#3 2009-07-26 03:47:36

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] How to Connect to a Linksys Switch

cat /dev/ethernet-cable/end1 > /dev/linksys/port
cat /dev/ethernet-cable/end2 > /dev/network/card

Sorry, you've given us a very terse description of your problem... Like going to the doctor and saying "It hurts" and nothing else.

What is the actual *problem*? At the moment, I'm assuming the problem is you can't browse the internet?
How have you determined that DHCP isn't working?
Does DHCP work with other distros / Windows?
What is your network configuration in /etc/rc.conf?
Have you tried setting a static IP address?
Are you getting any error messages? Copy and paste them here if you are.
Have you checked log files in /var/log/?

Last edited by fukawi2 (2009-07-26 03:47:57)

Offline

#4 2009-07-26 05:53:49

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: [SOLVED] How to Connect to a Linksys Switch

Yeah,  please give us more information. In this case everything can occurs, so we don't have so much time to describe everything for all question here in the forum, please specify your problem with the exact details.

Offline

#5 2009-07-26 06:02:43

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] How to Connect to a Linksys Switch

Sorry; I was in a hurry when I posted the question. The switch is not connected to the internet. I tried connecting to it the way I've always connected to routers in the past - using the network daemon during boot-up. But this time it failed - I think I got a dhcp timeout notification. In my /etc/rc.conf I have eth0="dhcp" and INTERFACES=(eth0). I also tried using WICD which I have installed on the computer (it's a laptop with a wifi chip) by enabling the wicd daemon, disabling the network daemon and blacklisting the eth0 interface; but when WICD tried to connect to the switch, I got an error saying it was unable to acquire an IP address. Please correct me if I am wrong but I suspect this all means I am going to need to specify my own static IP address as the switch is not going to assign one to me automatically. If that is the case, how do I go about specifying my own IP address? Thanks!!

Last edited by tony5429 (2009-07-26 06:06:45)

Offline

#6 2009-07-26 08:55:07

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] How to Connect to a Linksys Switch

tony5429 wrote:

Sorry; I was in a hurry when I posted the question. The switch is not connected to the internet. I tried connecting to it the way I've always connected to routers in the past - using the network daemon during boot-up. But this time it failed - I think I got a dhcp timeout notification. In my /etc/rc.conf I have eth0="dhcp" and INTERFACES=(eth0). I also tried using WICD which I have installed on the computer (it's a laptop with a wifi chip) by enabling the wicd daemon, disabling the network daemon and blacklisting the eth0 interface; but when WICD tried to connect to the switch, I got an error saying it was unable to acquire an IP address. Please correct me if I am wrong but I suspect this all means I am going to need to specify my own static IP address as the switch is not going to assign one to me automatically. If that is the case, how do I go about specifying my own IP address? Thanks!!

As mentioned by arkham, switches operate at Layer 2, which isn't aware of IP addresses (Layer 3). So if this is actually a switch (not a router) then no, you won't be able to get a DHCP lease from it since it's not running a DHCP server.

If there's nothing else on your network acting as a DHCP server, which it doesn't sound like there is, then you'll need to set a static IP.

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
#
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="eth0 10.16.1.175 netmask 255.255.255.0 broadcast 10.16.1.255"
INTERFACES=(eth0)

Offline

#7 2009-07-26 21:04:20

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] How to Connect to a Linksys Switch

Thanks so much fukawi2! That is exactly what I needed. One more question: I would also like to allow my QEMU virtual system to be able to connect to the switch. Typically I use the following script (where $user is my user name) to set up the connection (on a router):

sudo brctl addbr br0;
sudo ifconfig eth0 0.0.0.0;
sudo brctl addif br0 eth0;
sudo dhclient br0;
sudo tunctl -b -u $user;
sudo ifconfig tap0 up;
sudo brctl addif br0 tap0;

Do you know if I will have to change those commands so it will work on the switch?

Also, I know I'll have to configure the guest O/S to connect to a static IP - I can do that part smile

Last edited by tony5429 (2009-07-26 21:07:37)

Offline

#8 2009-07-26 23:36:07

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] How to Connect to a Linksys Switch

At a quick glance, those commands include a call to 'dhclient' so you'll probably need to replace that line with a command to add the static IP addresses for you.

Offline

#9 2009-07-26 23:58:27

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] How to Connect to a Linksys Switch

Hrm.. does that mean something like?

sudo ifconfig br0 192.168.x.x

Offline

#10 2009-07-27 01:23:53

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] How to Connect to a Linksys Switch

Something like that, yes... You'll probably also need to add a default route if your LAN is connected to the internet:

route add default gw X.X.X.X

And possibly DNS servers too if they're not already configured in /etc/resolv.conf:

echo "nameserver Y.Y.Y.Y >> /etc/resolv.conf

X.X.X.X = the IP address of your router
Y.Y.Y.Y = the IP address of your DNS server

Last edited by fukawi2 (2009-07-27 01:24:24)

Offline

#11 2009-07-27 22:03:16

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] How to Connect to a Linksys Switch

It worked! Thanks!!

Offline

Board footer

Powered by FluxBB