Layer 3 switch-function

Hai there, i reallly want to know how Layer 3 switch works? As it has both layer 3 routing as well as layer 2 switching...For example 3750 has both functions.How does switching and routing function are done??? Let us say port 1 act as default gateway for hosts(172.20.0.1,255.255.248.0) connected to a 2960 switch.Port 2- 5 are need to be connected to hosts in diffrent subnet (172.20.8.1,255.255.252.0).The SFP port of 3750 is connected to another 3750 (diffrent network,10.0.0.1)and ip range same as (172.20.8.0,255.255.255.252).How the traffic will be routed from outside network thru SFP and reach the pc's?how the traffic is between switched ports and routed ports?how the trafiice is between routed ports??

please do shower me some ideas reg this.......

Reply to
blue-birdy
Loading thread data ...

First, 'routed' ports are exactly what they say. They have an IP address just like a point to point link, and route. If you have a VLAN created with 5 access ports, the vlan interface (and therefore corresponding IP address) will not be on a port, but on a vlan interface that you logically create on the switch. Therefore, using your example, port 1 will go to a 2960, and will be an access or trunk port in the vlan that the 172.20.0.1 hosts are in. On the 3750, you will have a vlan interface with the IP of the gateway for that vlan. Ports 2-5 are the exact same thing, except they connect to hosts directly, but will still be access ports in a logical vlan that was created on the layer 3 switch. As for the SFP, that I presume is where you want your 'router' port, so that those two routers (the

3750s) can exchange knowledge about their respective networks. You would place a /30 or so in between them, with one IP on one side, and the other on the other 3750, and run a routing protocol with the proper networks statements (of the /30 and the other logical vlan interface networks). Basically, the first 3750 would switch everything internal to a vlan, internally route anything between vlans it owns/knows about, and route anything to networks it does not know about via its routing table, which in this example, only goes to the one upstream 3750.
Reply to
Trendkill

the switch tells the difference between packets to be switched and those that are going to be locally routed by looking at the MAC address

if the packet is targeted at the MAC for the routing function on that port, then it gets routed. If not then it is switched.

exactly how the port is set up decides whether a packet must be routed (no switchport), must be switched (no vlan IP interface for the incoming vlan), or whether both are possible.

if you download the manual from cisco.com then there are a bunch of diagrams that explain the choices made (and add in the complications, such as QoS processing).

Port 2- 5

ignore the topology since the main difference between a conventional IOS router and and IOS switch is how VLANs are treated.

on a router, any VLAN spec is local to a routed port - use the same 802.1Q vlan tag on 2 different ports and they are different interfaces.

On a switch the vlans are "global" to the box - vlan 10 on 1 port is the same as vlan 10 on another (and is layer 2 connected unless blocked by something such as a filter or private vlan setting).

the L2 vs L3 function doesnt affect how packets get routed once the switch is handling them via routing - the standard L3 forwarding functions of choose destination, update the IP field and rewrite the frame haape as always.

The only difference at this point is there is hardware to handle the forwarding without any CPU processing.

Reply to
stephen

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.