hubs, switches, routers....?

PowerYoga

Diamond Member
Nov 6, 2001
4,603
0
0
I was wondering what the differences between those three are. IP address wise, i heard that the WAN IP of all the computers connected to the router is the same, but has different LAN ips.

I'm not sure about the hub and the switches. Please elaborate.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Generally hubs and switches don't have anything to do with IP addresses, all they do is forward packets from one port to another (or all ports in the case of a hub) based upon MAC address. Some hubs and switches can have an IP of their own for management purposes, but that usually has no bearing on how they forward packets.

A router connects two or more networks and forwards packets between them to make them work like one big network. The term WAN IP usually just means the IP that's non-local, for instance if you connect a router to your ISP and your network the cable from your ISP would be the WAN side. But if you use a router to connect one subnet on your local network to another subnet technically neither are the WAN.

What I think you're thinking of is NAT, a way for a router to hide the IP addresses of the machines behind it. Using NAT all the machines behind a router could connect to the Internet but the remote hosts on the Internet would see all the requests as coming from the 1 WAN IP on the router. You can probably find a better description if you look for Linux docs on IP Masquerading or using FreeBSD or OpenBSD as a NAT firewall, they'll have some OS specific things in them but the general ideas are the same.
 

JackMDS

Elite Member
Super Moderator
Oct 25, 1999
29,548
424
126