Exercise VLAN

From NesevoWiki
Jump to navigationJump to search

following network is given


Übungsbeispiel VLAN.JPG

Exercise:

  • Connect with Switch 3 and get all MAC addresses, which knows this switch.
  • Typing the switchport access vlan command in and take all PCs with even number into VLAN 2.
  • Check with ping whether only personal computers in the same VLAN can be reached.
  • Why is the diagnosticcommand traceroute in this network not very useful?
  • Why are all personal computers in VLAN 1 reach but none in VLAN 2?
  • Connect Switch3 and Switch4 so that Switch3 access to the VLAN 2 of Switch1.
  • What sense could be to set up VLANs?
  • What should happen, if you connect switch 1 and 2?. Why should it happen and how it is called?








Solution:

Connect with Switch 3 and get all MAC addresses, which knows this switch.

Switch>show mac-address-table now you will see all MAC addresses



Typing the switchport access vlan command in and take all PCs with even number into VLAN 2.

Create a VLANS:

Switch#conf t to get into the global configurationmode

Switch(config)#vlan 2 you will set up VLAN 2

Switch(config-vlan)#name evenNumber You will give it the name evenNumber

Switch(config-vlan)#exit To leave the VLAN mode



Assigning a VLANs to a port:

Switch(config)#int fa1/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 2

Switch(config-if)#exit



Configuration a Trunk:

Switch(config)#int fa4/1

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport access vlan 2

Switch(config-if)#exit



Remove a VLAN from a Trunk:

Switch(config)#int fa4/1

Switch(config-if)#switchport trunk allowed vlan remove 1



Add a VLAN to a Trunk:

Switch(config)#int fa4/1

Switch(config-if)#switchport trunk allowed vlan add 1



Check with ping whether only personal computers in the same VLAN can be reached.

Ping from PC1 (uneven) to PC3 (even)

PC>ping 10.0.0.3 PC3

Pinging 10.0.0.3 with 32 bytes of data:

Reply from 10.0.0.3: bytes=32 time=5ms TTL=120
Reply from 10.0.0.3: bytes=32 time=4ms TTL=120
Reply from 10.0.0.3: bytes=32 time=4ms TTL=120
Reply from 10.0.0.3: bytes=32 time=4ms TTL=120

Ping from PC1 (uneven) to PC2 (even) PC>ping 10.0.0.2 PC2

Pinging 10.0.0.2 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.



Why is the diagnosticcommand traceroute in this network not very useful?

These switches are on the network 'transperent' (invisible). If you typing the traceroute command in, you will see only the PC listed.



Why are all personal computers in VLAN 1 reach but none in VLAN 2 2?

Because the lines (or interface) standard set in VLAN 1

Connect Switch3 and Switch4 so that Switch3 access to the VLAN 2 of Switch1.



Configuration Trunk:

Switch(config)#int fa4/1

Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport access vlan 2

Switch(config-if)#exit



Remove a VLAN from a Trunk::

Switch(config)#int fa4/1

Switch(config-if)#switchport trunk allowed vlan remove 1



Add a VLAN to a Trunk::

Switch(config)#int fa4/1

Switch(config-if)#switchport trunk allowed vlan add 1



What sense could be to set up VLANs?

Go to disconnect networks
To access arrangements to servers and computers



What should happen, if you connect switch 1 and 2?. Why should it happen and how it is called?

There is a loop! It should be such that the spanning tree protocol a port in the loop disabled.