Sie sind auf Seite 1von 7

~~~~~~~~~~~~~~~VRF-OSPFv2~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~VRF-OSPFv2~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~VRF-OSPFv2~~~~~~~~~~~~~~~

---------------------------------R1---------------------------------
enable
configure terminal
interface f0/1
ip address 210.16.1.1 255.255.255.0
no shutdown
exit
interface f0/0
ip address 20.20.20.1 255.255.255.252
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 20.20.20.2
exit
wr

---------------------------------R2---------------------------------
enable
configure terminal
interface f0/0
ip address 210.30.1.1 255.255.255.0
no shutdown
exit
interface f0/1
ip address 30.30.30.5 255.255.255.252
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 30.30.30.6
exit
wr

---------------------------------R3---------------------------------
enable
configure terminal
ip vrf EMPRESA_A
rd 10:10
exit
ip vrf EMPRESA_B
rd 10:20
exit
interface f0/0
ip vrf forwarding EMPRESA_A
ip address 20.20.20.2 255.255.255.252
no shutdown
exit
interface f0/1
ip vrf forwarding EMPRESA_B
ip address 30.30.30.6 255.255.255.252
no shutdown
exit
interface f1/0
no shutdown
exit
interface f1/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.21 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f1/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.21 255.255.255.252
no shutdown
ip ospf cost 5
exit
interface f2/0
no shutdown
exit
interface f2/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.29 255.255.255.252
no shutdown
ip ospf cost 5
exit
interface f2/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.29 255.255.255.252
no shutdown
ip ospf cost 1
exit

ip route vrf EMPRESA_A 210.16.1.0 255.255.255.0 20.20.20.1


ip route vrf EMPRESA_B 210.30.1.0 255.255.255.0 30.30.30.5

router ospf 10 vrf EMPRESA_A


redistribute static metric 20 subnets
default-information originate
network 20.20.20.0 0.0.0.3 area 0
network 20.20.20.20 0.0.0.3 area 0
network 20.20.20.28 0.0.0.3 area 0
exit
router ospf 20 vrf EMPRESA_B
redistribute static metric 20 subnets
default-information originate
network 30.30.30.4 0.0.0.3 area 0
network 30.30.30.20 0.0.0.3 area 0
network 30.30.30.28 0.0.0.3 area 0
exit
exit
wr

---------------------------------R7---------------------------------
enable
configure terminal
ip vrf EMPRESA_A
rd 10:10
exit
ip vrf EMPRESA_B
rd 10:20
exit
interface f0/0
no shutdown
exit
interface f0/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.22 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f0/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.22 255.255.255.252
no shutdown
ip ospf cost 5
exit
interface f1/0
no shutdown
exit
interface f1/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.37 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f1/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.37 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f0/1
no shutdown
exit
interface f0/1.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.25 255.255.255.252
no shutdown
ip ospf cost 5
exit
interface f0/1.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.25 255.255.255.252
no shutdown
ip ospf cost 1
exit

router ospf 10 vrf EMPRESA_A


redistribute static metric 20 subnets
default-information originate
network 20.20.20.20 0.0.0.3 area 0
network 20.20.20.36 0.0.0.3 area 0
network 20.20.20.24 0.0.0.3 area 0
exit
router ospf 20 vrf EMPRESA_B
redistribute static metric 20 subnets
default-information originate
network 30.30.30.20 0.0.0.3 area 0
network 30.30.30.36 0.0.0.3 area 0
network 30.30.30.24 0.0.0.3 area 0
exit
exit
wr

---------------------------------R8---------------------------------
enable
configure terminal
ip vrf EMPRESA_A
rd 10:10
exit
ip vrf EMPRESA_B
rd 10:20
exit
interface f0/0
no shutdown
exit
interface f0/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.30 255.255.255.252
no shutdown
ip ospf cost 5
exit
interface f0/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.30 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f1/0
no shutdown
exit
interface f1/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.38 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f1/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.38 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f0/1
no shutdown
exit
interface f0/1.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.33 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f0/1.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.33 255.255.255.252
no shutdown
ip ospf cost 5
exit

router ospf 10 vrf EMPRESA_A


redistribute static metric 20 subnets
default-information originate
network 20.20.20.28 0.0.0.3 area 0
network 20.20.20.36 0.0.0.3 area 0
network 20.20.20.32 0.0.0.3 area 0
exit
router ospf 20 vrf EMPRESA_B
redistribute static metric 20 subnets
default-information originate
network 30.30.30.28 0.0.0.3 area 0
network 30.30.30.36 0.0.0.3 area 0
network 30.30.30.32 0.0.0.3 area 0
exit
exit
wr

---------------------------------R4---------------------------------
enable
configure terminal
ip vrf EMPRESA_A
rd 10:10
exit
ip vrf EMPRESA_B
rd 10:20
exit
interface f0/0
ip vrf forwarding EMPRESA_A
ip address 20.20.20.9 255.255.255.252
no shutdown
exit
interface f0/1
ip vrf forwarding EMPRESA_B
ip address 30.30.30.9 255.255.255.252
no shutdown
exit
interface f1/0
no shutdown
exit
interface f1/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.26 255.255.255.252
no shutdown
ip ospf cost 5
exit
interface f1/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.26 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f2/0
no shutdown
exit
interface f2/0.10
ip vrf forwarding EMPRESA_A
encapsulation dot1q 10
ip address 20.20.20.34 255.255.255.252
no shutdown
ip ospf cost 1
exit
interface f2/0.20
ip vrf forwarding EMPRESA_B
encapsulation dot1q 20
ip address 30.30.30.34 255.255.255.252
no shutdown
ip ospf cost 5
exit

ip route vrf EMPRESA_A 210.16.2.0 255.255.255.0 20.20.20.10


ip route vrf EMPRESA_B 210.30.2.0 255.255.255.0 30.30.30.10

router ospf 10 vrf EMPRESA_A


redistribute static metric 20 subnets
default-information originate
network 20.20.20.8 0.0.0.3 area 0
network 20.20.20.24 0.0.0.3 area 0
network 20.20.20.32 0.0.0.3 area 0
exit
router ospf 20 vrf EMPRESA_B
redistribute static metric 20 subnets
default-information originate
network 30.30.30.8 0.0.0.3 area 0
network 30.30.30.24 0.0.0.3 area 0
network 30.30.30.32 0.0.0.3 area 0
exit
exit
wr

---------------------------------R5---------------------------------
enable
configure terminal
interface f0/1
ip address 210.16.2.1 255.255.255.0
no shutdown
exit
interface f0/0
ip address 20.20.20.10 255.255.255.252
no shutdown
exit
ip route 0.0.0.0 0.0.0.0 20.20.20.9
exit
wr

---------------------------------R6---------------------------------
enable
configure terminal
interface f0/0
ip address 210.30.2.1 255.255.255.0
no shutdown
exit
interface f0/1
ip address 30.30.30.10 255.255.255.252
no shutdown
exit

https://networklessons.com/ipv6/ospfv2-vs-ospfv3
https://tools.ietf.org/html/rfc5340#appendix-A.2
https://www.w0lff4ng.org/mensajes-ospf/

ip route 0.0.0.0 0.0.0.0 30.30.30.9


exit
wr

Das könnte Ihnen auch gefallen