Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Vlan over Routers & Switches

Hello,

I'm trying to solve a packet tracer problem but I'm running out of ideas and could do with some suggestions/help.

I have the following setup

1 switch as the backbone, which is linked to 4 routers linked to individual switches. From here each switch is connect to a computer each on a different VLAN. So for example 1 switch is connected to a computer on Vlan 2 then Vlan 3 and Vlan 4. The second switch is also connected to 3 computers again 1 on Vlan 2, another Vlan 3 and then Vlan 4. Finally the routers are WAN connected to each other. Hope that paints the picture.

Router 1 & 2 can ping each other over the WAN connection

The routers have trunking setup for each Vlan

If I ping from a PC on Vlan 2 to another PC on the same Vlan the ping fails. The packet leaves the PC, goes through the switch and into the router then the packet is dropped. The packet doesn’t go through the WAN connection.

I’ve ran out of ideas on what to check or change to either route the packet over the WAN of through the backbone?

Any ideas?

Everyone's tags (1)
28 REPLIES

Vlan over Routers & Switches

Hi Ian,

can you elaborate on a your design a bit more. I assume that each router has a SVI on VLANs 1, 2, 3. Is the subnet used on each the VLANs the same across all the routers? ie, Router1's VLAN1 is the same subnet as Router2's VLAN1 ? Do the routers run a routing protocol on the interface connected to the backbone?

My suspicion is that each VLAN across the routers share the same subnet, therefore the router doesn't try to send packets to the backbone since it is directly connected to the subnet you are trying to ping, albeit with the host attached to a VLAN on another router.

cheers,

Seb.

New Member

Vlan over Routers & Switches

Thank you for the reply

Each computer is on a different subnet, so each router is connected to 3 different subnets. I've used the first IP address for the subnet on the router for the Vlan setup to the switch. So when I look at router 2 there is a new set of 3 different subnets

I've setup OSPF on the routers and when I enter the show ip ospf neighbor command each router see's each other.

Vlan over Routers & Switches

OK, what about the output from all the routers from runnning:

show ip ospf route 

New Member

Vlan over Routers & Switches

Router 1

Router>show ip route ospf

     50.0.0.0/8 is variably subnetted, 11 subnets, 2 masks

O       50.25.220.4 [110/2] via 50.25.221.2, 00:13:57, Serial0/0/0

O       50.25.220.8 [110/3] via 50.25.221.2, 00:13:57, Serial0/0/0

O       50.25.220.12 [110/4] via 50.25.221.2, 00:13:57, Serial0/0/0

O       50.25.220.108 [110/3] via 50.25.221.2, 00:13:57, Serial0/0/0

O       50.25.221.4 [110/2] via 50.25.221.2, 00:13:57, Serial0/0/0

O       50.25.221.8 [110/3] via 50.25.221.2, 00:13:57, Serial0/0/0

Router 2

Router>show ip route ospf

     50.0.0.0/8 is variably subnetted, 11 subnets, 2 masks

O       50.25.220.0 [110/2] via 50.25.221.1, 00:14:47, Serial0/0/0

O       50.25.220.8 [110/2] via 50.25.221.6, 00:14:47, Serial0/0/1

O       50.25.220.12 [110/3] via 50.25.221.6, 00:14:47, Serial0/0/1

O       50.25.220.108 [110/2] via 50.25.221.6, 00:14:47, Serial0/0/1

O       50.25.221.8 [110/2] via 50.25.221.6, 00:14:47, Serial0/0/1

New Member

Vlan over Routers & Switches

Think I'm getting closer....

I've ping from PC 1 on Vlan2, the packet goes through the switch, into router 1 then to the core switch.

The core switch then sends the message to router 2 where it needs to go.

The ping is to 50.25.1.130

The IP route for router 2 is as follow

C       50.25.1.128/25 is directly connected, FastEthernet0/1.2

but I don't know why the packet isn't being sent down this path? do the core switch need vlan settings?

New Member

Re:Vlan over Routers & Switches

Youre trying to ping in the same vlan across a routed wan? Never going to work without bgp vpnv4.

Subnets all need to be different ranges. Can you give show ip route from where you are pinging from with destination ip, eg
Show ip route x.x.x.x

Then on remote router the same command!


Sent from Cisco Technical Support Android App

New Member

Vlan over Routers & Switches

guess that stops me looking at the WAN option.

I tried sending all the packets out to the backbone switch with the command

ip route 0.0.0.0 0.0.0.0 fa0/0

on router 1 & 2 but still no join

Is this what you're looking for?

Router 1 to computer on Vlan2

Router>show ip route 50.25.0.2

Routing entry for 50.25.0.0/25

Known via "connected", distance 0, metric 0 (connected, via interface)

  Routing Descriptor Blocks:

  * directly connected, via FastEthernet0/1.111

      Route metric is 0, traffic share count is 1

Router 2 to computer on Vlan2

Router>show ip route 50.25.1.130

Routing entry for 50.25.1.128/25

Known via "connected", distance 0, metric 0 (connected, via interface)

  Routing Descriptor Blocks:

  * directly connected, via FastEthernet0/1.111

      Route metric is 0, traffic share count is 1

Vlan over Routers & Switches

Hi Ian,

Is this GNS3 network you are running?

Can you provide a screenshot, and preferably the router configs?

Reading your original post, you describe the routers as connected to the backbone switch AND to eachother via WAN (serial) links. Would be good to confirm the image in my head matches the reality!

cheers,

Seb.

New Member

Vlan over Routers & Switches

Made some changes since, I've stopped looking at the WAN connection and now just using the backbone switch. I've setup OSPF DR & BDR on the routers and each switch can ping each other by going through the backbone switch.

The computers can still ping the routers but looks like the packet is lost when going through the backbone switch. I've no Vlan settings on the backbone switch. Not sure if its needed?

Maybe I could email you packet tracer file?

Thanks

Ian

Vlan over Routers & Switches

Does the topology look like this??:

Can you post the output of: 'sh ip route', for both routers. I am still trying to get a hangle on your subnet configuration.

cheers,

Seb.

New Member

Vlan over Routers & Switches

Thats just how it looks, each computer is also on their own subnet

Router 1

Show IP Route

     50.0.0.0/8 is variably subnetted, 5 subnets, 3 masks

C       50.25.0.0/25 is directly connected, FastEthernet0/1.2

C       50.25.0.128/25 is directly connected, FastEthernet0/1.3

C       50.25.1.0/25 is directly connected, FastEthernet0/1.4

C       50.25.220.0/29 is directly connected, FastEthernet0/0

C       50.25.221.0/30 is directly connected, Serial0/0/0

Route 2

     50.0.0.0/8 is variably subnetted, 6 subnets, 3 masks

C       50.25.1.128/25 is directly connected, FastEthernet0/1.2

C       50.25.2.0/25 is directly connected, FastEthernet0/1.3

C       50.25.2.128/25 is directly connected, FastEthernet0/1.4

C       50.25.220.0/29 is directly connected, FastEthernet0/0

C       50.25.221.0/30 is directly connected, Serial0/0/0

C       50.25.221.4/30 is directly connected, Serial0/0/1

Vlan over Routers & Switches

I'm not seeing any routes via a FastEthernet interface to the backbone switch. eg, no FA0/1 .

Can you provide the 'sh ip int br' for both routers?

New Member

Vlan over Routers & Switches

Looking at the routers Fa0/0 is to the backbone to the left and Fa0/1 is to the switch on the right

Router 1

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0    50.25.220.1     YES manual up                    up

FastEthernet0/1    unassigned      YES unset  up                    up

FastEthernet0/1.2 50.25.0.1       YES manual up                    up

FastEthernet0/1.3 50.25.0.129     YES manual up                    up

FastEthernet0/1.4 50.25.1.1       YES manual up                    up

Serial0/0/0           50.25.221.1     YES manual up                    up

Router 2

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        50.25.220.2     YES manual up                    up

FastEthernet0/1        unassigned      YES unset  up                    up

FastEthernet0/1.2    50.25.1.129     YES manual up                    up

FastEthernet0/1.3    50.25.2.1       YES manual up                    up

FastEthernet0/1.4    50.25.2.129     YES manual up                    up

Serial0/0/0              50.25.221.2     YES manual up                    up

New Member

Vlan over Routers & Switches

Maybe to also show whats working

Green, Ping from PC to router - Works

Blue, Ping from Router to Router through the switch - Works

Red, Ping from PC to PC - Fails

Vlan over Routers & Switches

Ignore last, I'm going blind! Please post 'sh ip int br' and 'sh ip route ospf' again.

New Member

Vlan over Routers & Switches

Maybe this could be a problem.... "sh ip route ospf" doesn't show anything... but below is my show running-config output

Router 1

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

network 50.25.220.0 0.0.0.7 area 0

Router 2

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

network 50.25.220.0 0.0.0.7 area 0

Router 1

Interface              IP-Address

FastEthernet0/0        50.25.220.1

FastEthernet0/1        unassigned

FastEthernet0/1.2      50.25.0.1      

FastEthernet0/1.3      50.25.0.129    

FastEthernet0/1.4      50.25.1.1      

Serial0/0/0            50.25.221.1    

Router 2

Interface              IP-Address 

FastEthernet0/0        50.25.220.2

FastEthernet0/1        unassigned 

FastEthernet0/1.2      50.25.1.129

FastEthernet0/1.3      50.25.2.1  

FastEthernet0/1.4      50.25.2.129

Serial0/0/0            50.25.221.2

Vlan over Routers & Switches

Try adding 'redistribute connected' to both of your 'router ospf 1' instances.

New Member

Vlan over Routers & Switches

if its any help I've done no setup on the backbone for vlans...

Vlan over Routers & Switches

It would appear your routers are connected to the backbone on VLAN1 (default). Since you can ping the routers form eachother, we know that IP transport is working fine between them.

It is just the routers not knowing what routes the other router provides which is the problem.

New Member

Vlan over Routers & Switches

That sounds the problem....

How would I correct that setup?

Vlan over Routers & Switches

Try adding 'redistribute connected' to both of your 'router ospf 1' instances.

New Member

Vlan over Routers & Switches

I've added this and the ping from both PC's still fails...

Vlan over Routers & Switches

OK try:

Router1

!

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

redistribute connected subnets

network 50.25.220.0 0.0.0.7 area 0

network 50.25.0.0 0.0.0.128 area 0

network 50.25.0.128 0.0.0.128 area 0

network 50.25.1.0 0.0.0.128 area 0

!

Router2

!

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

redistribute connected subnets

network 50.25.220.0 0.0.0.7 area 0

network 50.25.1.128 0.0.0.128 area 0

network 50.25.2.0 0.0.0.128 area 0

network 50.25.2.128 0.0.0.128 area 0

!

New Member

Vlan over Routers & Switches

I thought that might have been it... but I got this error message

OSPF: Invalid address/mask combination (discontiguous mask)

Is there no setup needed for the backbone to carry the VLAN settings?

Vlan over Routers & Switches

OK try normal subnet masks:

Router1

!

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

redistribute connected subnets

network 50.25.220.0 0.0.0.7 area 0

network 50.25.0.0 255.255.255.128 area 0

network 50.25.0.128 255.255.255.128 area 0

network 50.25.1.0 255.255.255.128 area 0

!

Router2

!

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

redistribute connected subnets

network 50.25.220.0 0.0.0.7 area 0

network 50.25.1.128 255.255.255..128 area 0

network 50.25.2.0 255.255.255.128 area 0

network 50.25.2.128 255.255.255.128 area 0

!

Nope, the VLAN config to the backbone should remain as it is.

Vlan over Routers & Switches

Depending on IOS verisons you may not be able to use netmasks, so try the following wildcards:

Router1

!

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

redistribute connected subnets

network 50.25.220.0 0.0.0.7 area 0

network 50.25.0.0 0.0.0.255 area 0

network 50.25.1.0 0.0.0.127 area 0

!

Router2

!

router ospf 1

log-adjacency-changes

passive-interface FastEthernet0/1

redistribute connected subnets

network 50.25.220.0 0.0.0.7 area 0

network 50.25.1.128 0.0.0.127 area 0

network 50.25.2.0 0.0.0.255 area 0

!

New Member

Vlan over Routers & Switches

I think, there could be a subnetting issue. Can you confirm, have you configured proper subnetmask(Routers/PC's) in your devices.

New Member

Vlan over Routers & Switches

Have you checked if the two routers are OSPF neighbors on the fa0/0 interfaces?

show ip ospf neighbor

590
Views
0
Helpful
28
Replies
CreatePlease login to create content