Cisco Vlans

Aus Xinux Wiki
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  

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