CCNAシュミレーション
CCNAシュミレーション
#config terminal
(config)# hostname NAME
(config)# enable secret password
(config)# interface ethernet 0
(config-if)# ip address 192.168.160.1 255.255.255.0
(config-if)# no shutdown
(cocnfig-if)# exit
(config)# interface serial 0
(config-if)# ip address 192.168.10.1 255.255.255.0
(config-if)# clock rate 64000
(config-if)# no shutdown
(config-if)# exit
(config)# router rip
(config-router)# network 192.168.10.0
(config-router)# network 192.168.160.0
(config-router)#end
copy run start
#config t
(cocnfig)# enable secret NAME
(config)# hostname NAME
(cocnfig)# line 0 4
(conig -line)# login
(cocnfig-line)# password password
(config-line)# line con 0
(config-line)# login
(cocnfig-line)# password password
(config-line)# exit
(cocnfig)# interface ethernet 0
(config-if)# ip address 192.168.1.3 255.255.255.0
(cocnfig-if)# no shutdown
(cocnfig-if)# exit
(config)# interface serial 0
(config-if)# ip address 172.16.9.2 255.255.255.0
(config-if)# clock rate 640000
(config-if)# no shutdown
(cocnfig-if)# exit
(config)# router rip
(cocnfig-router)# network 192.168.1.0
(config -router)# network 172.16.9.0
(cocnfig-router)#end
copy run start
enable
config t
(config)# access-list 101 deny tcp any 192.168.10.0
0.0.0.255 eq 23
(config)# access-list 101 permit any any
(config)# interface serila 0
(config-if)# ip access-group 101 in ***********
config t
(config)# interface ethernet 0
(config-if)# ip address 192.168.1.1 255.255.255.224
(config-if)# no shut
(config-if)# exit
(config)# interface serial 0
(config-if)# ip address 192.168.1.33 255.255.255.224
(config-if)# no shutdown
(config-if)# exit
(config)# router rip
(config-router)# network 192.168.1.0 *********** ネットワーク部指定
(config-router)# end
copy ru st
config t
(config)# ip nat pool poolname 192.168.178.90 192.168.178.90 netmask
255.255.255.248
(config)# access-list 1 permit 192.168.10.64 0.0.0.63 ***********64ネットワーク部をさす
(config)# ip nat inside source list 1 pool poolname 1 overload ***********
(config)# interface ethernet 0
(config-if)# ip nat inside ***********
(config-if)# exit
(config)# interface serial 0
(config-if)# ip nat outside ***********
(config-if)# end
copy ru st
VLAN1に新しいスイッチを追加します。
hostname switch1
interface vlan 1
ip address 192.168.20.1 255.255.255.0
no shutdown
exit
ip default-gateway 192.168.30.1
vtp mode client
vtp domain ccna
vtp pruning
vtp password password
copy ru st
インターフェースの特定IPアドレスへのアクセスを
拒否するリストをつくります。
config t
(config)# access-list 101 deny tcp any 192.168.1.1 0.0.0.0 eq 23
(config)# access-list 101 deny tcp any 192.168.11.1 0.0.0.0 eq 23
(config)# access-list 101 permit ip any any
(config)# line vty 0 4
(config-line) access-class 101 in
end
copy
(config)# access-list 101 deny icmp 192.168.1.0 0.0.0.255 any echo
(config)# access-list 101 permit any any
(config)# interface ethernet 0
(config-if)# ip access-group 101 in
end
copy ru st
192.168.3.5 255.255.255.252
のethernetの場合、192.168.3.4~7までの範囲なので
192.168.3.4 0.0.0.3 のrouter ospf の設定になる
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
exit
copy ru st
router ospf 1
network 192.168.24.0 0.0.0.255 area 0
network 192.168.60.8.0 0.0.0.3 area 0
***********ネットワーク部を指定する
network 192.168.60.0 0.0.0.255 area 0
と指定しても含まれることになる
show vlan
show vtp status
show run
show router
show ip ospf brief
no router ospf 2
router ospf 2
network 192.168.10.4 0.0.0.3 area 0
exit
exit
copy ru st
トラックバック
トラックバックURL:
http://www.happy-ritaiya.net/cgi/mt/mt-tb.cgi/417

