티스토리 뷰
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 접속
'Network' 카테고리의 다른 글
네트워크_5.서브넷팅, 슈퍼넷팅 (0) | 2024.11.13 |
---|---|
네트워크_4.네트워크 계층모델 (1) | 2024.11.13 |
네트워크_3.네트워크 프로토콜 (0) | 2024.11.13 |
네트워크_2.네트워크 장치 (0) | 2024.11.13 |
네트워크_1. 네트워크란 (0) | 2024.11.13 |