Poniżej przykładowa konfiguracja switcha¶
Konfiguracja danych przełącznika
PokażUkryj
hostname "$_Adres_montażu"
system name "$_Adres_montażu"
system location "$_Adres_montażu"
system contact "admin@$domain"
Konfiguracja Vlan
PokażUkryj
vlan database
vlan 100
name mgmt
Konfiguracja IP
PokażUkryj
interface vlan 100
ip address $_IP $_MASK
exit
management-vlan vlan 100
ip route 0.0.0.0/0 $_GATEWAY
ip name-server $_DNS_SERVER
Włączenie Console/Telnet/SSH/HTTP PokażUkryj
Konfiguracja NTP
PokażUkryj
clock source sntp
clock timezone PL 2 minutes 0
sntp host ntp.$domain
Konfiguracja Syslog
PokażUkryj
logging host syslog.$domain
Konfiguracja SNMP
PokażUkryj
snmp
snmp community @#coca#@ ro
snmp community @#cola#@ rw
Konfiguracja Interfejsu
PokażUkryj
Port Trunk:
interface ethernet 1/1
switchport mode hybrid
switchport hybrid acceptable-frame-type tagged-only
switchport hybrid ingress-filtering
switchport hybrid allowed vlan add 100
Port Access
switchport mode access
switchport access vlan 239
Opis poleceń:
- interface ethernet 1/1 - wybór portu
- switchport mode - tryb pracy portu, wyróżniamy:
- hybrid
- trunk - ruch tagowany
- access - ruch nie tagowany
Konfiguracja LLDP
PokażUkryj
Port Isolation / Private Vlan PokażUkryj
interface HisgmiiEthernet 1
protected
interface HisgmiiEthernet 2
protected
interface HisgmiiEthernet 3
protected
interface HisgmiiEthernet 4
protected
interface HisgmiiEthernet 5
protected
interface HisgmiiEthernet 6
protected
interface HisgmiiEthernet 7
protected
interface HisgmiiEthernet 8
protected
interface HisgmiiEthernet 9
protected
interface HisgmiiEthernet 10
protected
interface HisgmiiEthernet 11
protected
interface HisgmiiEthernet 12
protected
interface HisgmiiEthernet 13
protected
interface HisgmiiEthernet 14
protected
interface HisgmiiEthernet 15
protected
interface HisgmiiEthernet 16
protected
interface HisgmiiEthernet 17
protected
interface HisgmiiEthernet 18
protected
interface HisgmiiEthernet 19
protected
interface HisgmiiEthernet 20
protected
interface HisgmiiEthernet 21
protected
interface HisgmiiEthernet 22
protected
interface HisgmiiEthernet 23
protected
interface HisgmiiEthernet 24
protected
DHCP Snooping - Aktualnie nie włączamy
{{collapse
dhcp-snooping
A następnie dla konfiguracji portu gdzie ma przechwytywać zapytania dajemy
dhcp-snooping mode untrusted
Dla portów typu uplink (link do switcha w studio) dajemy
dhcp-snooping mode trusted
DHCP Relay - Aktualnie nie włączamy
PokażUkryj
dhcp-relay server $DHCP_SERVER_IP
802.1x MAC Auth - Radius¶
- Wyłączenie uwierzytelniania po Radius(chyba że jeden serwer obsługuje oba rodzaje zapytań):
- CLI PokażUkryj
- WebUI PokażUkryj
wchodzimy Configuration -> Security -> Switch -> Auth Method - wszędzie ustawiamy wartość local
- Konfiguracja połączenia z Radius:
- CLI PokażUkryj
radius-accounting-server 1 host x.x.x.x
radius-accounting-server 1 key radius-acs
radius-accounting-server 1 active
radius-authentication-server 1 host x.x.x.x
radius-authentication-server 1 key radius-acs
radius-authentication-server 1 active
- WebUI PokażUkryj
Wchodzimy Configuration -> Security -> AAA - Dodajemy dwa pozycje
- Authentication Server:
- host: x.x.x.x
- hasło(kolumna secret): radius-acs
- włączamy(kolumna enable): oznaczamy checkbox
- Accounting Server:
- host: x.x.x.x
- hasło(kolumna secret): radius-acs
- włączamy(kolumna enable): oznaczamy checkbox
- Konfiguracja 802.1x,
- Konfiguracja protokołu 802.1x
- CLI PokażUkryj
- WebUI PokażUkryj
Wchodzimy Configuration -> Security -> Network -> NAS i ustawiamy:
- Mode na wartość Enabled
- Hold Time: na wartość 120
- Mac Auth Username Format na wartość without-hypen i Upper-case
- Autoryzacja dla portów dostępowych (access)
- CLI PokażUkryj
interface ethernet 1/1
dot1x port-control mac-based
- WebUI PokażUkryj
Wchodzimy Configuration -> Security -> Network -> NAS i na każdym porcie który nie jest w VLAN 100 w kolumnie Admin State wybieramy Mac-based Auth .
- Autoryzacja dla portów TRUNK z MGMT VLAN id 100, Force Authorized:
- CLI PokażUkryj
interface ethernet 1/24
dot1x port-control force-authorized
- WebUI PokażUkryj
Wchodzimy Configuration -> Security -> Network -> NAS i na każdym porcie który jest w VLAN 100 w kolumnie Admin State wybieramy Force Authorized
Obsługa SFLOW¶
Obsługa IGMP¶
Obsługa LoopBack Detection¶
Inne rzeczy których nie używamy, ale zapisuje jakby ktoś pytał
Włączenie SSH
ip ssh server