小弟才疏学浅..把之前公司学到的一点东西拿出来献丑
以下是在pe router一定要有的设定
ip vrf aaa ---aaa就是客户名称
rd 1234:1 ---rd是mbgp在交换routing用的
route-target eXPort 1234:1
route-target import 1234:1
ip cef ---一定要下..不下打死不会通
interface FastEthernet1/0
ip address xxxx
full-duplex
tag-switching mtu 1530 ----接到p router一定要下此行..因为加了tag mtu 会变大
tag-switching ip ----让interface知道上面有跑加了tag 的封包
interface serial 0/0
ip address xxxx
ip vrf fowarding aaa ---上下车的interface要加上tag要打此行
--以下都是再定义mbgp..所有mpls的routing都是用mbgp交换的---
router bgp 1234
no synchronization
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor MPLS-PEER peer-group ---MPLS-PEER这个字符串是自订的名称
neighbor MPLS-PEER remote-as 1234
neighbor MPLS-PEER update-source Loopback0
neighbor MPLS-PEER activate
neighbor 1.1.1.1peer-group MPLS-PEER ....由于是要靠ibgp交换.所以要fully mesh...有几颗pe就要输入几颗pe的 ip
neighbor 2.2.2.2 peer-group MPLS-PEER
neighbor 3.3.3.3 peer-group MPLS-PEER
neighbor 4.4.4.4 peer-group MPLS-PEER
no auto-summary
address-family ipv4 vrf aaa
redistribute connected
redistribute static
no auto-summary
no synchronization
exit-address-family
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community extended
ip route vrf aaa 192.168.181.0 255.255.255.0 192.168.1.6 ---要下车的default route..在此范例中要往serial 0/0丢的才对
至于p router...上面跑的就只有ospf啦..