Interface vlan 2 ip address a.b.c.d 255.255.255.0
Netstudent wrote: I don;t think that would ever happen. I mean most LANS use private addressing. But that is a good question. Could you have some switch's VLAN interface in one subnet and other switch's VLAN interface in another subnet. You could probably do it, you would just have to give the switches a different default gateways. So if you did run out of IP's in some given subnet, you could give the switches that need VLAN interface IP's an IP from another subnet. Then just give that switch the according default gateway for that subnet. Also can you provide the masks you are using for those ranges?
Tricon7 wrote: I was also told that if I'm connecting to the router-on-a-stick, then the fa 0/0 on the router connected to the switch shouldn't have an IP; it will only have subinterfaces (in my case, the IP of the first usable IP address on each network). You're saying this isn't so?
malcybood wrote: I've always learned for inter vlan routing you leave the physical interface with no ip address but obviously make sure it has the no shut command on it. I always make the switch management IP address and default gateway on the same subnet as the Native VLAN on the router config. The way I'd lab it out going on your addressing scheme is as follows:On router FA sub-if 0.1 corresponds to VLAN 1 192.168.1.160 /29 on switch 1 & 2 ip address - 192..168.1.161 FA sub if 0.2 corresponds to VLAN 2 ip address 192.168.1.129 255.255.255.224 FA sub if 0.3 corresponds to VLAN 3 ip address 192.168.1.1 255.255.255.128 FA sub if 0.2 corresponds to VLAN 4Switch 1 int vlan 1 ip address 192.168.1.162 255.255.255.248 ip default-gateway 192.168.1.161 assign ports to VLAN 2, 3 and 4Switch 2 int vlan 1 ip address 192.168.1.163 255.255.255.248 ip default-gateway 192.168.1.161 assign ports to VLAN 2, 3 and 4 Then your host addressing goes on from there for example the next usable host in VLAN 2 is 192.168.1.130 and you would assign this to a PC with s/m of 255.255.255.224 and default gateway of 192.168.1.129 I hope the above makes sense and I've not made any typos......correct me if i have
Tricon7 wrote: Ok, I followed most of this. I noticed that you have both switches on the same subnet. At least in dealing with a router-on-a-stick, is this usually the case, whether it's two or five switches?
Tricon7 wrote: One other niggling question I need answered - if I, say, have two switches connected to a router on a stick, I'll have both switches on the same subnet - VLAN 1 - and they'll have different IPs. Ok, if I have three hosts connected to the switches and they're on VLAN 2, VLAN 3, and VLAN 4 respectively, all the hosts will have a different default gateway than what's on the switches, right? The host default gateway has to belong to the VLAN networking range it belongs to, correct?