Difference between revisions of "VLAN øvelse"
From Teknologisk videncenter
m (Created page with "=Opgave 1= Opbyg følgende netværk i Packet Tracer: {| |- |thumb|500px|left|Netværk i packet tracer |- |} *PC0 forbundet med lige i gennem kabel til ...") |
m (→Opgave 5: Opret et VLAN mere) |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | =Opgave 1= | + | =Opgave 1: Opbyg netværk= |
− | Opbyg følgende netværk i Packet Tracer: | + | Opbyg følgende netværk i Packet Tracer: (Switchene er type 2950-24) |
{| | {| | ||
|- | |- | ||
Line 19: | Line 19: | ||
Er det muligt at pinge mellem PC'erne?? | Er det muligt at pinge mellem PC'erne?? | ||
− | =Opgave 2= | + | |
− | Opret VLAN på begge switche: | + | =Opgave 2: VLAN oprettes= |
+ | Opret VLAN på begge switche: '''Husk skal gøres på begge switche..''' | ||
<source lang=cli> | <source lang=cli> | ||
Switch> | Switch> | ||
Line 51: | Line 52: | ||
1004 fddinet-default active | 1004 fddinet-default active | ||
1005 trnet-default active | 1005 trnet-default active | ||
+ | Switch#<input>copy running-config startup-config</input> | ||
+ | Destination filename [startup-config]? | ||
+ | Building configuration... | ||
+ | [OK] | ||
Switch# | Switch# | ||
</source> | </source> | ||
+ | =Opgave 3: Trunk oprettes= | ||
+ | Oprettelse af trunk på port 24. '''Husk skal gøres på begge switche..''' | ||
+ | <source lang=cli> | ||
+ | witch><input>enable</input> | ||
+ | Switch#<input>show interfaces trunk</input> | ||
+ | |||
+ | Switch#<input>configure terminal</input> | ||
+ | Enter configuration commands, one per line. End with CNTL/Z. | ||
+ | Switch(config)#<input>interface fastethernet 0/24</input> | ||
+ | Switch(config-if)#<input>switchport mode trunk</input> | ||
+ | Switch(config-if)#<input>exit</input> | ||
+ | Switch(config)#<input>exit</input> | ||
+ | %SYS-5-CONFIG_I: Configured from console by console | ||
+ | |||
+ | Switch#<input>show interfaces trunk</input> | ||
+ | Port Mode Encapsulation Status Native vlan | ||
+ | Fa0/24 on 802.1q trunking 1 | ||
+ | |||
+ | Port Vlans allowed on trunk | ||
+ | Fa0/24 1-1005 | ||
+ | |||
+ | Port Vlans allowed and active in management domain | ||
+ | Fa0/24 1,100,200 | ||
+ | |||
+ | Port Vlans in spanning tree forwarding state and not pruned | ||
+ | Fa0/24 none | ||
+ | Switch# | ||
+ | </source> | ||
+ | =Opgave 4: PC porte i VLANs= | ||
+ | De enkelte porte til PC'erne skal i forskellige VLAN's. '''Husk skal gøres på begge switche..''' | ||
+ | <source lang=cli> | ||
+ | Switch><input>enable</input> | ||
+ | Switch#<input>show vlan brief</input> | ||
+ | |||
+ | VLAN Name Status Ports | ||
+ | ---- -------------------------------- --------- ------------------------------- | ||
+ | 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 | ||
+ | Fa0/5, Fa0/6, Fa0/7, Fa0/8 | ||
+ | Fa0/9, Fa0/10, Fa0/11, Fa0/12 | ||
+ | Fa0/13, Fa0/14, Fa0/15, Fa0/16 | ||
+ | Fa0/17, Fa0/18, Fa0/19, Fa0/20 | ||
+ | Fa0/21, Fa0/22, Fa0/23 | ||
+ | <notice>100 Students active </notice> | ||
+ | <notice>200 Teachers active </notice> | ||
+ | 1002 fddi-default active | ||
+ | 1003 token-ring-default active | ||
+ | 1004 fddinet-default active | ||
+ | 1005 trnet-default active | ||
+ | Switch#<input>configure terminal</input> | ||
+ | Enter configuration commands, one per line. End with CNTL/Z. | ||
+ | Switch(config)#<input>interface fastethernet 0/1</input> | ||
+ | Switch(config-if)#<input>switchport mode access</input> | ||
+ | Switch(config-if)#<input>switchport access vlan 100</input> | ||
+ | Switch(config-if)#<input>exit</input> | ||
+ | Switch(config)#<input>interface fastethernet 0/10</input> | ||
+ | Switch(config-if)#<input>switchport mode access</input> | ||
+ | Switch(config-if)#<input>switchport access vlan 200</input> | ||
+ | Switch(config-if)#<input>exit</input> | ||
+ | Switch(config)#<input>exit</input> | ||
+ | Switch# | ||
+ | %SYS-5-CONFIG_I: Configured from console by console | ||
+ | |||
+ | Switch#<input>show vlan brief</input> | ||
+ | |||
+ | VLAN Name Status Ports | ||
+ | ---- -------------------------------- --------- ------------------------------- | ||
+ | 1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 | ||
+ | Fa0/6, Fa0/7, Fa0/8, Fa0/9 | ||
+ | Fa0/11, Fa0/12, Fa0/13, Fa0/14 | ||
+ | Fa0/15, Fa0/16, Fa0/17, Fa0/18 | ||
+ | Fa0/19, Fa0/20, Fa0/21, Fa0/22 | ||
+ | Fa0/23 | ||
+ | <notice>100 Students active Fa0/1</notice> | ||
+ | <notice>200 Teachers active Fa0/10</notice> | ||
+ | 1002 fddi-default active | ||
+ | 1003 token-ring-default active | ||
+ | 1004 fddinet-default active | ||
+ | 1005 trnet-default active | ||
+ | </source> | ||
+ | |||
+ | Hvilke PC'er kan der pinges imellem | ||
+ | *PC0 til PC1? | ||
+ | *PC0 til PC2? | ||
+ | *PC0 til PC3? | ||
+ | *PC1 til PC2? | ||
+ | *PC1 til PC3? | ||
+ | *PC2 til PC3? | ||
+ | =Opgave 5: Opret et VLAN mere= | ||
+ | *Opret VLAN 300 og kom fastethernet 0/5, 0/6 og 0/7 i VLAN 300. '''Gøres på begge switche''' | ||
+ | *Tilslut PC'er til alle porte i VLAN 300 og giv dem IP adresser i det logiske net 172.16.0.0/16 | ||
+ | *Test det fungerer ved at pinge mellem PC'erne | ||
+ | :'''HUSK:''' Gem konfiguratioen og Packet tracer filen | ||
+ | =Yderligere kommandoer= | ||
+ | *''show running-config'' | ||
+ | *''show mac address-table'' | ||
{{Source cli}} | {{Source cli}} | ||
+ | |||
+ | [[Category:IP øvelse]] |
Latest revision as of 11:26, 18 June 2013
Contents
Opgave 1: Opbyg netværk
Opbyg følgende netværk i Packet Tracer: (Switchene er type 2950-24)
- PC0 forbundet med lige i gennem kabel til Switch0 port 1
- PC1 forbundet med lige i gennem kabel til Switch0 port 10
- PC2 forbundet med lige i gennem kabel til Switch1 port 1
- PC3 forbundet med lige i gennem kabel til Switch1 port 10
- Switch0 port 24 forbundet med Switch1 port 24 med kryds kabel
IP adresser på PC'erne
- PC0 har IP adressen 192.168.1.10/24
- PC1 har IP adressen 192.168.1.11/24
- PC2 har IP adressen 192.168.1.12/24
- PC3 har IP adressen 192.168.1.13/24
Er det muligt at pinge mellem PC'erne??
Opgave 2: VLAN oprettes
Opret VLAN på begge switche: Husk skal gøres på begge switche..
Switch>
Switch><input>enable</input>
Switch#<input>configure terminal</input>
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#<input>vlan 100</input>
Switch(config-vlan)#<input>name Students</input>
Switch(config-vlan)#<input>exit</input>
Switch(config)#<input>vlan 200</input>
Switch(config-vlan)#<input>name Teachers</input>
Switch(config-vlan)#<input>exit</input>
Switch(config)#<input>exit</input>
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#<input>show vlan brief</input>
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
100 Students active
200 Teachers active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch#<input>copy running-config startup-config</input>
Destination filename [startup-config]?
Building configuration...
[OK]
Switch#
Opgave 3: Trunk oprettes
Oprettelse af trunk på port 24. Husk skal gøres på begge switche..
witch><input>enable</input>
Switch#<input>show interfaces trunk</input>
Switch#<input>configure terminal</input>
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#<input>interface fastethernet 0/24</input>
Switch(config-if)#<input>switchport mode trunk</input>
Switch(config-if)#<input>exit</input>
Switch(config)#<input>exit</input>
%SYS-5-CONFIG_I: Configured from console by console
Switch#<input>show interfaces trunk</input>
Port Mode Encapsulation Status Native vlan
Fa0/24 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/24 1-1005
Port Vlans allowed and active in management domain
Fa0/24 1,100,200
Port Vlans in spanning tree forwarding state and not pruned
Fa0/24 none
Switch#
Opgave 4: PC porte i VLANs
De enkelte porte til PC'erne skal i forskellige VLAN's. Husk skal gøres på begge switche..
Switch><input>enable</input>
Switch#<input>show vlan brief</input>
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23
<notice>100 Students active </notice>
<notice>200 Teachers active </notice>
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch#<input>configure terminal</input>
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#<input>interface fastethernet 0/1</input>
Switch(config-if)#<input>switchport mode access</input>
Switch(config-if)#<input>switchport access vlan 100</input>
Switch(config-if)#<input>exit</input>
Switch(config)#<input>interface fastethernet 0/10</input>
Switch(config-if)#<input>switchport mode access</input>
Switch(config-if)#<input>switchport access vlan 200</input>
Switch(config-if)#<input>exit</input>
Switch(config)#<input>exit</input>
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#<input>show vlan brief</input>
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23
<notice>100 Students active Fa0/1</notice>
<notice>200 Teachers active Fa0/10</notice>
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Hvilke PC'er kan der pinges imellem
- PC0 til PC1?
- PC0 til PC2?
- PC0 til PC3?
- PC1 til PC2?
- PC1 til PC3?
- PC2 til PC3?
Opgave 5: Opret et VLAN mere
- Opret VLAN 300 og kom fastethernet 0/5, 0/6 og 0/7 i VLAN 300. Gøres på begge switche
- Tilslut PC'er til alle porte i VLAN 300 og giv dem IP adresser i det logiske net 172.16.0.0/16
- Test det fungerer ved at pinge mellem PC'erne
- HUSK: Gem konfiguratioen og Packet tracer filen
Yderligere kommandoer
- show running-config
- show mac address-table