Cisco Vlans
Zur Navigation springen
Zur Suche springen
Anzeigen der VLANS
- c3750g#show vlan
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3, Gi1/0/4, Gi1/0/5, Gi1/0/6, Gi1/0/7, Gi1/0/8, Gi1/0/9 Gi1/0/10, Gi1/0/11, Gi1/0/12, Gi1/0/13, Gi1/0/14, Gi1/0/15, Gi1/0/16, Gi1/0/17 Gi1/0/18, Gi1/0/19, Gi1/0/20, Gi1/0/21, Gi1/0/22, Gi1/0/23, Gi1/0/24, Gi1/0/25 Gi1/0/26, Gi1/0/27, Gi1/0/28 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 0 0 20 enet 100020 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0 1004 fdnet 101004 1500 - - - ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0
- c3750g#sh vlan brief
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3, Gi1/0/4, Gi1/0/5, Gi1/0/6, Gi1/0/7, Gi1/0/8, Gi1/0/9, Gi1/0/10, Gi1/0/11, Gi1/0/12, Gi1/0/13, Gi1/0/14, Gi1/0/15, Gi1/0/16, Gi1/0/17, Gi1/0/18, Gi1/0/19, Gi1/0/25 Gi1/0/26, Gi1/0/27, Gi1/0/28 20 server-net active Gi1/0/20, Gi1/0/21, Gi1/0/22, Gi1/0/23, Gi1/0/24 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup
Anlegen eines VLANS
- c3750g#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
- c3750g(config)#vlan 20
- c3750g(config)#name server-net
Ethernet VLAN zuweisen
- c3750g#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
- c3750g(config)#interface GigabitEthernet1/0/24
- c3750g(config-if)#switchport mode access
- c3750g(config-if)#switchport access vlan 20
- c3750g(config-if)#end
IP vlan zu ordnen
- c3750g#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
- c3750g(config)#interface vlan 20
- c3750g(config-if)#ip address 172.19.49.1 255.255.255.0
IP ROUTING anschalten
- c750g(config)#ip routing
Vlans anzeigen
- c3750g#show vlan name default
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3, Gi1/0/4, Gi1/0/5, Gi1/0/6, Gi1/0/7, Gi1/0/8, Gi1/0/9 Gi1/0/10, Gi1/0/11, Gi1/0/12, Gi1/0/13, Gi1/0/14, Gi1/0/15, Gi1/0/16, Gi1/0/17 Gi1/0/18, Gi1/0/19, Gi1/0/20, Gi1/0/21, Gi1/0/22, Gi1/0/23, Gi1/0/25, Gi1/0/26 Gi1/0/27, Gi1/0/28 VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 0 0 Remote SPAN VLAN ---------------- Disabled Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------
- c3750g#show vlan name server-net
VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 20 server-net active Gi1/0/24 VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 20 enet 100020 1500 - - - - - 0 0 Remote SPAN VLAN ---------------- Disabled Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------
Weitere Ports zum Vlan hinzufügen
- c3750g#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
- c3750g(config)#interface GigabitEthernet1/0/23
- c3750g(config-if)#switchport mode access
- c3750g(config-if)#switchport access vlan 20
- c3750g(config-if)#interface GigabitEthernet1/0/22
- c3750g(config-if)#switchport mode access
- c3750g(config-if)#switchport access vlan 20
- c3750g(config-if)#interface GigabitEthernet1/0/21
- c3750g(config-if)#switchport mode access
- c3750g(config-if)#switchport access vlan 20
Trunk Interface festlegen
- c3750g(config-if)#switchport trunk encapsulation dot1q
- c3750g(config-if)#switchport access vlan 1
- c3750g(config-if)#switchport access vlan 20
- c3750(config-if)#switchport mode dynamic desirable
Trunking mit Switch c3750
Anlegen eines VLANS
- c3750#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
- c3750(config)#vlan 20
- c3750(config)#name server-net
Ethernet VLAN zuweisen
- c3750#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
- c3750(config)#interface FastEthernet1/0/45
- c3750(config-if)#switchport mode access
- c3750(config-if)#switchport access vlan 20
- c3750(config-if)#interface FastEthernet1/0/46
- c3750(config-if)#switchport mode access
- c3750(config-if)#switchport access vlan 20
- c3750(config-if)#interface FastEthernet1/0/47
- c3750(config-if)#switchport mode access
- c3750(config-if)#switchport access vlan 20
- c3750(config-if)#interface FastEthernet1/0/48
- c3750(config-if)#switchport mode access
- c3750(config-if)#switchport access vlan 20
Trunk Interface festlegen
- c3750(config)#interface fastEthernet1/0/44
- c3750(config-if)#switchport trunk encapsulation dot1q
- c3750(config-if)#switchport mode dynamic desirable
- c3750(config-if)#switchport access vlan 1
- c3750(config-if)#switchport access vlan 20
Show trunking interface
- c3750#show interface fastethernet1/0/44 switchport
Name: Fa1/0/44 Switchport: Enabled Administrative Mode: dynamic desirable Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 20 (server-net) Trunking Native Mode VLAN: 1 (default) Administrative Native VLAN tagging: enabled Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vlan mapping: none Administrative private-vlan trunk native VLAN: none Administrative private-vlan trunk Native VLAN tagging: enabled Administrative private-vlan trunk encapsulation: dot1q Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk associations: none Administrative private-vlan trunk mappings: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL Protected: false Unknown unicast blocked: disabled Unknown multicast blocked: disabled Appliance trust: none