Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
For a few years I have been using 2 ethernet cards in my linux machine. 1(eth0) connects to my ISP;2(eth1) connects to a 10mb hub which has 2 windows pc's connected to it. eth1 has an assigned IP of 192.168.0.1.
I use 192.168.0.1 as my gateway to the internet when configuring my windows pc's.
Like I said everything has worked great..until now. I want to bail on the hub and put a 10/100Mbs switch in its place. I found a good deal on a netgear MR814 Router/Switch/wireless AP.
When I take a look at the settings for thie switch it uses an IP of 192.168.0.1(same as my eth1) and gateway of 19.168.0.1. So I changed my linux IP address to 192.168.0.2.
Now when I configure my windows, do I use 192.168.0.2 or 192.168.0.1 as my gateway?
Also, the connection to this switch is spotty. I can ping then it dies(few secs later). I am using a cheapo linksys 10/100 card in my linux. Anyone think this may be the problem?
thanks
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
The MR814 is a router, which, up to now, your linux box was. Typically, one puts the router between all computers and the ISP. However, if you want to have uninterrupted access for your linux box, you'll have to set up NAT and PAT on the router, open up a DMZ on the router, or put the linux box between the ISP and the router. You could set your linux box to be a router (say on the 10.0.0.0 network), and give the netgear router an "external" IP address of 10.0.0.2 and an internal IP address of 192.168.0.1 (your linux box's second ethernet card would be 10.0.0.1).
If the linksys 10/100 card was working with the hub, I'd suspect the router. . .
there is an easier way. You can use the thing as just a switch (a managed one at that). You can disable the DHCP server in the switch and connect it to the Linux box via the Uplink port (i think this has to be done using a crossover cable, i'd call netgear tech support). That way, you can use it as just a switch and not have to have it setup as 2 routers. It would be like the hub, only its managed (it has an IP) and its faster. Best way to find out how to set it up is to either check out the manual or call netgear. Atleast it worked for me calling Linksys, their tech support is pretty good, i think netgear probably offers the same.
edit:
if you do thist, the gateway will still be the linux box and everything can still be on the same subnet. (192.168.0.X or whatever)
Last edited by Robert0380; 06-15-2003 at 06:28 AM.
Thanks for the replys. Happy Fathers day to all the Dads out there.
The MR814 can be a router or a switch. Also, it can be wired or wireless. So It is 4 peices of equipment in one. I only want to use the switch as wired right now.
I did disable DHCP and tried to set it up as a lan switch, but the Linux box comm is iffy. I did plug the linux box into the regular port of the switch(not the ISP port). I thought the switch would act like two PC's talking to each other.
2 weeks ago I gought a plain CompUSA switch(with no router) and I had the same problems with the connection to my linux using that switch. So, I am tempted to change my linksys ethernet card out. I tried setting to Full duplex etc using mii-tools but no help. It would ping 3 then stop for 10 then ping 2 then stop. It was intermittent...strange.
Well,
I got it working.
The main issue was the cable believe it or not. I finally used the given patch cable form netgear and the connection from my linux to the router/switch worked. Of course I had to set-up the router to act like a switch.
To do this, I Set the internet address as 192.168.0.1. The I disabled dhcp. I then went into lan settings and changed the Ip address of the router/switch to 192.168.0.2 and used 192.168.0.1 as my gateway and everything seems to be working at 100Mbs full duplex.
If it aint broke dont fix it. I upgraded the firmware to the latest stuff released in may and now it wont accept my configuration.
It says"LAN and WAN cannot have the sam subnet"
Obviously I have them both on 255.255.255.0 because I want linux to supply the internet to the switch, but I also want my Windows PC's to tlak freely with Linux.
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
255.255.255.0 is not a subnet, it's a broadcast. 192.168.0 is your subnet. You either have to turn off the routing on the netgear (as Robert0380 suggested), use it as the only router or do something similar to my first post. . . I would probably just use it as the router and turn that bit off on the linux box. All your 'puters will be on the same subnet, and if you need to, you can put the linux box on the DMZ (don't ever leave a windows box open to the net).
Actually, to clarify, 255.255.255.0 is not a subnet or a broadcast. It's a subnet mask. Your subnet is fully defined by stating both the network address and the mask:
192.168.0.0/255.255.255.0
This is a network that has 254 possible host IP addresses. 192.168.0.0 is the network address, 192.168.0.255 is the broadcast address, and all in between are the other 254.
Another way you'll see this referenced is with CIDR notation:
192.168.0.0/24
This just means that the first 24 bits are set in the 32 bit subnet mask (the first 3 255s in 255.255.255.0)
I do not want to use this as a router. All i want is a switch.
Using the uplink port does not work at all. I had it working using a normal port, but I went and upgraded the damn firmware in hopes I would be able to turn off the wireless broadcasting sinceI am not using it. all it did was add restrictions on what I could use.
It was complaing about the subnet mask. 255.255.255.0 not being able to use the same for internet and LAN. I have dhcp turned off everywhere.
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
Quote:
Originally posted by jvannucci Actually, to clarify, 255.255.255.0 is not a subnet or a broadcast. It's a subnet mask. Your subnet is fully defined by stating both the network address and the mask:
192.168.0.0/255.255.255.0
This is a network that has 254 possible host IP addresses. 192.168.0.0 is the network address, 192.168.0.255 is the broadcast address, and all in between are the other 254.
Another way you'll see this referenced is with CIDR notation:
192.168.0.0/24
This just means that the first 24 bits are set in the 32 bit subnet mask (the first 3 255s in 255.255.255.0)
How embarressing! I apologize for the misinformation I provided above. I have no excuse for it either. jvannucci is, of course, correct.
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
Quote:
Originally posted by bruce1271 I do not want to use this as a router. All i want is a switch.
Using the uplink port does not work at all. I had it working using a normal port, but I went and upgraded the damn firmware in hopes I would be able to turn off the wireless broadcasting sinceI am not using it. all it did was add restrictions on what I could use.
It was complaing about the subnet mask. 255.255.255.0 not being able to use the same for internet and LAN. I have dhcp turned off everywhere.
Noithing else to do but return this junk.
Not allowing the use of the same subnet mask is silly. As jvannucci explained, the subnet mask is almost meaningless without further information.
Regardless, you should be able to set the IP addresses of all of your computers to be on the same subnet, plug them in to the network ports of the switch (with the same local subnet), and it should work as a switch on the LAN. If you have to, you can even set the WAN IP address of the router to pretty much any number (as long as it's not connected to the real world through the uplink or WAN port), and it should be happy providing packets between your local computers. You need to use straight through cat 5 cables between the switch and your computers. . .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.