cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
482
Views
0
Helpful
4
Replies

inter Vlan routing

bsudol79p
Level 1
Level 1

Hi, I have a layer 3 switch and I want to add a new VLAN to the switch. Howerver when I put in the new VLAN it doesn't show up as a directly connected network in the output of "show ip route"

I did not shut on the VLAN interface. When I do "show ip int brief" the interface is up but the Protocol is down. I do not know why this is. My guess is that the "ip default gateway" command is stopping the vlan from being entered as a directly connected network. I do have ip routing turned on. Can anyone tell me what I am missing? Thanks for the help!!!!!!

show ip int brief

Interface IP-Address OK? Method Status Protocol

Vlan1 172.24.1.3 YES NVRAM up up

Vlan25 172.25.1.2 YES manual up down

Vlan26 172.26.1.2 YES manual up down

show ip route

Gateway of last resort is 172.24.1.1 to network 0.0.0.0

172.21.0.0/24 is subnetted, 1 subnets

S 172.21.19.0 [1/0] via 172.24.1.2

S 172.23.0.0/16 [1/0] via 172.24.1.2

172.22.0.0/24 is subnetted, 1 subnets

S 172.22.19.0 [1/0] via 172.24.1.2

172.24.0.0/24 is subnetted, 1 subnets

C 172.24.1.0 is directly connected, Vlan1

S* 0.0.0.0/0 [1/0] via 172.24.1.1

show vlan

1 enet 100001 1500 - - - - - 0 0

25 enet 100025 1500 - - - - - 0 0

26 enet 100026 1500 - - - - - 0 0

1002 fddi 101002 1500 - - - - - 0 0

show run

ip default-gateway 172.24.1.2

ip classless

ip route 0.0.0.0 0.0.0.0 172.24.1.1

ip route 172.21.19.0 255.255.255.0 172.24.1.2

ip route 172.22.19.0 255.255.255.0 172.24.1.2

ip route 172.23.0.0 255.255.0.0 172.24.1.2

ip route 172.26.1.0 255.255.255.0 Vlan26

ip http server

interface Vlan1

ip address 172.24.1.3 255.255.255.0

ip directed-broadcast

no ip route-cache

!

interface Vlan25

ip address 172.25.1.2 255.255.255.0

!

interface Vlan26

ip address 172.26.1.2 255.255.255.0

!

ip default-gateway 172.24.1.2

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

Hi

Okay a number of things

1) Remove the "ip default-gateway 172.24.1.2" in your config. That is for when you do not have ip routing enabled.

2) If the vlan interfaces are down then do you have either

i) any trunk links configured on this switch. A trunk link that allows vlans 25 & 26 will bring those interfaces up.

or

ii) if you don't have a trunk you need at least one port in each vlan to bring that vlan interface up.

Jon

View solution in original post

Hi

No you still have ip routing as you also have a default route in your config ie.

ip route 0.0.0.0 0.0.0.0 172.24.1.1

If you do inter-vlan routing on the switch then you do not need the connection to the router to be a trunk port. As you say it only needs to be a trunk if you are doing routing on a stick. You should either

i) make the interface an access port and assign it into one of the vlans on the switch

ii) On the interface on the switch make it a routed connection ie "no switch port" and then use a /30 subnet to connect the router to your L3 switch.

Hope this makes sense

Jon

View solution in original post

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

Hi

Okay a number of things

1) Remove the "ip default-gateway 172.24.1.2" in your config. That is for when you do not have ip routing enabled.

2) If the vlan interfaces are down then do you have either

i) any trunk links configured on this switch. A trunk link that allows vlans 25 & 26 will bring those interfaces up.

or

ii) if you don't have a trunk you need at least one port in each vlan to bring that vlan interface up.

Jon

Thanks that is what I suspected, but in the show run it says "ip rotuting" so I thought that it is still turned on. I just have one switch at that location that is connected to the router. If I do inter vlan routing, does the connection between the switch and router have to be a trunk port? Or does that only pertain to router on a stick? Thanks

Hi

No you still have ip routing as you also have a default route in your config ie.

ip route 0.0.0.0 0.0.0.0 172.24.1.1

If you do inter-vlan routing on the switch then you do not need the connection to the router to be a trunk port. As you say it only needs to be a trunk if you are doing routing on a stick. You should either

i) make the interface an access port and assign it into one of the vlans on the switch

ii) On the interface on the switch make it a routed connection ie "no switch port" and then use a /30 subnet to connect the router to your L3 switch.

Hope this makes sense

Jon

vincent-n
Level 3
Level 3

A small suggestion from me:

1. I noticed that you're using vlan1 interface to reach default gateway 172.24.1.2. Suggesting that you should try to avoid using VLAN1 for routing/L2 switching but instead use it purely for management purposes.

2. If vlan 172.24.1.0 is a data vlan then create a vlan24 interface instead.

3. You don't have to trunk your router on a stick. Use your switch as L3 vlan routing and have your router connected to say vlan24 (172.24.1.2) on a switch port (int F1/0/1; switch acc vlan 24);

4. configure default route ip route 0.0.0.0 0.0.0.0 172.24.1.2 and get rid of ip default-gateway 172.24.1.2 command

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card