cisco « Różności …

Różności …

23 grudnia 2010

Cisco – konfiguracja portów …

Zaszufladkowany do: Sieci,cisco — Tagi: — Jacek @ 17:27
## aby przypisać port do vlanu
show interfaces gigabitethernet 0/17
enable
configure terminal
interface gigabitethernet 0/17
switchport mode access
switchport access vlan 1
end
show interfaces gigabitethernet 0/17 switchport

## aby zobaczyć/zmianić access listy dla danego vlanu
show ip interface
lub dla danego vlanu:
show ip interface vlan 1
####
show mac access-group
show running-config
show ip access-lists
show ip access-lists 120 (wyświetlenie wybranej access listy)
show ip interface vlan 1 (aby zobaczyć access-listy przypisane do vlanów)
show ip interface gigabitethernet0/16

przykłady:
config terminal
access-list 120 permit tcp host 192.168.0.73 host 192.168.0.72
access-list 120 permit icmp host 192.168.0.73 host 192.168.0.72
access-list 120 permit icmp host 192.168.0.72 host 192.168.0.73
access-list 120 permit udp host 192.168.0.72 host 192.168.0.73
access-list 120 permit ip host 192.168.0.72 host 192.168.0.73

config terminal
no access-list 120 permit tcp host 192.168.0.73 host 192.168.0.72
(wykasowanie reguły z access listy)

config terminal
no access-list 120 (wykasowanie access-listy)

przypisanie access-listy do interfejsu 11
interface gigabitethernet0/11
ip access-group 120 in

przypisanie access-listy do vlanu 5
configure terminal
interface vlan 5
ip access-group 112 in
zdjęcie przypisania access-listy do vlanu 5
configure terminal
interface vlan 5
no ip access-group 112 in
no ip access-group 103 out

interface gigabitethernet0/11
no ip access-group no in

na porcie hosta 192.168.0.73 aby odpingowywal na pingi z hosta 192.168.0.72 należy:
access-list 120 permit icmp host 192.168.0.73 host 192.168.0.72 (dla portu podłączenie 192.168.0.73)
na hoście 192.168.0.72 aby można było podłączyć udział z hosta 192.168.0.73:
access-list 120 permit tcp host 192.168.0.73 host 192.168.0.72 (dla portu podłączenie 192.168.0.73)

przypisanie vlanu do portu Trunk:
switchport trunk native vlan 1005
copy running-config startup-config
rw (zapisanie konfiguracji)
Przypisanie Trunking VLANs Enabled:
będąc na konkretnym interfejsie:
switchport trunk allowed vlan add 1001-1005
aby usunąć:
(interface) switchport trunk allowed vlan remove 1001-1005

Strona startowa: www.jaceksen.pl