Isolate all divisions of the company: Virtual Router (OSPF)

Source: Internet
Author: User
Tags exit log range

Topology:

R4 configuration:

IP VRF Retail
Rd 1:1
!
IP VRF Trading
Rd 2:2
!
Interface Loopback0
IP address 4.4.4.4 255.255.255.255
!
Interface Loopback1
IP VRF Forwarding Trading
IP address 20.1.1.4 255.255.255.0
IP OSPF network point-to-point
!
Interface fastethernet0/0
IP VRF Forwarding Retail
IP address 10.1.1.4 255.255.255.0
Duplex Auto
Speed auto
!
Interface FASTETHERNET0/1
No IP address
Duplex Auto
Speed auto
!
Interface fastethernet0/1.100
Encapsulation dot1q 100
IP VRF Forwarding Retail
IP address 192.168.14.4 255.255.255.0
!
Interface fastethernet0/1.200
Encapsulation dot1q 200
IP VRF Forwarding Trading
IP address 172.16.14.4 255.255.255.0
!
Router OSPF VRF Retail
Log-adjacency-changes
Network 10.1.1.0 0.0.0.255 Area 0
Network 192.168.14.0 0.0.0.255 Area 0
!
Router OSPF VRF Trading
Log-adjacency-changes
Network 20.1.1.0 0.0.0.255 Area 0
Network 172.16.14.0 0.0.0.255 Area 0

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Network/lyjs/

R5 configuration:

IP VRF Retail
Rd 1:1
!
IP VRF Trading
Rd 2:2
!
Interface Loopback0
IP address 5.5.5.5 255.255.255.255
!
Interface Loopback1
IP VRF Forwarding Trading
IP address 40.1.1.5 255.255.255.0
IP OSPF network point-to-point
!
Interface fastethernet0/0
No IP address
Duplex Auto
Speed auto
!
Interface fastethernet0/0.100
Encapsulation dot1q 100
IP VRF Forwarding Retail
IP address 192.168.35.5 255.255.255.0
!
Interface fastethernet0/0.200
Encapsulation dot1q 200
IP VRF Forwarding Trading
IP address 172.16.35.5 255.255.255.0
!
Interface FASTETHERNET0/1
IP VRF Forwarding Retail
IP address 30.1.1.5 255.255.255.0
Duplex Auto
Speed auto
!
Router OSPF VRF Retail
Log-adjacency-changes
Network 30.1.1.0 0.0.0.255 Area 0
Network 192.168.35.0 0.0.0.255 Area 0
!
Router OSPF VRF Trading
Log-adjacency-changes
Network 40.1.1.0 0.0.0.255 Area 0
Network 172.16.35.0 0.0.0.255 Area 0

R1 configuration:

IP VRF Retail
Rd 100:100
Route-target Export 100:100
Route-target Import 100:100
!
IP VRF Trading
Rd 100:200
Route-target Export 100:200
Route-target Import 100:200
!
MPLS Label Range 100 199
MPLS Label Protocol LDP
!
Interface Loopback0
IP Address 1.1.1.1 255.255.255.255
!
Interface fastethernet0/0
IP address 12.1.1.1 255.255.255.0
Duplex Auto
Speed auto
MPLS IP
!
Interface FASTETHERNET0/1
No IP address
Duplex Auto
Speed auto
!
Interface fastethernet0/1.100
Encapsulation dot1q 100
IP VRF Forwarding Retail
IP address 192.168.14.1 255.255.255.0
!
Interface fastethernet0/1.200
Encapsulation dot1q 200
IP VRF Forwarding Trading
IP address 172.16.14.1 255.255.255.0
!
Router OSPF VRF Retail
Log-adjacency-changes
Redistribute BGP subnets
Network 192.168.14.0 0.0.0.255 Area 0
!
Router OSPF 210 VRF Trading
Log-adjacency-changes
Redistribute BGP subnets
Network 172.16.14.0 0.0.0.255 Area 0
!
router OSPF 100
Router-id 1.1.1.1
Log-adjacency-changes
Network 1.1.1.1 0.0.0.0 Area 0
Network 12.1.1.0 0.0.0.255 Area 0
!
Router BGP 100
BGP Router-id 1.1.1.1
No BGP default Ipv4-unicast
BGP log-neighbor-changes
Neighbor 3.3.3.3 Remote-as 100
Neighbor 3.3.3.3 Update-source Loopback0
!
Address-family vpnv4
Neighbor 3.3.3.3 Activate
Neighbor 3.3.3.3 Send-community Extended
Exit-address-family
!
address-family IPv4 VRF Trading
Redistribute OSPF 210 VRF Trading Match internal external 1 external 2 nssa-external 1 nssa-external 2
No synchronization
Exit-address-family
!
address-family IPv4 VRF Retail
Redistribute OSPF VRF Retail match internal external 1 external 2 nssa-external 1 nssa-external 2
No synchronization
Exit-address-family
!
MPLS LDP Router-id Loopback0

R2 configuration:

MPLS Label Range 200 299
MPLS Label Protocol LDP
Interface Loopback0
IP address 2.2.2.2 255.255.255.255
!
Interface fastethernet0/0
IP address 12.1.1.2 255.255.255.0
Duplex Auto
Speed auto
MPLS IP
!
Interface FASTETHERNET0/1
IP address 23.1.1.2 255.255.255.0
Duplex Auto
Speed auto
MPLS IP
!
router OSPF 100
Router-id 2.2.2.2
Log-adjacency-changes
Network 2.2.2.2 0.0.0.0 Area 0
Network 12.1.1.0 0.0.0.255 Area 0
Network 23.1.1.0 0.0.0.255 Area 0
!
MPLS LDP Router-id Loopback0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.