07-27-2022 05:07 AM
Hi all
I have question related to static routing on l3 switches
in this photo, static routing is configured through VLAN ...
i know that we can configure static routing through next-hop IP or exit interface but if we use VLAN how will the traffic leave the switch
I mean from which interface will the traffic leave to the next hop
08-02-2022 01:25 PM - edited 08-04-2022 06:59 AM
In my original reply, I mentioned "I.e. logically, SVI will be used for L3 egress, but L2 port, for that SVI, will depend on typical VLAN port selection." That's being said, again, by Rick.
Further understand, what both Rick and I are telling you, actual packet could flow out any one of the VLAN's port, which could also mean flowing across one or more L2 transit ports, until it reaches the VLAN's final physical egress port, which could be on, for example, another switch hosting that VLAN's ports. Further, there's a corner case where the packet might be sent out ALL of the VLAN's egress ports (see "unicast flooding").
08-03-2022 04:39 AM
Yes, exactly! That's what I'm trying to understand
07-28-2022 06:17 AM - edited 08-01-2022 03:01 PM
Hello there,
Your question is ".........but if we use VLAN how will the traffic leave the switch." Here comes my answer and solution to your problem.
According to your L3 (Multilayer) Switch configurations, VLANs data paket send and recive via interface G1/0/22 Switchport (in your terms "traffic leave the switch") to destination address and from originated address. Why I say that you have configured G1/0/22 as "Switchport trunk native vlan 249", "Switchport trunk encapsulation dot1q" and "Switchport mode trunk". You don't want have static route to communicate neighboring VLANS. L3 switches have inbuild ip routing protocol.
When you assigned Switchport trunk as a "native" then data Frame encapsulate with native VLAN tag before it leave from the port. In your case VLAN249. If you connect this G1/0/22 interface to other switch interface You have to configure that switchport also same name of VLAN like VLAN249 as a native. You cannot assign any other VLAN name as native.
Default native VLAN is VLAN1. If you not assigned any VLAN number to interface as a "native VLAN" it will choose default VLAN1 as a native.
Trunk Native VLAN
In your case in the moment working only VLAN1 and VLAN249 because other VLANs (33, 61, 400 and 564) you have not assigned to any port in your L3 switch. Therefore Vlan33, 61, 400 and 564 status and protocol shows "down/down" states. Due to this reason default VLAN1 take over the ownership of unassignsports as VLAN1. see below sh-vlan.png file. (You dont have to worry about G1/1/1-4 ports it might differ from your switch)
SH-Vlan
Ip Interface Brief Vlan
L3 switches having inbuilt IP routing mechanism. You have to activate ip routing by issuing "ip routing" in configuration/previlage mode. as L3_SW(config)# ip routing. Then it will do the rest.
I added extra configuration setup to your L3 switch as below.
L3-SW(config)#
L3-SW#config t
L3-SW(config)#ip dhcp pool Net249
L3-SW(dhcp-config)# network 10.0.249.0 255.255.255.0
L3-SW(dhcp-config)# default-router 10.0.249.23
L3-SW(dhcp-config)#ip dhcp pool Net1
L3-SW(dhcp-config)# network 10.10.10.0 255.255.255.0
L3-SW(dhcp-config)# default-router 10.10.10.1
L3-SW(dhcp-config)#!
L3-SW(dhcp-config)#!
L3-SW(dhcp-config)#ip routing
L3-SW(config)#
The interface G1/0/22 should connect to Router/Switch for data traffic flow. You can see the network design I drawn according to your L3 swith configuration. I have added R1 router G0/0 interface to connect L3-SW G1/0/22 interface for data traffic flow.
L3-Switch VLANs traffic
You have to do some extra work to configure R1 router now. Here belows I did it for you.
R1-AP-OT(config)#interface GigabitEthernet0/0
R1-AP-OT(config-if)# no ip address
R1-AP-OT(config-if)# duplex auto
R1-AP-OT(config-if)# speed auto
R1-AP-OT(config-if)#
R1-AP-OT(config)#interface GigabitEthernet0/0.1
R1-AP-OT(config-subif)# encapsulation dot1Q 1
R1-AP-OT(config-subif)# ip address 10.10.10.2 255.255.255.0
R1-AP-OT(config-subif)#exit
R1-AP-OT(config)#interface GigabitEthernet0/0.249
R1-AP-OT(config-subif)# encapsulation dot1Q 249 native
R1-AP-OT(config-subif)# ip address 10.0.249.2 255.255.255.0
R1-AP-OT(config-subif)#exit
R1-AP-OT(config)#interface GigabitEthernet0/0.33
R1-AP-OT(config-subif)# encapsulation dot1Q 33
R1-AP-OT(config-subif)# ip address 10.10.33.2 255.255.255.0
R1-AP-OT(config-subif)#exit
R1-AP-OT(config)#interface GigabitEthernet0/0.61
R1-AP-OT(config-subif)# encapsulation dot1Q 61
R1-AP-OT(config-subif)# ip address 10.61.10.2 255.255.255.0
R1-AP-OT(config-subif)#exit
R1-AP-OT(config)#interface GigabitEthernet0/0.400
R1-AP-OT(config-subif)# encapsulation dot1Q 400
R1-AP-OT(config-subif)# ip address 40.50.60.2 255.255.255.0
R1-AP-OT(config-subif)#exit
R1-AP-OT(config)#interface GigabitEthernet0/0.564
R1-AP-OT(config-subif)# encapsulation dot1Q 564
R1-AP-OT(config-subif)# ip address 5.5.5.2 255.255.255.0
R1-AP-OT(config-subif)#exit
R1-AP-OT(config)#
After configuration done, You can manage to ping diffirent VLAN ip address from the router and also you can do it visa versa.
R1 ping VLAN1
R1 ping VLAN249
I hope that you enjoy this positive solution for your problem. Give me a thumbs up as a solution is "Helpful". It will help for the others to slove their problem.
08-02-2022 12:35 PM - edited 08-02-2022 01:38 PM
ip route x.x.x.x x.x.x.x VLAN
it seem same BUT NOW
How the static route remove from the RIB ?
if the egress interface is Down or Optional track is down
here
we talk about egress interface L2 not L3 ? so L2 can not be config for static route, so how we solve this ?
we solve this with config static route with VLAN,
BUT VLAN how it related ?
the related is VLAN is DOWN when there is no L2 port UP assign for that VLAN
here I want to mention and if you return to my example I use VLAN 10 which only use for transit and in each SW there is only ONE L2 port assign to this VLAN (L2 port interconnect both SW).
so when this L2 port down the VLAN is down and static route remove.
08-03-2022 04:38 AM
Okay, I think I get you now
08-03-2022 04:35 AM - edited 08-04-2022 01:39 AM
Dears
I'd want to express my heartfelt gratitude to everyone
I appreciate your efforts and am delighted to have had this discussion with you all.
Thank you one again.
08-03-2022 04:42 AM
And you are so so welcome
08-03-2022 09:40 AM
Hi Bolybay,
Thanks to you also posting here that you have had in your mind. It is very good to have profession discussion and gained more knowledge and extra information.
Best regards,
Sisira
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide