欢迎您访问我爱IT技术网,今天小编为你分享的电脑教程是网络协议方面的经验知识教程:MPLS/VPN实验一:OSPF/STATIC,下面是详细的分享!
MPLS/VPN实验一:OSPF/STATIC
MPLS/VPN实验一:OSPF/STATIC
有关一些MPLS 其中的术语在这里就不作解释了,直接跳到实验部分。
在 pe-p-p 之间用到的IGP协议是OSPF,而在CE-PE之间用到的协议是静态.
网络拓扑图如下所示:

按此图作好基本配置如下所示:
ce1: int l0 1.1.1.1/32
f0/0 192.168.1.1 255.255.255.252
pe1: int 0 2.2.2.2/32
f0/0 192.168.1.2/30
f0/1 10.1.1.1/30
p: int l0 3.3.3.3/32
f0/1 10.1.1.2/30
f0/0 10.1.1.5/30
pe2: int l0 4.4.4.4/32
f0/0 10.1.1.6/30
f0/1 192.168.2.1/30
ce2: int l0 5.5.5.5/32
f0/1 192.168.2.2/30
在MPLS区域上启动MPLS 协议:
例:
int f0/1
mpls lap pro ldp
mpls ldp
在这之前是需要是启动CEF,其实也就是需要借助于FIB.
查看邻居关系是否建立起来了,show mpls ldp nei 或者是用命令:show mpls ldp dis det
PE1#sh mpls ldp neighbor
Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0
TCP connection: 3.3.3.3.60098 - 2.2.2.2.646
State: Oper; Msgs sent/rcvd: 45/43; Downstream
Up time: 00:30:01
LDP discovery sources:
FastEthernet0/1, Src IP addr: 10.1.1.2
Addresses bound to peer LDP Ident:
10.1.1.5 10.1.1.2 3.3.3.3
PE1#sh mpls ldp discovery detail
Local LDP Identifier:
2.2.2.2:0
Discovery Sources:
Interfaces:
FastEthernet0/1 (ldp): xmit/recv
Enabled: Interface config
Hello interval: 5000 ms; Transport IP addr: 2.2.2.2
LDP Id: 3.3.3.3:0
Src IP addr: 10.1.1.2; Transport IP addr: 3.3.3.3
Hold time: 15 sec; Proposed local/peer: 15/15 sec
Reachable via 3.3.3.3/32
Password: not required, none, in use
Clients: IPv4, mLDP
进行测试:
PE1#traceroute 4.4.4.4
Type escape sequence to abort.
Tracing the route to 4.4.4.4
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.1.2 [MPLS: Label 17 Exp 0] 40 msec 88 msec 36 msec
2 10.1.1.6 148 msec * 84 msec
成功/
在CE上配置静态路由;
CE1#sh run | in ip route
ip route 0.0.0.0 0.0.0.0 192.168.1.2
CE1#
在这里配置的是默认路由;
在PE1上配置VRF:
ip vrf vpn
rd 100:1
route-target export 100:1
route-target import 100:1
PE1#sh run | in ip route vrf
ip route vrf vpn 1.1.1.1 255.255.255.255 192.168.1.1
!
interface FastEthernet0/0
ip vrf forwarding vpn
ip address 192.168.1.2 255.255.255.252
在PE1上配置MP-IBGP
PE1#sh run | be router bgp
router bgp 100
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback0
!
address-family ipv4
neighbor 4.4.4.4 activate
exit-address-family
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf vpn
network 192.168.1.0 mask 255.255.255.252
redistribute static metric 1
exit-address-family
在PE2也作类似配置。
查看学习到的路由信息:
PE1#sh ip bgp vpnv4 all
BGP table version is 7, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1 (default for vrf vpn)
*> 1.1.1.1/32 192.168.1.1 1 32768 ?
*>i 5.5.5.5/32 4.4.4.4 1 100 0 ?
*> 192.168.1.0/30 0.0.0.0 0 32768 i
*>i 192.168.2.0/30 4.4.4.4 0 100 0 i
PE1#sh ip route vrf vpn
Routing Table: vpn
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 [1/0] via 192.168.1.1
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [200/1] via 4.4.4.4, 00:19:01
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, FastEthernet0/0
L 192.168.1.2/32 is directly connected, FastEthernet0/0
192.168.2.0/30 is subnetted, 1 subnets
B 192.168.2.0 [200/0] via 4.4.4.4, 00:19:21
在CE1上查看路由信息:
CE1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.1.2
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/30 is directly connected, FastEthernet0/0
L 192.168.1.1/32 is directly connected, FastEthernet0/0
CE1#ping 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max=108/136/160 ms
CE1#tr
CE1#traceroute 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.1.2 64 msec 80 msec 64 msec
2 10.1.1.2 [MPLS: Labels 17/22 Exp 0] 132 msec 112 msec 88 msec
3 192.168.2.1 [MPLS: Label 22 Exp 0] 108 msec 68 msec 84 msec
4 192.168.2.2 136 msec * 148 msec
CE1#
以上就是关于MPLS/VPN实验一:OSPF/STATIC的网络协议知识分享,更多电脑教程请移步到>>电脑教程。
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
