티스토리 뷰

Network

네트워크_6.실습

eenue 2024. 11. 13. 16:51

Router(config)#hostname R1
R1(config)#int f0/0
R1(config-if)#ip addr 192.168.10.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#int se2/0
R1(config-if)#ip addr 192.168.0.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.10.0 0.0.0.255 area 0
R1(config-router)#network 192.168.0.0 0.0.0.255 area 0
R1(config-router)#end

R1#show ip route
P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.0.0/24 is directly connected, Serial2/0
C    192.168.10.0/24 is directly connected, FastEthernet0/0
O    192.168.20.0/24 [110/65] via 192.168.0.2, 00:00:20, Serial2/0
O    192.168.30.0/24 [110/65] via 192.168.0.2, 00:00:20, Serial2/0
R1(config)#access-list 100 permit tcp host 192.168.20.10 192.168.0.1 0.0.0.255 eq 80
R1(config)#access-list 100 permit tcp 192.168.20.0 0.0.0.255 192.168.0.1 0.0.0.255 eq 21
R1(config)#access-list 100 permit icmp 192.168.20.0 0.0.0.255 192.168.0.1 0.0.0.255
R1(config)#access-list 100 permit icmp host 192.168.30.10 192.168.0.1 0.0.0.255

R1(config)#access-list 100 permit tcp host 192.168.30.10 192.168.0.1 0.0.0.255 eq 21
R1(config)#access-list 100 permit tcp 192.168.20.0 0.0.0.255 192.168.0.1 0.0.0.255 eq 53
R1(config)#access-list 100 permit udp 192.168.20.0 0.0.0.255 192.168.0.1 0.0.0.255 eq 53
R1(config)#access-list 100 permit tcp 192.168.30.0 0.0.0.255 192.168.0.1 0.0.0.255 eq 80
R1(config)#do sh acc
Extended IP access list 100
10 permit tcp host 192.168.20.10 192.168.0.0 0.0.0.255 eq www
20 permit tcp 192.168.20.0 0.0.0.255 192.168.0.0 0.0.0.255 eq ftp
30 permit icmp 192.168.20.0 0.0.0.255 192.168.0.0 0.0.0.255
40 permit icmp host 192.168.30.10 192.168.0.0 0.0.0.255
50 permit tcp host 192.168.30.10 192.168.0.0 0.0.0.255 eq ftp
60 permit tcp 192.168.20.0 0.0.0.255 192.168.0.0 0.0.0.255 eq domain
70 permit udp 192.168.20.0 0.0.0.255 192.168.0.0 0.0.0.255 eq domain
80 permit tcp 192.168.30.0 0.0.0.255 192.168.0.0 0.0.0.255 eq www
R1(config)#username ftpuser privilege 15 secret 1111

R1(config)#aaa new-model

R1(config)#aaa authentication login default local
R1(config)#ip ftp username ftpuser
R1(config)#ip ftp password 1111

Router(config)#int se2/0
Router(config-if)#ip addr 192.168.0.2 255.255.255.0
Router(config-if)#no shutdown
Router(config)#int f0/0
Router(config-if)#ip addr 192.168.20.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#int f1/0
Router(config-if)#ip addr 192.168.30.1 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 192.168.0.0 0.0.0.255 area 0
Router(config-router)#network 192.168.0.0 0.0.0.255 area 0
00:12:56: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.10.1 on Serial2/0
Router(config-router)#network 192.168.20.0 0.0.0.255 area 0
Router(config-router)#network 192.168.30.0 0.0.0.255 area 0
Router(config-router)#end
Router#
%SYS-5-CONFIG_I: Configured from console by console

Router#show ip route
P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.0.0/24 is directly connected, Serial2/0
O    192.168.10.0/24 [110/65] via 192.168.0.1, 00:00:22, Serial2/0
C    192.168.20.0/24 is directly connected, FastEthernet0/0
C    192.168.30.0/24 is directly connected, FastEthernet1/0

트러블슈팅

문제_접속이 안됨.

R1에서 R2로 텔넷 접속하려면 R2에다가 텔넷을 생성해야한다.(반대로 만들었음!)

결과

1. 192.168.20.10에서 www 서비스 접속

2. 192.168.20.0 대역에서 FTP 접속, www.kosa.vm ping 접속 가능

3. 192.168.30.10에서 ping, ftp 접속가능

4. 192.168.30.0 대역 www 접속

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함