[Practice] Dynamic Routing (OSPF)
2020. 1. 27. 23:31ㆍNetwork/Practice
실습 코드
더보기
1. PC
PC1 : ip 10.10.10.10/24 10.10.10.254
PC2 : ip 192.168.10.10/24 192.168.10.254
PC3 : ip 172.16.10.10/24 172.16.10.254
2. R1
R1#conf t
R1(config)#int fa 0/0
R1(config-if)#ip addr 10.10.11.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int fa 0/1
R1(config-if)#ip addr 10.10.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#router ospf 1
R1(config-router)#network 10.10.11.0 0.0.0.255 area 1
R1(config-router)#network 10.10.12.0 0.0.0.255 area 1
3. R2
R2#conf t
R2(config)#int fa 0/0
R2(config-if)#ip addr 10.10.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int fa 0/1
R2(config-if)#ip addr 10.10.23.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int fa 1/0
R2(config-if)#ip addr 10.10.10.254 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#router ospf 1
R2(config-router)#network 10.10.10.0 0.0.0.255 area 1
R2(config-router)#network 10.10.23.0 0.0.0.255 area 1
R2(config-router)#network 10.10.12.0 0.0.0.255 area 1
R2(config-router)#passive-interface fa 1/0
4. R3
R3#conf t
R3(config)#int fa 0/0
R3(config-if)#ip addr 10.10.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int fa 0/1
R3(config-if)#ip addr 10.10.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#router ospf 1
R3(config-router)#network 10.10.23.0 0.0.0.255 area 1
R3(config-router)#network 10.10.13.0 0.0.0.255 area 1
5. R4
R4#conf t
R4(config)#int fa 0/0
R4(config-if)#ip addr 192.168.15.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#int fa 0/1
R4(config-if)#ip addr 192.168.46.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#router ospf 2
R4(config-router)#network 192.168.15.0 0.0.0.255 area 2
R4(config-router)#network 192.168.46.0 0.0.0.255 area 2
6. R5
R5#conf t
R5(config)#int fa 0/0
R5(config-if)#ip addr 192.168.16.5 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#int fa 0/1
R5(config-if)#ip addr 192.168.56.5 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#router ospf 2
R5(config-router)#network 192.168.16.0 0.0.0.255 area 2
R5(config-router)#network 192.168.56.0 0.0.0.255 area 2
7. R6
R6#conf t
R6(config)#int fa 0/0
R6(config-if)#ip addr 192.168.46.6 255.255.255.0
R6(config-if)#no shutdown
R6(config-if)#int fa 0/1
R6(config-if)#ip addr 192.168.56.6 255.255.255.0
R6(config-if)#no shutdown
R6(config-if)#int fa 1/0
R6(config-if)#ip addr 192.168.10.254 255.255.255.0
R6(config-if)#no shutdown
R6(config-if)#router ospf 2
R6(config-router)#network 192.168.46.0 0.0.0.255 area 2
R6(config-router)#network 192.168.56.0 0.0.0.255 area 2
R6(config-router)#network 192.168.10.0 0.0.0.255 area 2
R6(config-router)#passive-interface fa 1/0
8. R7
R7#conf t
R7(config)#int fa 0/0
R7(config-if)#ip addr 172.16.18.7 255.255.255.0
R7(config-if)#no shutdown
R7(config-if)#int fa 0/1
R7(config-if)#ip addr 172.16.78.7 255.255.255.0
R7(config-if)#no shutdown
R7(config-if)#router rip
R7(config-router)#version 2
R7(config-router)#network 172.16.18.0
R7(config-router)#network 172.16.78.0
R7(config-router)#no auto-summary
9. R8
R8#conf t
R8(config)#int fa 0/0
R8(config-if)#ip addr 172.16.78.8 255.255.255.0
R8(config-if)#no shutdown
R8(config-if)#int fa 0/1
R8(config-if)#ip addr 172.16.10.254 255.255.255.0
R8(config-if)#no shutdown
R8(config-if)#router rip
R8(config-router)#version 2
R8(config-router)#network 172.16.10.0
R8(config-router)#network 172.16.78.0
R8(config-router)#no auto-summary
R8(config-router)#passive-interface fa 0/1
10. R9 (ASBR)
ASBR#conf t
ASBR(config)#int fa 0/0
ASBR(config-if)#ip addr 192.168.94.100 255.255.255.0
ASBR(config-if)#no shutdown
ASBR(config-if)#int fa 0/1
ASBR(config-if)#ip addr 100.100.19.9 255.255.255.0
ASBR(config-if)#no shutdown
ASBR(config-if)#int fa 1/0
ASBR(config-if)#ip addr 100.100.20.9 255.255.255.0
ASBR(config-if)#no shutdown
ASBR(config-if)#router ospf 3
ASBR(config-router)#network 100.100.20.0 0.0.0.255 area 0
ASBR(config-router)#network 100.100.19.0 0.0.0.255 area 0
ASBR(config-router)#ip route 0.0.0.0 0.0.0.0 192.168.94.94
11. R10 (ABR1)
ABR1#conf t
ABR1(config)#int fa 0/0
ABR1(config-if)#ip addr 100.100.19.10 255.255.255.0
ABR1(config-if)#no shutdown
ABR1(config-if)#int fa 0/1
ABR1(config-if)#ip addr 100.100.21.10 255.255.255.0
ABR1(config-if)#no shutdown
ABR1(config-if)#int fa 1/0
ABR1(config-if)#ip addr 10.10.11.10 255.255.255.0
ABR1(config-if)#no shutdown
ABR1(config-if)#int fa 2/0
ABR1(config-if)#ip addr 10.10.13.10 255.255.255.0
ABR1(config-if)#no shutdown
ABR1(config-if)#router ospf 1
ABR1(config-router)#network 10.10.11.0 0.0.0.255 area 1
ABR1(config-router)#network 10.10.13.0 0.0.0.255 area 1
ABR1(config-router)#default-information originate always
ABR1(config-router)#router ospf 3
ABR1(config-router)#network 100.100.19.0 0.0.0.255 area 0
ABR1(config-router)#network 100.100.21.0 0.0.0.255 area 0
ABR1(config-router)#redistribute ospf 1 subnets
12. R11 (ABR2)
ABR2#conf t
ABR2(config)#int fa 0/0
ABR2(config-if)#ip addr 100.100.20.11 255.255.255.0
ABR2(config-if)#no shutdown
ABR2(config-if)#int fa 0/1
ABR2(config-if)#ip addr 100.100.21.11 255.255.255.0
ABR2(config-if)#no shutdown
ABR2(config-if)#int fa 1/0
ABR2(config-if)#ip addr 192.168.15.11 255.255.255.0
ABR2(config-if)#no shutdown
ABR2(config-if)#int fa 2/0
ABR2(config-if)#ip addr 192.168.16.11 255.255.255.0
ABR2(config-if)#no shutdown
ABR2(config-if)#int fa 3/0
ABR2(config-if)#ip addr 172.16.18.11 255.255.255.0
ABR2(config-if)#no shutdown
ABR2(config-if)#router rip
ABR2(config-router)#version 2
ABR2(config-router)#network 172.16.18.0
ABR2(config-router)#no auto-summary
ABR2(config-router)#default-information originate
ABR2(config-router)#router ospf 2
ABR2(config-router)#network 192.168.15.0 0.0.0.255 area 2
ABR2(config-router)#network 192.168.16.0 0.0.0.255 area 2
ABR2(config-router)#router ospf 3
ABR2(config-router)#network 100.100.20.0 0.0.0.255 area 0
ABR2(config-router)#network 100.100.21.0 0.0.0.255 area 0
ABR2(config-router)#redistribute rip subnets
ABR2(config-router)#redistribute ospf 2 subnets
728x90
'Network > Practice' 카테고리의 다른 글
[Practice] VLAN (0) | 2020.01.28 |
---|---|
[Practice] NAT-PAT (0) | 2020.01.28 |
[Practice] Dynamic Routing (RIP) (0) | 2020.01.27 |
[Practice] Static Routing (0) | 2020.01.27 |