Cisco Switch Linux in heterogenen Netzen Grundkonfiguration: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 95: Zeile 95:
 
*cisco-sw# '''exit'''
 
*cisco-sw# '''exit'''
 
*cisco-sw# '''copy running-config startup-config'''
 
*cisco-sw# '''copy running-config startup-config'''
=Ergebnis=
 
{| class="wikitable"
 
|+ Port-Konfiguration
 
! Port !! VLAN !! Netz
 
|-
 
| Ethernet1/1 || Trunk || Zur Firewall
 
|-
 
| Ethernet1/2 || 22 || SERVER
 
|-
 
| Ethernet1/3 || 21 || CLIENTS
 
|-
 
| Ethernet1/4 || 22 || SERVER
 
|-
 
| Ethernet1/5 || 22 || SERVER
 
|-
 
| Ethernet1/6 || 21 || CLIENTS
 
|-
 
| Ethernet1/7 || 22 || SERVER
 
|}
 
 
 
=Ergebnis=
 
=Ergebnis=
 
{| class="wikitable"
 
{| class="wikitable"

Version vom 3. Oktober 2024, 13:00 Uhr

Grundsätzliches

Es dauert bis er bootet
  • Zugang über ssh admin@localhost -p 3022
  • User: admin
  • Pass: admin

Wichtige Befehle

Konfig anzeigen
  • cisco# show running-config
Konfig Modus
  • cisco(config)# configure terminal
Hostname setzen
  • cisco(config)# hostname cisco-sw
Wieder zurück
  • cisco-sw(config)# exit
Konfig zu Start Konfig machen
  • cisco-sw# copy running-config startup-config

VLANS anlegen

  • cisco-sw# configure terminal
  • cisco-sw(config)# vlan 21
  • cisco-sw(config-vlan)# name CLIENTS
  • cisco-sw(config-vlan)# vlan 22
  • cisco-sw(config-vlan)# name SERVER
  • cisco-sw(config-vlan)# end
  • cisco-sw# copy running-config startup-config
  • cisco-sw# show vlan

Managment Interface Addressieren

  • cisco-sw# conf t
  • cisco-sw(config)# interface Vlan1
  • cisco-sw(config-if)# description MGMT
  • cisco-sw(config-if)# no shutdown
  • cisco-sw(config-if)# ipv6 address 2a02:24d8:71:3034::2/64
  • cisco-sw(config-if)# ip address 172.26.52.2/24
  • cisco-sw(config-if)# end
  • cisco-sw# show running-config interface vlan 1
!Command: show running-config interface Vlan1
!Running configuration last done at: Thu Oct  3 12:15:05 2024
!Time: Thu Oct  3 12:15:30 2024

version 10.1(1) Bios:version  

interface Vlan1
  description MGMT
  no shutdown
  ip address 172.26.52.2/24
  ipv6 address 2a02:24d8:71:3034::2/64
  • cisco-sw# copy running-config startup-config

Konnektivität testen

  • cisco-sw# ping 172.26.52.1
  • cisco-sw# ping6 2a02:24d8:71:3034::1

Default Routen

  • cisco-sw# configure terminal
  • cisco-sw(config)# ip route 0.0.0.0 0.0.0.0 172.26.52.1
  • cisco-sw(config)# ipv6 route ::/0 2a02:24d8:71:3034::1
  • cisco-sw(config)# end

Konnektivität testen

  • cisco-sw# ping 8.8.8.8
  • cisco-sw# ping6 2001:4860:4860::8888

Nameserver einrichten

  • cisco-sw# configure terminal
  • cisco-sw(config)# ip name-server 8.8.8.8
  • cisco-sw(config)# ip name-server 2001:4860:4860::8888
  • cisco-sw(config)# ip domain-name lab34.linuggs.de
  • cisco-sw# exit
  • cisco-sw# copy running-config startup-config

Ports einrichten

  • cisco-sw# configure terminal
  • cisco-sw(config)# interface ethernet 1/1
  • cisco-sw(config)# interface ethernet 1/1
  • cisco-sw(config-if)# switchport mode trunk
  • cisco-sw(config-if)# description Zur Firewall
  • cisco-sw(config)# interface ethernet 1/2
  • cisco-sw(config-if)# switchport access vlan 22
  • cisco-sw(config-if)# description SERVER
  • cisco-sw(config)# interface Ethernet1/3
  • cisco-sw(config-if)# switchport access vlan 21
  • cisco-sw(config-if)# description CLIENTS
  • cisco-sw(config)# interface Ethernet1/4
  • cisco-sw(config-if)# switchport access vlan 22
  • cisco-sw(config-if)# description SERVER
  • cisco-sw(config)# interface Ethernet1/5
  • cisco-sw(config-if)# switchport access vlan 22
  • cisco-sw(config-if)# description SERVER
  • cisco-sw(config)# interface Ethernet1/6
  • cisco-sw(config-if)# switchport access vlan 21
  • cisco-sw(config-if)# description CLIENTS
  • cisco-sw(config)# interface Ethernet1/7
  • cisco-sw(config-if)# switchport access vlan 22
  • cisco-sw(config-if)# description SERVER
  • cisco-sw# exit
  • cisco-sw# copy running-config startup-config

Ergebnis

Port-Konfiguration
Port VLAN Netz
Ethernet1/1 Trunk Zur Firewall
Ethernet1/2 22 SERVER
Ethernet1/3 21 CLIENTS
Ethernet1/4 22 SERVER
Ethernet1/5 22 SERVER
Ethernet1/6 21 CLIENTS
Ethernet1/7 22 SERVER