Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3383543
  • 博文数量: 631
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8397
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35
文章分类

全部博文(631)

文章存档

2020年(2)

2019年(22)

2018年(4)

2017年(37)

2016年(22)

2015年(1)

2013年(12)

2012年(20)

2011年(19)

2010年(20)

2009年(282)

2008年(190)

分类: 系统运维

2008-05-23 21:01:27

MPLS实验一[基础MPLS]


• 根据上图构建逻辑拓扑
• 在R1,R2,R3和R4之间配置OSPF区域0
• 在R1,R2,R3和R4之间的接口上使用LDP配置MPLS
• 在R3上创建环回150.1.3.3/32并通告进OSPF
• 在R4上创建环回150.1.4.4/32并通告进OSPF
• R3和R4在AS1内使用环回接口建立对等关系
• R3 和SW1通过EBGP建立对等关系
• R4 和R5 通过 EBGP建立对等关系
• 在R5上创建环回接口10.1.5.5/24 并通告进BGP
• 在SW1上创建环回口 10.1.7.7/24 并通告进BGP

R1#
ip cef
!
mpls label protocol ldp
!
interface FastEthernet0/0
ip address 150.1.12.1 255.255.255.0
tag-switching ip
!
interface Serial0/1
ip address 150.1.13.1 255.255.255.0
tag-switching ip
!
router ospf 1
network 150.1.12.1 0.0.0.0 area 0
network 150.1.13.1 0.0.0.0 area 0

R2#
ip cef
!
mpls label protocol ldp
!
interface FastEthernet0/0
ip address 150.1.12.2 255.255.255.0
tag-switching ip
!
interface Serial0/0
encapsulation frame-relay
!
interface Serial0/0.1 point-to-point
ip address 150.1.24.2 255.255.255.0
tag-switching ip
frame-relay interface-dlci 204
!
router ospf 1
network 150.1.12.2 0.0.0.0 area 0
network 150.1.24.2 0.0.0.0 area 0

R3#
ip cef
!
mpls label protocol ldp
!
interface Loopback0
ip address 150.1.3.3 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.37.3 255.255.255.0
!
interface Serial1/2
ip address 150.1.13.3 255.255.255.0
tag-switching ip
clockrate 64000
!
router ospf 1
network 150.1.3.3 0.0.0.0 area 0
network 150.1.13.3 0.0.0.0 area 0
!
router bgp 1
neighbor 10.1.37.7 remote-as 100
neighbor 150.1.4.4 remote-as 1
neighbor 150.1.4.4 update-source Loopback0
neighbor 150.1.4.4 next-hop-self

R4#
ip cef
!
mpls label protocol ldp
!
interface Loopback0
ip address 150.1.4.4 255.255.255.255
!
interface Serial0/0
encapsulation frame-relay
!
interface Serial0/0.1 point-to-point
ip address 150.1.24.4 255.255.255.0
tag-switching ip
frame-relay interface-dlci 402
!
interface Ethernet0/1
ip address 10.1.45.4 255.255.255.0
!
router ospf 1
network 150.1.4.4 0.0.0.0 area 0
network 150.1.24.4 0.0.0.0 area 0
!
router bgp 1
neighbor 10.1.45.5 remote-as 200
neighbor 150.1.3.3 remote-as 1
neighbor 150.1.3.3 update-source Loopback0
neighbor 150.1.3.3 next-hop-self
no auto-summary

R5#
interface Loopback0
ip address 10.1.5.5 255.255.255.0
!
interface Ethernet0/0
ip address 10.1.45.5 255.255.255.0
!
router bgp 200
network 10.1.5.0 mask 255.255.255.0
neighbor 10.1.45.4 remote-as 1
SW1#
interface Loopback0
ip address 10.1.7.7 255.255.255.0
!
interface FastEthernet0/1
switchport access vlan 12
!
interface FastEthernet0/2
switchport access vlan 12
!
interface FastEthernet0/3
no switchport
ip address 10.1.37.7 255.255.255.0
!
interface FastEthernet0/5
switchport access vlan 45
!
router bgp 100
network 10.1.7.0 mask 255.255.255.0
neighbor 10.1.37.3 remote-as 1

SW2#
interface FastEthernet0/4
switchport access vlan 45

验证:
SW1#ping 10.1.5.5 source 10.1.7.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.5.5, timeout is 2 seconds:
Packet sent with a source address of 10.1.7.7
!!!!!
Success rate is 100 percent (5/5)
, round-trip min/avg/max = 88/88/92 ms

R1#show ip route

150.1.0.0/16 is variably subnetted, 5 subnets, 2 masks
O 150.1.24.0/24 [110/65] via 150.1.12.2, 00:11:41, FastEthernet0/0
O 150.1.4.4/32 [110/66] via 150.1.12.2, 00:11:41, FastEthernet0/0
O 150.1.3.3/32 [110/65] via 150.1.13.3, 00:11:41, Serial0/1
C 150.1.13.0/24 is directly connected, Serial0/1
C 150.1.12.0/24 is directly connected, FastEthernet0/0
R2#show ip route

150.1.0.0/16 is variably subnetted, 5 subnets, 2 masks
C 150.1.24.0/24 is directly connected, Serial0/0.1
O 150.1.4.4/32 [110/65] via 150.1.24.4, 00:12:01, Serial0/0.1
O 150.1.3.3/32 [110/66] via 150.1.12.1, 00:12:01, FastEthernet0/0
O 150.1.13.0/24 [110/65] via 150.1.12.1, 00:12:01, FastEthernet0/0
C 150.1.12.0/24 is directly connected, FastEthernet0/0
R3#show ip route

10.0.0.0/24 is subnetted, 3 subnets
B 10.1.7.0 [20/0] via 10.1.37.7, 00:10:18
B 10.1.5.0 [200/0] via 150.1.4.4, 00:10:35
C 10.1.37.0 is directly connected, Ethernet0/0
150.1.0.0/16 is variably subnetted, 5 subnets, 2 masks
O 150.1.24.0/24 [110/846] via 150.1.13.1, 00:12:29, Serial1/2
O 150.1.4.4/32 [110/847] via 150.1.13.1, 00:12:29, Serial1/2
C 150.1.3.3/32 is directly connected, Loopback0
C 150.1.13.0/24 is directly connected, Serial1/2
O 150.1.12.0/24 [110/782] via 150.1.13.1, 00:12:29, Serial1/2
R4#show ip route

10.0.0.0/24 is subnetted, 3 subnets
B 10.1.7.0 [200/0] via 150.1.3.3, 00:10:36
B 10.1.5.0 [20/0] via 10.1.45.5, 00:10:58
C 10.1.45.0 is directly connected, Ethernet0/1
150.1.0.0/16 is variably subnetted, 5 subnets, 2 masks
C 150.1.24.0/24 is directly connected, Serial0/0.1
C 150.1.4.4/32 is directly connected, Loopback0
O 150.1.3.3/32 [110/130] via 150.1.24.2, 00:12:49, Serial0/0.1
O 150.1.13.0/24 [110/129] via 150.1.24.2, 00:12:49, Serial0/0.1
O 150.1.12.0/24 [110/65] via 150.1.24.2, 00:12:49, Serial0/0.1
R5#show ip route

10.0.0.0/24 is subnetted, 3 subnets
B 10.1.7.0 [20/0] via 10.1.45.4, 00:10:49
C 10.1.5.0 is directly connected, Loopback0
C 10.1.45.0 is directly connected, Ethernet0/0
SW1#show ip route

10.0.0.0/24 is subnetted, 3 subnets
C 10.1.7.0 is directly connected, Loopback0
B 10.1.5.0 [20/0] via 10.1.37.3, 00:11:14
C 10.1.37.0 is directly connected, FastEthernet0/3

R1#show mpls ldp neighbor
Peer LDP Ident: 150.1.24.2:0; Local LDP Ident 150.1.13.1:0
TCP connection: 150.1.24.2.11005 - 150.1.13.1.646
State: Oper; Msgs sent/rcvd: 12/12; Downstream
Up time: 00:03:53
LDP discovery sources:
FastEthernet0/0, Src IP addr: 150.1.12.2
Addresses bound to peer LDP Ident:
150.1.12.2 150.1.24.2
Peer LDP Ident: 150.1.3.3:0; Local LDP Ident 150.1.13.1:0
TCP connection: 150.1.3.3.646 - 150.1.13.1.11003
State: Oper; Msgs sent/rcvd: 10/11; Downstream
Up time: 00:02:43
LDP discovery sources:
Serial0/1, Src IP addr: 150.1.13.3
Addresses bound to peer LDP Ident:
10.1.37.3 150.1.13.3 150.1.3.3
R2#show mpls ldp neighbor
Peer LDP Ident: 150.1.13.1:0; Local LDP Ident 150.1.24.2:0
TCP connection: 150.1.13.1.646 - 150.1.24.2.11005
State: Oper; Msgs sent/rcvd: 12/12; Downstream
Up time: 00:04:09
LDP discovery sources:
FastEthernet0/0, Src IP addr: 150.1.12.1
Addresses bound to peer LDP Ident:
150.1.12.1 150.1.13.1
Peer LDP Ident: 150.1.4.4:0; Local LDP Ident 150.1.24.2:0
TCP connection: 150.1.4.4.646 - 150.1.24.2.11007
State: Oper; Msgs sent/rcvd: 11/12; Downstream
Up time: 00:03:04
LDP discovery sources:
Serial0/0.1, Src IP addr: 150.1.24.4
Addresses bound to peer LDP Ident:
150.1.24.4 10.1.45.4 150.1.4.4
R3#show mpls ldp neighbor
Peer LDP Ident: 150.1.13.1:0; Local LDP Ident 150.1.3.3:0
TCP connection: 150.1.13.1.11003 - 150.1.3.3.646
State: Oper; Msgs sent/rcvd: 12/11; Downstream
Up time: 00:03:31
LDP discovery sources:
Serial1/2, Src IP addr: 150.1.13.1
Addresses bound to peer LDP Ident:
150.1.12.1 150.1.13.1

R4#show mpls ldp neighbor
Peer LDP Ident: 150.1.24.2:0; Local LDP Ident 150.1.4.4:0
TCP connection: 150.1.24.2.11007 - 150.1.4.4.646
State: Oper; Msgs sent/rcvd: 13/12; Downstream
Up time: 00:03:54
LDP discovery sources:
Serial0/0.1, Src IP addr: 150.1.24.2
Addresses bound to peer LDP Ident:
150.1.12.2 150.1.24.2
R1#show mpls forwarding-table
Local          Outgoing           Prefix                       Bytes tag          Outgoing     Next Hop
tag              tag or VC            or Tunnel Id          switched           interface
16               Pop tag               150.1.24.0/24       0                         Fa0/0           150.1.12.2
17               16                         150.1.4.4/32         4318                  Fa0/0           150.1.12.2
18                Pop tag               150.1.3.3/32          753                   Se0/1            point2point
R2#show mpls forwarding-table
Local        Outgoing          Prefix                   Bytes tag       Outgoing         Next Hop
tag            tag or VC          or Tunnel Id        switched        interface
16             Pop tag             150.1.4.4/32        797                 Se0/0.1          point2point
17             18                       150.1.3.3/32        4318              Fa0/0               150.1.12.1
18              Pop tag             150.1.13.0/24       0                    Fa0/0                150.1.12.1
R3#show mpls forwarding-table
Local    Outgoing       Prefix                     Bytes tag         Outgoing          Next Hop
tag         tag or VC      or Tunnel Id          switched          interface
16          16                  150.1.24.0/24        0                       Se1/2               point2point
17          17                  150.1.4.4/32           0                      Se1/2                point2point
18          Pop tag         150.1.12.0/24        0                      Se1/2                point2point
R4#show mpls forwarding-table
Local Outgoing   Prefix                   Bytes tag       Outgoing         Next Hop
tag     tag or VC   or Tunnel Id        switched       interface
16     17               150.1.3.3/32         0                    Se0/0.1            point2point
17     18               150.1.13.0/24       0                    Se0/0.1            point2point
18     Pop tag      150.1.12.0/24      0                     Se0/0.1            point2point

阅读(1030) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~