I am interested in using a cisco 2524 to backhaul two T1's. I was told that I could use secondary addressing to be able to use the 2524(with 2 t1 wics installed and 1 fixed ethernet port). So what I am confused on is how the switch would be able to deal with two networks on e0. What has to be done so that I can switch these two networks? Obviously, regular VLANs is not the answer, but I would guess part of it. Can someone shed some light on this for me?
basically, the idea with secondary addressing is that the client machines on your network can be in different subnets but still use one Ethernet interface as their default gateway. This concept can be extended by adding more secondary addresses.
Let´s say your clients are in subnets 192.168.1.0/24 and 172.16.3.0/24. On your Ethernet interface, you would configure the following:
ip address 192.168.1.1 255.255.255.0
ip address 172.16.3.1 255.255.255.0 secondary
The default gateway on your clients from the 192.168.1.0/24 subnet needs to be 192.168.1.1, and the default gateway for the clients from the 184.108.40.206/24 subnet needs to be 172.16.3.1. With this setup, both your networks can use one Ethernet interface, and still be routed. If you want to route your clients from both subnets out specific interfaces, you could use policy routing. Let´s say you want subnet 192.168.1.0/24 to be routed out interface Serial0, you config would look like this:
ip policy route-map OUT_SERIAL0
route-map OUT_SERIAL0 permit 10
match ip address 1
set interface Serial0
access-list 1 permit 192.168.3.0
Does this make sense ?
I a not asking about secondary addressing when it comes to routing. I need to know about the switching aspect.
On ethernet0 on the router, there will be a cable plugged in and that will plug into a switch. For me, that will be a 2924XL. Now, with two networks on ethernet0, how does a switch deal with that? What do I have to do with the switch for it to ba able to switch two networks? I mean the fact that two logical networks sharing a physical switch port is something that I am not familiar with. This is the part that I am hung up on.
That will not be a problem because the switch will be unaware of IP addresses. A 2924XL is purely layer-2. It has no idea that the stuff it is switching belongs to two different IP network. It just follows the rules about MAC addresses.
If, on the other hand, you want to implement the two IP networks as two separate VLANs, then you can do that as well. Just make the link from the switch into a trunk, so that it carries both VLANs, adding a tag to each frame to say which VLAN it belongs to. On the router, you create an Ethernet subinterface for each VLAN, and tell it which VLAN to look out for. BUT you cannot do that on your 2524 - you will need a 2600 series with a FastEthernet interface.
ok, so as usual, I am making things harder than they need to be.
If I am going to have two subnets on a switch that has all its ports on the same VLAN, what do I do for the default gateway? Can I have two default gateways...or a secondary default gateway?
I must say that I am a bit confused in hearing that I can run multiple networks on the same switch, without splitting the switch up.
Running two ranges of IP addresses on the same VLAN works fine for me. I just define a secondary IP address on the router for the second IP range. Machines in the first IP range use the main router IP address as default gateway, and machines in the second subnet use the secondary address. The two ranges can even talk to each other through the router, each using their own gateway address. You can even have multiple secondary addresses.