sh run int g0/0 as an example
shows me that encapsulation is been set to dot1q
and the mode has been set to trunk.
Now in this case, DTP or Dynamic Trunk Protocol is still enabled on the interface.
So I’m gonna go into the range of interfaces
and type switchport no negotiate
That will disable DTP. So sh run int g0/0
shows me as an example that DTP ha been disabled
that’s recommended and that I've statically configured the interface as a trunk.
Something similar can be seen on the other interfaces are gigabit 0/1, 2 and 3.
sh int g0/0 switchport
shows me that the operational mode at the moment is trunking
it was manually configured as a trunk.
It was manually configured to use 802.1Q
and that’s what it's using now. Negotiation of trunking is off.
Previously the negotiation of trunking was on
even though I had configured the switchport as a trunk statically.
So we’ve now disabled DTP on that port.
So sh run int g0/0
these are the commands that we’ve configured
so let’s do something similar on the other switches
on switch 2, switch 3 and switch 4, I'll configure the trunk interfaces first.
All these links between the witches are gonna be configured as trunks
and then I'll configure the various ports on these switches.
so switch 2 conf t interface range g0/0 - 3
so 0/0, 0/1, 0/2 and 0/3 I'll paste those commands in.
That’s a configuration on switch 2, let’s look at switch 3.
so switch 3 conf t int range g0/0
in this case it's only 0 and 1
which you'll gonna be configured as trunk ports
paste the conf again as an example sh int g0/0 switchport
you can see as an example that it's configured as a trunk.
Let’s have a look at switch 4
on switch 4 I need to configure gigabit 0/0 and gigabit 0/1.
So enable conf t int range g0/0 to g0/1 paste the conf again.
sh switch sh int g0/0 switchport
Port is configured as a trunk
it's operating as a trunk encapsulation is dot1q
it was configured to use dot1q
and is using dot1q if DTP has been disabled.
All VLANs are allowed across the trunk.
So sh cdp neighbor
we can see that on switch 4 we have enabled switch 1, switch 2 and router 2.
Switch 1, switch 2 and router 2.
So all interfaces between switches have now being configured as the trunks.
I can now configure this port to NPM as an access port.
So on switch 1, sh run int g1/0
it's configured with default config
so int g1/0 switchport mode access
switchport access vlan 1 do show run int g1/0
you can see that the command switchport access vlan 1
is not shown in the output because that’s a default command.
Default commands don’t show by default in the output of the show run command.
But sh int g1/0 switchport
shows me that this port is an access port in VLAN 1
it’s been configured as an access port
and is currently operating as an access port.
Other negotiation of trunking is enabled on that port.
So I can go back on to the port and type switchport nonegotiate.
sh int g1/0 switchport notice negotiation of trunking is off.
As recommended, this port gigabit 1/0 is currently an access port in VLAn 1.
I need to do something similar on this interface to router 3
these devices NPM and the router are going to put
into the management VLAN for simplicity in this topology
you could put them in a separate VLAN
but because the NPM is gonna used to manage the devices using SNMP
and this router is the connection from the campus to the internet
I’m gonna leave this interface in VLAN 1.
so on switch 2 this interface gigabit 1/0 needs to be configured as an access port
so switchport mode access switchport access vlan 1
switchport nonegotiate
sh int g1/0 switchport
gigabit 1/0 is enabled it’s been configured as a static access port
it's operating as a static access port.
The negotiation of access is off because we disabled DTP.
so the 2 core switches having configured
I now need to configure this interface in VLAN 10
and this interface in VLAN 20 for my access PCs.
Once again I’m using IOS routers to mimic host devices in this topology.
So on switch 3, this switch sh int g0/2 switchport
at the moment the port is enabled
but it's using dynamic auto as the administrative mode
so it’s going to dynamically negotiate
with the other side for trunking or as an access port.
At the moment the operational mode is static access
in other words it’s an access port in VLAN 1.
So we wanna change that conf t int g0/2 switchport mode access
We wanna statically configure it as an access port
switchport access VLAN and in this case I want to specify that the VLAN is 10.
switchport nonegotiate
sh int g0/2 switchport
so this port is now enabled as a static access port
it’s not negotiating, the current mode is static access
negotiation of trunking is off and the port is now in VLAN 10
so we’ve move this interface from VLAN 1 to VLAN 10
we now need to do something similar on this port on switch 4.
So sh int g0/2 switchport
port is enabled administrative mode is dynamic auto
we're using DTP to do some negotiation
at the moment it's using static access as the operational mode
the VLAN that the port is in is VLAN 1, so access port in VLAN 1.
So int g0/2 switchport mode access
switchport access vlan in this case 20, switchport nonegotiate
sh int g0/2 switchport
Port is enabled as a layer 2 interface.
It’s been manually configured as a static access port
and is operating as the static access port.
DTP is disabled, the port is now an access port in VLAN 20.
So we have configured the core links between the switches as trunk ports.
This port is an access port in VLAN 1, so is this port
this port is an access port in VLAN 10
and this port is an access port in VLAN 20.