Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

LB 9 - Computernetze planen und realisieren

BGY T Übersicht Stand: 08.09.2021

IOS-Befehle

Grundlegende Befehle

Switch>ena

Switch#exit

Switch#show running-config

Switch#show startup-config

Switch#show ?

Switch#reload

Switch#show interface VLAN1

Switch#configure terminal

Switch(config)#hostname Switch_A

Interface-Befehle

Switch(config)#interface vlan1

Switch(config)#interface fa0/1

Switch(config-if)#ip address 192.168.1.1 255.255.255.0

Switch(config-if)#no shutdown

Switch#copy running-config startup-config

Port Security

Switch(config-if)#switchport mode access

Switch(config-if)#switchport port-security

Switch(config-if)#switchport port-security mac-address sticky

Switch(config-if)#switchport port-security maximum 1

Switch(config-if)#switchport port-security violation shutdown

Switch#show port-security

Switch(config-if)#shutdown administratives Herunterfahren

Switch(config-if)#no shutdown Hochfahren der Schnittstelle

www.p-merkelbach.de –1– © Merkelbach


LB 9 - Computernetze planen und realisieren

MAC-Adressen

Switch#show mac-address-table

Switch#clear mac-address-table

Switch(config)#mac-address-table static 0030.843b.5aeb vlan 1 interface


fastethernet 0/2

VLAN

Switch#show vlan

Switch#vlan database

Switch(vlan)#vlan 10 name Lehrer

Switch(config)#int fa0/1

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan 10

Switch#show vlan

Switch#show vlan id 10

Switch(vlan)#no vlan 10

Switch(config-if)#no switchport access vlan 10

Trunk

Switch(config-if)#switchport mode trunk

Switch(config-if)#no switchport mode trunk

Switch(config-if)#switchport trunk allowed vlan remove 20

VTP (VLAN Trunking Protocol)

Switch(vlan)#vtp server

Switch(vlan)#vtp client

Switch(vlan)#vtp domain BGY

Switch#show vtp status

STP (Spanning Tree Protocol)

Switch_A#show spanning-tree

Switch_B(config)#spanning-tree vlan 1 priority 4096

www.p-merkelbach.de –2– © Merkelbach


LB 9 - Computernetze planen und realisieren

Routing Allgemein

Router# show ip route

Router# show ip protocols

Router# show int s0/0

Router(config)#int fa0/0 (Fast Ethernet)


Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown

Router(config)#int s0/0 (serielle Schnittstellen)


Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#clock rate 500000 (bei DCE)
Router(config-if)#no shutdown

Dynamisches Routing

RIP

Router(config)# router rip


Router(config-router)# network 192.168.1.0

OSPF

Router(config)# router ospf 1


Router(config-router)# network 192.168.1.0 0.0.0.255 area 0

Router# show ip ospf interface

Router(config-if)# bandwidth 64
Router(config-if)# ip ospf cost 14

Statisches Routing

Router(config)# ip route [network/host] [mask] [address/interface]

Defaultroute
Router(config)# ip route 0.0.0.0 0.0.0.0 [address/interface]

Accesslisten

einfache Accesslisten

Router(config)# access-list 1 deny 192.2.2.0 0.0.0.255


Router(config)# access-list 1 permit any

erweiterte Accesslisten

Router(config)# access-list 101 deny tcp host 192.1.1.10


200.1.1.0 0.0.0.255 eq www
Router(config)# access-list 101 permit ip any any

Router(config-if)# ip access-group 101 out (oder in)

www.p-merkelbach.de –3– © Merkelbach

You might also like