Switch 2 sozlash
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Sw2
Sw2(config)#vlan 10
Sw2(config-vlan)#vlan 20
Sw2(config-vlan)#vlan 30
Sw2(config-vlan)#vlan 40
Sw2(config-vlan)#vlan 50
Sw2(config-vlan)#exit
Sw2(config)#interface fastEthernet 0/1
Sw2(config-if)#switchport mode trunk
Sw2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Sw2(config-if)#switchport trunk allowed vlan 50
Sw2(config-if)#exit
Sw2(config)#
Sw2(config)#interface fastEthernet 0/3
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 10
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/4
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 20
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/5
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 30
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/6
Sw2(config-if)#switchport mode access
Sw2(config-if)#switchport access vlan 40
Sw2(config-if)#exit
Sw2(config)#interface fastEthernet 0/2
Sw2(config-if)#switchport mode trunk
Sw2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
Sw2(config-if)#switchport trunk allowed vlan 10,20,30,40,50
10
Sw2(config-if)#exit
Sw2(config)#
Sw2(config)#
Router ni sozlash
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fa 0/0
%Invalid interface type and number
Router(config)#
Router(config)#interface GigabitEthernet0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface GigabitEthernet0/1
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#int fa 0/0.10
%Invalid interface type and number
Router(config)#interface GigabitEthernet0/0.10
Router(config-subif)#encapsulation dot1Q 20
Router(config-subif)#ip address 192.168.2.1 255.255.255.0
Router(config-subif)#exit
11
Router(config)#interface GigabitEthernet0/0.20
Router(config-subif)#encapsulation dot1Q 20
%Configuration of multiple subinterfaces of the same main
interface with the same VID (20) is not permitted.
This VID is already configured on GigabitEthernet0/0.10.
Router(config-subif)#ip address 192.168.2.1 255.255.255.0
% Configuring IP routing on a LAN subinterface is only allowed if that
subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
or ISL vLAN.
Router(config-subif)#exit
Router(config)#int fa 0/0.30
%Invalid interface type and number
Router(config)#interface GigabitEthernet0/0.30
Router(config-subif)#encapsulation dot1Q 30
Router(config-subif)#ip address 192.168.3.1 255.255.255.0
Router(config-subif)#exit
Router(config)#int fa 0/0.40
%Invalid interface type and number
Router(config)#interface GigabitEthernet0/0.40
Router(config-subif)#encapsulation dot1Q 40
Router(config-subif)#ip address 192.168.4.1 255.255.255.0
Router(config-subif)#exit
Router(config)#interface GigabitEthernet0/0.50
Router(config-subif)#encapsulation dot1Q 50
Router(config-subif)#ip address 192.168.5.1 255.255.255.0
Router(config-subif)#exit
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#ip access-list extended TEST
Router(config-ext-nacl)#permit icmp any any
Router(config-ext-nacl)#permit tcp 192.168.1.0 0.0.0.255 host 192.168.5.2 eq 80
Router(config-ext-nacl)#permit tcp 192.168.2.0 0.0.0.255 host 192.168.5.3 eq 80
Router(config-ext-nacl)#permit tcp 192.168.3.0 0.0.0.255 host 192.168.5.4 eq 20
Router(config-ext-nacl)#permit tcp 192.168.3.0 0.0.0.255 host 192.168.5.4 eq 21
Router(config-ext-nacl)#permit tcp 192.168.4.0 0.0.0.255 host 192.168.5.5 eq 80
Router(config-ext-nacl)#exit
Router(config)#int fastEthernet 0/0.50
%Invalid interface type and number
Router(config)#interface GigabitEthernet 0/0.50
Router(config-subif)#ip access-group TEST out
Router(config-subif)#exit
Router(config)#
12
Do'stlaringiz bilan baham: |