-
Building OSPF network with EVE-NG (2)Protocols/BGP_OSPF_MPLS_VPN 2021. 2. 11. 00:10
<First OSPF Topology>
all OPSF nodes are in a specific 'area'. Area 0 is a backbone area. the backbone area is responsible for distributing routing information between non-backbone areas. if you have Area more than one, you should have backbone area.
the backbone area should be 0 or 0.0.0.0 (0.0.0.0 is same with 0).
you can use the decimal number or IP address format for Area number.
<Configuration>
R1(config)#router ospf 1 // this command makes you going into OSPF configuration mode.
// the number is Process-ID which identifying a ospf process in several ospf processes
// it means that a router can run several ospf processes. this process id affects one router.
R1(config-router)#router-id 1.1.1.1 // this id defines router's unique id among routers running OSPF
// by this, routers know who advertise route information
R1(config-router)#network 1.1.1.1 0.0.0.0 area 1 // 1.1.1.1 only will be in area 1
R1(config-router)#network 1.1.123.1 0.0.0.0 area 1 // 1.1.123.1 only will be in area 1
R5(config-router)#network 1.1.1.1 0.0.0.0 area ?
<0-4294967295> OSPF area ID as a decimal value
A.B.C.D OSPF area ID in IP address formatR2(config)#router ospf 1
R2(config-router)#router-id 1.1.2.2
R2(config-router)#network 1.1.2.2 0.0.0.0 area 0
R2(config-router)#network 1.1.123.2 0.0.0.0 area 1
R2(config-router)#network 1.1.24.2 0.0.0.0 area 0R3(config)#router ospf 1
R3(config-router)#router-id
R3(config-router)#router-id 1.1.3.3
R3(config-router)#network 1.1.3.3 0.0.0.0 area 0
R3(config-router)#network 1.1.123.3 0.0.0.0 area 1
R3(config-router)#network 1.1.34.3 0.0.0.0 area 0R4(config)#router ospf 1
R4(config-router)#router-id 1.1.4.4
R4(config-router)#network 1.1.4.4 0.0.0.0 area 0
R4(config-router)#network 1.1.24.4 0.0.0.0 area 0
R4(config-router)#network 1.1.34.4 0.0.0.0 area 0
R4(config-router)#network 1.1.45.4 0.0.0.0 area 45R5(config)#router ospf 1
R5(config-router)#router
R5(config-router)#router-id 1.1.5.5
R5(config-router)#network 1.1.5.5 0.0.0.0 area 45
R5(config-router)#network 1.1.45.5 0.0.0.0 area 45R5#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/2 msR1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/8 is variably subnetted, 10 subnets, 2 masks
O IA 1.1.2.2/32 [110/11] via 1.1.123.2, 12:40:08, Ethernet0/0.123 // loopback interface is set by /32
O IA 1.1.3.3/32 [110/11] via 1.1.123.3, 00:20:37, Ethernet0/0.123
O IA 1.1.4.4/32 [110/21] via 1.1.123.2, 00:17:45, Ethernet0/0.123
O IA 1.1.5.5/32 [110/31] via 1.1.123.2, 00:01:01, Ethernet0/0.123
O IA 1.1.24.0/24 [110/20] via 1.1.123.2, 12:39:35, Ethernet0/0.123
O IA 1.1.34.0/24 [110/74] via 1.1.123.3, 00:20:18, Ethernet0/0.123
O IA 1.1.45.0/24 [110/30] via 1.1.123.2, 00:17:13, Ethernet0/0.123If you want to advertise the subnet mask that loopback is having, not /32, you need to command 'ip opsf network point-to-point' in the interface.
R1(config)#int lo 0
R1(config-if)#ip ospf network point-to-pointR5#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/8 is variably subnetted, 11 subnets, 2 masks
O IA 1.1.1.0/24 [110/31] via 1.1.45.4, 00:02:03, Ethernet0/0.45
O IA 1.1.2.2/32 [110/21] via 1.1.45.4, 00:19:09, Ethernet0/0.45
O IA 1.1.3.3/32 [110/75] via 1.1.45.4, 00:19:09, Ethernet0/0.45
O IA 1.1.4.4/32 [110/11] via 1.1.45.4, 00:19:09, Ethernet0/0.45
O IA 1.1.24.0/24 [110/20] via 1.1.45.4, 00:19:09, Ethernet0/0.45
O IA 1.1.34.0/24 [110/74] via 1.1.45.4, 00:19:09, Ethernet0/0.45
O IA 1.1.123.0/24 [110/30] via 1.1.45.4, 00:19:09, Ethernet0/0.45<Ping test>
R1#ping 1.1.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msR1#ping 1.1.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msR1#ping 1.1.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 msR1#ping 1.1.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/3 msThe best way to study network is to hands-on.
- Peter Jeon
'Protocols > BGP_OSPF_MPLS_VPN' 카테고리의 다른 글
[MPLS] IP/MPLS Basics (0) 2021.06.08 OSPF metric/cost (0) 2021.02.16 OSPF Link-state/Adjacency changes (0) 2021.02.16 The OSPF Packet Types and Flow (0) 2021.02.11 Building OSPF network with EVE-NG (1) (0) 2021.02.09