In the real world, you would never plug a hub between two switches because it will degrade your network
dramatically.
In this example, we've only got the hub in the topology so that we can capture traffic using Wireshark.
You would generally have a direct link between the two switches as shown here in our topology.
I've shut that port down to force all traffic to go via the hub so that we can see what's taking place.
If I enable this port spanning tree will block one of these ports so we won't be able to see the traffic.
So at the moment, PC one can ping, PC three PC to can ping PC four, but they can't ping each other.
So let's set up switch one as our interval and router.
So on switch one.
Show IP interface brief.
At the moment we have an IP address configured on VLAN one and VLAN two.
Now rather one and router three are still using the IP addressing of VLAN one.
Which is bad practice.
We can see that on router one show IP interface brief.
Notice the IP address of this device is ten 111.
So I'll change that to put it into VLAN 11.
So IP address 10.18 11.1.
It's just good practice.
You could keep those IP addresses, but it will get confusing when you set up a management VLAN, so
I'll just configure it correctly at this point.
On Router three.
Currently, the IP address is 10.1 to 1.3.
So change that to 10.1 or 11.3 and set up the default gateway ten at 1.11 to 5 four.
And then we need to configure VLAN 11 on switch one.
So interface VLAN 11 IP address ten .1. 11 to 2 five four make sure that that SVI or switched virtual
interfaces up which it is.
So.
Ken writer one ping.
Writer three.
It's just two artists.
So paying ten one, 11, three.
Yes, it can.
Can it ping rather two rather two's using this IP address ten.
One, two, two.
Yes, it can.
Can it ping Rutter for acting as PC two?
So that's 2.4.
Let's just do some troubleshooting.
So first thing to confirm is.
Let's check the interface.
But interface looks right.
Let's ping 11.1.
Why is the ping not working?
It's probably because I haven't set up a default gateway on router for let's confirm that show IP route.
Yeah.
No default is configured, so I'll turn off IP routing.
Before I configure the default gateway, let me show you a test that we can do to prove what's happening.
So another one I'm paying right for.
And this debug debug IP ICMP shows us that the traffic hits root of four but is not getting back.
So we can see that the traffic traverses, the network gets here but doesn't get back again.
And that allows me to see that it's because my default gateway is not configured.
So IP default gateway 10 to 1 .2.254 on router four because it's in VLAN two.
So once again, this device is in VLAN 11.
This device is in VLAN 11.
These two devices on vlan two.
So can write a one ping route of four.
Yes it can.
So let's have a look at the editor one Q Frames sent.
He has rather one pinging out of four.
And let's look at the ICMP.
Now what you'll notice is the messages from ten one, 11 1 to 10 1 to 1 are actually being sent on VLAN
two and the return traffic is being sent on VLAN two.
And that's because the traffic is being sent from router one to switch one and switch one is already
doing the inter VLAN routing and then forwarding the traffic to switch two on VLAN two.
So it's already changing the VLAN information.
To be VLAN two when forwarding it to the other switch.
When the traffic goes from route of four to Ryder one, the traffic gets sent here as an untagged frame
and then here it's tagged as VLAN two.
When it hits the switch, which is acting as the default gateway, it does the interval and routing
and then forwards it out of this port because it's in VLAN 11 and the traffic is going to a device in
VLAN 11.
So hence here we don't actually see the tagged frames, but we can see that by adding a router on a
stick to do the interview LAN routing.
So what I'll do is remove the interval and routing on switch one and configure this device as the routing
device in the topology.
And then what we should see is we should see.
The tagged frames hit this router and then the tagging will be changed.