Вы находитесь на странице: 1из 4

CAU 2:

VLAN 30:
*L3_SW1:
L3_SW1(config)#vlan 10
L3_SW1(config)#vlan 20
L3_SW1(config)#vlan 30
L3_SW1(config)#int range f0/1-24
L3_SW1(config-if-range)#switchport mode access
L3_SW1(config-if-range)#switchport access vlan 30
*L3_SW2:
L3_SW2(config)#vlan 10
L3_SW2(config)#vlan 20
L3_SW2(config)#vlan 30
L3_SW2(config)#int range f0/1-24
L3_SW2(config-if-range)#switchport mode access
L3_SW2(config-if-range)#switchport access vlan 30
*L3_SW3:
L3_SW3(config)#vlan 10
L3_SW3(config)#vlan 20
L3_SW3(config)#vlan 30
L3_SW3(config)#int range f0/1-24
L3_SW3(config-if-range)#switchport mode access
L3_SW3(config-if-range)#switchport access vlan 30
VLAN 20:
*L2_SW1:
L2_SW1(config)#vlan 10
L2_SW1(config)#vlan 20
L2_SW1(config)#vlan 30
L2_SW1(config)#int range f0/1-24
L2_SW1(config-if-range)#switchport mode access
L2_SW1(config-if-range)#switchport access vlan 20
*L2_SW2:
L2_SW2(config)#vlan 10
L2_SW2(config)#vlan 20
L2_SW2(config)#vlan 30
L2_SW2(config)#int range f0/1-24
L2_SW2(config-if-range)#switchport mode access
L2_SW2(config-if-range)#switchport access vlan 20
*L1_SW1:
L1_SW1(config)#vlan 10
L1_SW1(config)#vlan 20
L1_SW1(config)#vlan 30
L1_SW1(config)#int range f0/1-5
L1_SW1(config-if-range)#switchport mode access
L1_SW1(config-if-range)#switchport access vlan 20
VLAN 10:
*L1_SW1:
L1_SW1(config)#int range f0/6-24
L1_SW1(config-if-range)#switchport mode access
L1_SW1(config-if-range)#switchport access vlan 10
VLAN 40:
*Multi SW:
Switch(config)#vlan 10
Switch(config)#vlan 20
Switch(config)#vlan 30
Switch(config)#vlan 40
Switch(config)#int range f0/16-24
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 40
CAU 3:
*L3_SW1:
L3_SW1(config)#int g0/2
L3_SW1(config-if)#switchport mode trunk
*L3_SW2:
L3_SW2(config)#int g0/1
L3_SW2(config-if)#switchport mode trunk
*L3_SW3:
L3_SW3(config)#int g0/2
L3_SW3(config-if)#switchport mode trunk
*L2_SW1:
L2_SW1(config)#int g0/2
L2_SW1(config-if)#switchport mode trunk
*L2_SW2:
L2_SW2(config)#int g0/1
L2_SW2(config-if)#switchport mode trunk
*L1_SW1:
L1_SW1(config)#int g0/1
L1_SW1(config-if)#switchport mode trunk

CAU 3: OSPF
*Multi SW:
Switch(config)#ip routing
Switch(config)#int vlan 30
Switch(config-if)#ip add 192.168.38.1 255.255.255.128
Switch(config-if)#no shut
Switch(config)#int vlan 20
Switch(config-if)#ip add 192.168.38.129 255.255.255.192
Switch(config-if)#no shut
Switch(config)#int vlan 10
Switch(config-if)#ip add 192.168.38.193 255.255.255.224
Switch(config-if)#no shut
Switch(config)#int vlan 40
Switch(config-if)#ip add 192.168.38.225 255.255.255.240
Switch(config-if)#no shut

Switch(config)#int g0/1
Switch(config-if)#no switchport
Switch(config-if)#ip add 192.168.38.241 255.255.255.252
Switch(config-if)#no shut
Switch(config)#int g0/2
Switch(config-if)#no switchport
Switch(config-if)#ip add 192.168.38.245 255.255.255.252
Switch(config-if)#no shut

Switch(config)#router ospf 100


Switch(config-router)#network 192.168.38.0 0.0.0.127 area 0
Switch(config-router)#network 192.168.38.128 0.0.0.63 area 0
Switch(config-router)#network 192.168.38.192 0.0.0.31 area 0
Switch(config-router)#network 192.168.38.224 0.0.0.15 area 0
Switch(config-router)#network 192.168.38.240 0.0.0.3 area 0
Switch(config-router)#network 192.168.38.244 0.0.0.3 area 0

R0:
R0(config)#router ospf 100
R0(config-router)#network 192.168.38.240 0.0.0.3 area 0
R1:
R1(config)#router ospf 100
R1(config-router)#network 192.168.38.244 0.0.0.3 area 0
R1(config-router)#network 192.168.100.0 0.0.0.255 area 0

CAU 5: NAT
R0:
R0(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0
R0(config)#router ospf 100
R0(config-router)#default-information originate
R0(config)#ip nat inside source static 0.0.0.0 1.1.1.1
R0(config)#int f0/0
R0(config-if)#ip nat inside
R0(config)#int s0/0/0
R0(config-if)#ip nat outside
R1:
R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0
R1(config)#router ospf 100
R1(config-router)#default-information originate
R1(config)#ip nat inside source static 0.0.0.0 2.2.2.1
R1(config)#int s0/0/0
R1(config-if)#ip nat outside
R1(config)#int f0/0
R1(config-if)#ip nat inside
R1(config)#int f0/1
R1(config-if)#ip nat inside

nat bo sung:

CAU 7: STP
Switch(config)#spanning-tree vlan 10 root primary
Switch(config)#spanning-tree vlan 20 root primary
Switch(config)#spanning-tree vlan 30 root primary

L3_SW1(config)#int g0/1
L3_SW1(config-if)#switchport mode trunk
L2_SW1(config)#int g0/1
L2_SW1(config-if)#switchport mode trunk
L1_SW1(config)#int g0/2
L1_SW1(config-if)#switchport mode trunk
L3_SW3(config)#int g0/2
L3_SW3(config-if)#spanning-tree vlan 30 cost 50
L2_SW2(config)#int g0/1
L2_SW2(config-if)#spanning-tree vlan 20 cost 50
L1_SW1(config)#int g0/2
L1_SW1(config-if)#spanning-tree vlan 10 cost 2

CAU 8: DHCP
Switch(config)#ip dhcp pool VLAN30
Switch(dhcp-config)#network 192.168.38.0 255.255.255.128
Switch(dhcp-config)#dns-server 4.4.4.2
Switch(dhcp-config)#default-router 192.168.38.1
Switch(config)#ip dhcp pool VLAN20
Switch(dhcp-config)#network 192.168.38.128 255.255.255.192
Switch(dhcp-config)#default-router 192.168.38.129
Switch(dhcp-config)#dns-server 4.4.4.2
Switch(config)#ip dhcp pool VLAN10
Switch(dhcp-config)#network 192.168.38.192 255.255.255.224
Switch(dhcp-config)#default-router 192.168.38.193
Switch(dhcp-config)#dns-server 4.4.4.2

CAU 9: ACL
Switch(config)#access-list 100 permit ip 192.168.32.192 0.0.0.31 host Server FTP IP
192.168.38.226
Switch(config)#access-list 100 permit ip 192.168.32.128 0.0.0.63 host FTP WiCo
192.168.38.228
Switch(config)#access-list 100 permit ip 192.168.32.0 0.0.0.127 host FTP R&D
192.168.38.230
Switch(config)#access-list 100 permit ip any host 192.168.38.227
Switch(config)#access-list 100 permit ip any host 192.168.38.229
Switch(config)#int vlan 40
Switch(config-if)#ip access-group 100 out

access-list 100 permit ip 192.168.31.192 0.0.0.31 host 192.168.31.225


access-list 100 permit ip 192.168.31.128 0.0.0.63 host 192.168.31.226
access-list 100 permit ip 192.168.31.0 0.0.0.127 host 192.168.31.227
access-list 100 permit ip any host 192.168.31.228
access-list 100 permit ip any host 192.168.31.229

CAU 10: TELNET


*Multi SW:
Switch(config)#line vty 0 4
Switch(config-line)#password cisco456
Switch(config-line)#login

R0(config)#line vty 0 4
R0(config-line)#password cisco 456
R0(config-line)#login

R1(config)#line vty 0 4
R1(config-line)#password cisco456
R1(config-line)#login