1/ Lab OSPF
download document: link download
download command : Link
R1
#interface loopback 1
ip address 1.1.1.1 255.255.255.255
router ospf 1
router-id 1.1.1.1
network 10.10.10.0 0.0.0.255 area 0
network 10.1.1.0 0.0.0.3 area 0
network 30.3.3.0 0.0.0.3 area 0
network 50.5.5.0 0.0.0.3 area 0
#interface GigabitEthernet 4/0
ip ospf network point-to-point
#interface GigabitEthernet 0/0
ip ospf network point-to-point
#interface GigabitEthernet 1/0
ip ospf network point-to-point
#int g0/0
ip ospf cost 10
=================================================
R2
#interface loopback 2
ip address 2.2.2.2 255.255.255.255
router ospf 1
router-id 2.2.2.2
network 20.20.20.0 0.0.0.255 area 0
network 10.1.1.0 0.0.0.3 area 0
network 20.2.2.0 0.0.0.3 area 0
#interface GigabitEthernet 1/0
ip ospf network point-to-point
#interface GigabitEthernet 2/0
ip ospf network point-to-point
=============================================================================
R3
#interface loopback 3
ip address 3.3.3.3 255.255.255.255
router ospf 1
router-id 3.3.3.3
network 30.30.30.0 0.0.0.255 area 0
network 30.3.3.0 0.0.0.3 area 0
network 40.4.4.0 0.0.0.3 area 0
#interface GigabitEthernet 3/0
ip ospf network point-to-point
#interface GigabitEthernet 4/0
ip ospf network point-to-point
==============================================================================
R4
#interface loopback 4
ip address 4.4.4.4 255.255.255.255
router ospf 1
router-id 4.4.4.4
network 40.40.40.0 0.0.0.255 area 0
network 20.2.2.0 0.0.0.3 area 0
network 40.4.4.0 0.0.0.3 area 0
network 50.5.5.0 0.0.0.3 area 0
#interface GigabitEthernet 2/0
ip ospf network point-to-point
#interface GigabitEthernet 3/0
ip ospf network point-to-point
#interface GigabitEthernet 0/0
ip ospf network point-to-point
#int g0/0
ip ospf cost 10
============================================================================
command :
#interface loopback 0
ip address 1.1.1.1 255.255.255.255
#sh run int loopback 0 : view IP Lo 0
after change router-id
#clear ip ospf process -> yes : clear ospf process
#sh ip ospf neighbor : show neighbor ospf
#interface g1
#ip ospf cost 10
#sh ip ospf interface brief : view Cost number on interface
#show ip ospf interface GigabitEthernet 0/0/0
#interface GigabitEthernet 0/0/0
ip ospf network point-to-point
====================
command PC on GNS3
#ip 10.10.10.2 255.255.255.0 10.10.10.1 : IP: 10.10.10.2/24 gateway 10.10.10.1
#save : save configuration on PC
#sh ip : show IP address on PC