vpn实验

实验配置: (纯命令)

 R1:

interface Loopback0

 ip ospf 1 area 0

interface Ethernet0/0

 ip ospf 1 area 0

 mpls ip

router ospf 100

 router-id 1.1.1.1

ip vrf R5

interface Ethernet0/1

 ip vrf forwarding R5

 ip address 15.1.1.1 255.255.255.0

ip vrf R5

 rd 65001:5

 route-target export 5:5

 route-target import 6:6

ip vrf R9

interface Ethernet0/2

 ip vrf forwarding R9

 ip address 19.1.1.1 255.255.255.0

ip vrf R9

rd 65003:9

 route-target export 9:9

 route-target import 10:10

router bgp 100

 bgp router-id 1.1.1.1

 no bgp default ipv4-unicast

 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

  neighbor 3.3.3.3 next-hop-self

 address-family ipv4 vrf R5

  neighbor 15.1.1.5 remote-as 65001

  neighbor 15.1.1.5 activate

 address-family ipv4 vrf R9

  neighbor 19.1.1.9 remote-as 65003

  neighbor 19.1.1.9 activate

 ip cef

mpls label protocol ldp

mpls ldp router-id Loopback0

R2:

interface Loopback0

 ip ospf 1 area 0

interface Ethernet0/0

 ip ospf 1 area 0

 mpls ip

interface Ethernet0/1

 ip address 23.1.1.2 255.255.255.0

 ip ospf 1 area 0

 mpls ip

router ospf 100

 router-id 2.2.2.2

ip cef

mpls label protocol ldp      

mpls ldp router-id Loopback0

R3:

interface Loopback0

 ip ospf 100 area 0

interface Ethernet0/0

 ip ospf 100 area 0

 mpls ip

router ospf 100

 router-id 3.3.3.3

ip vrf R10

interface Ethernet0/2

 ip vrf forwarding R10

 ip address 103.1.1.3 255.255.255.0

 ip vrf R10

rd 65004:10

 route-target export 10:10

 route-target import 9:9

ip vrf R6

interface Ethernet0/1

 ip vrf forwarding R6

 ip address 36.1.1.3 255.255.255.0

ip vrf R6

 rd 65002:6

 route-target export 6:6

 route-target import 5:5

router bgp 100

 bgp router-id 3.3.3.3

 no bgp default ipv4-unicast

 neighbor 1.1.1.1 remote-as 100

 neighbor 1.1.1.1 update-source Loopback0

 address-family vpnv4

  neighbor 1.1.1.1 activate

  neighbor 1.1.1.1 send-community extended

  neighbor 1.1.1.1 next-hop-self

 address-family ipv4 vrf R10

  neighbor 103.1.1.10 remote-as 65004

  neighbor 103.1.1.10 activate

 address-family ipv4 vrf R6

  neighbor 36.1.1.6 remote-as 65002

  neighbor 36.1.1.6 activate

ip cef

mpls label protocol ldp

mpls ldp router-id Loopback0

R4:

interface Loopback0

 ip address 10.0.2.4 255.255.255.0

interface Ethernet0/0

 ip address 10.0.0.4 255.255.255.0

router eigrp 100

 network 10.0.0.4 0.0.0.0

 network 10.0.2.4 0.0.0.0

R5:

router eigrp 100

 network 10.0.0.5 0.0.0.0

 redistribute bgp 65001 metric 1000 100 255 1 1500

router bgp 65001

 bgp router-id 5.5.5.5

 no bgp default ipv4-unicast

 neighbor 15.1.1.1 remote-as 100

 address-family ipv4

  redistribute eigrp 100

  neighbor 15.1.1.1 activate

R6:

router eigrp 100

 network 10.0.1.6 0.0.0.0

 redistribute bgp 65002 metric 1000 100 255 1 1500

router bgp 65002

 bgp router-id 6.6.6.6

 no bgp default ipv4-unicast

 neighbor 36.1.1.3 remote-as 100

 address-family ipv4

  redistribute eigrp 100

  neighbor 36.1.1.3 activate

R7:

router eigrp 100

 network 10.0.1.7 0.0.0.0

 network 10.0.3.7 0.0.0.0

R8:

router eigrp 100

 network 10.0.0.8 0.0.0.0

 network 10.0.2.8 0.0.0.0

R9

router eigrp 100

 network 10.0.0.9 0.0.0.0

 redistribute bgp 65003 metric 1000 100 255 1 1500

router bgp 65003

 bgp router-id 9.9.9.9

 no bgp default ipv4-unicast

 neighbor 19.1.1.1 remote-as 100

 address-family ipv4

  redistribute eigrp 100

  neighbor 19.1.1.1 activate

R10:

router eigrp 100

 network 10.0.1.10 0.0.0.0

 redistribute bgp 65004 metric 1000 100 255 1 1500

router bgp 65004

 bgp router-id 10.10.10.10

 no bgp default ipv4-unicast

 neighbor 103.1.1.3 remote-as 100

 address-family ipv4

  redistribute eigrp 100

  neighbor 103.1.1.3 activate

R11:

router eigrp 100

 network 10.0.1.11 0.0.0.0

 network 10.0.3.11 0.0.0.0

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值