当前位置:网站首页>experiment....
experiment....
2022-08-01 09:26:00 【YkyJkybFjj】
ISP部分配置ospf公网互通,再起bgp
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0
[R2]bgp 1
[R2-bgp]peer 4.4.4.4 as-number 1
[R2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R4]bgp 1
[R4-bgp]peer 2.2.2.2 as-number 1
[R4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
搭建MPLS
[R2]mpls lsr-id 2.2.2.2
[R2]mpls
[R2-mpls]mpls ldp
[R2-mpls-ldp]q
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]mpls
[R2-GigabitEthernet0/0/1]mpls ldp
[R3]mpls lsr-id 3.3.3.3
[R3]mpls
[R3-mpls]mpls ldp
[R3-mpls-ldp]q
[R3]interface g0/0/0
[R3-GigabitEthernet0/0/0]mpls
[R3-GigabitEthernet0/0/0]mpls ldp
[R3-GigabitEthernet0/0/0]q
[R3]interface g0/0/1
[R3-GigabitEthernet0/0/1]mpls ld
[R3-GigabitEthernet0/0/1]mpls ldp
[R4]mpls lsr-id 4.4.4.4
[R4]mpls
[R4-mpls]mpls ldp
[R4-mpls-ldp]q
[R4]interface g0/0/0
[R4-GigabitEthernet0/0/0]mpls
[R4-GigabitEthernet0/0/0]mpls ldp
配置MPLS VPNto the private network router
连接R1接口
[r2]ip vpn-instance a 创建名为a的vrf空间
[r2-vpn-instance-a]ipv4-family 进入IPV4的配置模式下
[r2-vpn-instance-a-af-ipv4]route-distinguisher 1:1 RD值
[r2-vpn-instance-a-af-ipv4]vpn-target 1:1 RT值 必须对端的PE端一致
[r2]interface GigabitEthernet 0/0/0 进入链接CE端的接口
[r2-GigabitEthernet0/0/0]ip binding vpn-instance a 关联到vrf空间
[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24 配置私有ip地址
连接R5接口
[R4]ip vpn-instance a
[R4-vpn-instance-a]ipv4-family
[R4-vpn-instance-a-af-ipv4]route-distinguisher 1:1
[R4-vpn-instance-a-af-ipv4]vpn-target 1:1
[R4-vpn-instance-a-af-ipv4]q
[R4-vpn-instance-a]q
[R4]interface g0/0/1
[R4-GigabitEthernet0/0/1]ip binding vpn-instance a
[R4-GigabitEthernet0/0/1]ip address 192.168.3.2 24
连接R6接口:
[R2]ip vpn-instance b
[R2-vpn-instance-b]ipv
[R2-vpn-instance-b]ipv4-family
[R2-vpn-instance-b-af-ipv4]route-distinguisher 2:2
[R2-vpn-instance-b-af-ipv4]vpn-target 2:2
[R2-vpn-instance-b-af-ipv4]q
[R2-vpn-instance-b]q
[R2]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]ip binding vpn-instance b
[R2-GigabitEthernet0/0/2]ip address 192.168.2.2 24
连接R7接口
[R4]ip vpn-instance b
[R4-vpn-instance-b]ipv4-family
[R4-vpn-instance-b-af-ipv4]route-distinguisher 2:2
[R4-vpn-instance-b-af-ipv4]vpn-target 2:2
[R4-vpn-instance-b-af-ipv4]q
[R4-vpn-instance-b]q
[R4]interface g0/0/2
[R4-GigabitEthernet0/0/2]ip binding vpn-instance b
[R4-GigabitEthernet0/0/2]ip address 192.168.3.1 24
建立 MP-BGP邻居关系
[R2]bgp 1
[R2-bgp]router-id 2.2.2.2
[R2-bgp]pe 4.4.4.4 as-number 1
[R2-bgp]peer 4.4.4.4 next-hop-local
[R2-bgp]ipv4-family vpnv4
[R2-bgp-af-vpnv4]peer 4.4.4.4 enable
[R4]bgp 1
[R4-bgp]p
[R4-bgp]preference
[R4-bgp]pe2.2.2.2 as-number 1
[R4-bgp]peer 2.2.2.2 next-hop-local
[R4-bgp]ipv4-family vpnv4
[R4-bgp-af-vpnv4]peer 2.2.2.2 enable
交换路由 PE - CE端
R2上要在vpnwrite static in space 并在BGPRepublish in both directions,使R2学习到R1Routes are passed to via labelsR4的vpn空间,实际传给了R5
[R2]ip route-static vpn-instance a 192.168.1.0 24 192.168.2.1
[R2]ip route-static vpn-instance a 192.168.2.0 24 192.168.2.1
[R2]bgp 1
[R2-bgp]ipv4 vpn-instance a
[R2-bgp-a]import-route direct
[R2-bgp-a]import-route static
R4和R5
R5Handwritten to branch officeR1的静态:
[R5]ip route-static 192.168.1.0 24 192.168.3.2
[R5]ip route-static 192.168.2.0 24 192.168.3.2
[R4]ip route-static vpn-instance a 192.168.3.0 24 192.168.3.1
[R4]ip route-static vpn-instance a 192.168.4.0 24 192.168.3.1
[R4]bgp 1
[R4-bgp]ipv4 vpn-instance a
[R4-bgp-a]import-route direct
[R4-bgp-a]import-route static
R6与R2之间:R6上使用rip宣告自己的环回和网段
[R6]rip 1
[R6-rip-1]version 2
[R6-rip-1]undo summary
[R6-rip-1]network 192.168.1.0
[R6-rip-1]network 192.168.2.0
R2
[R2]rip
[R2]rip 1 vpn-instance b 在VPN空间上起rip
[R2-rip-1]version 2
[R2-rip-1]undo summary
[R2-rip-1]network 192.168.2.0 进行双向重发布
[R2]rip 1 vpn-instance b
[R2-rip-1]import-route bgp
[R2-rip-1]q
[R2]bgp 1
[R2-bgp]import-route rip 1
R7
使用ospf宣告环回和网段
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 192.168.3.2 0.0.0.0
[r7-ospf-1-area-0.0.0.0]network 192.168.4.2 0.0.0.0
R4
[R4]bgp 1
[R4-bgp]ipv4-family vpn-instance b
[R4-bgp-b]import-route ospf 2
[R4-bgp-b]q
[R4-bgp]q
[R4]ospf 2 vpn
[R4]ospf 2 vpn-instance b
[R4-ospf-2]import-route bgp
边栏推荐
- Holoview--Introduction
- 杨辉三角(c语言实现)
- TiDB的真实数据库数据是存在kv和还是pd上?
- leetcode-6132:使数组中所有元素都等于零
- SAP ABAP ALV+SMARTFORS 表分页 报表打印程序
- Optimal dazzle Oracle database support what kinds of type of the time and date
- HoloView 在 jyputer lab/notebook 不显示总结
- Redis learning
- 基于tika实现对文件类型进行判断
- Manual upgrade and optimization tutorial of Lsky Pro Enterprise Edition
猜你喜欢
随机推荐
In the background of the GBase 8c database, what command is used to perform the master-slave switchover operation for the gtm and dn nodes
GBase 8s 锁分类
node 格式化时间的传统做法与高级做法(moment)
巧妙利用unbuffer实时写入
leetcode-6134: Find the closest node to the given two nodes
实验。。。。
HoloView--Customization
Gethostbyname \ getaddrinfo DNS domain name IP address is not safe
毕业论文写作技巧
【数据集】各类绝缘子、鸟巢及防震锤数据集汇总
基于tika实现对文件类型进行判断
解析MySQL数据库:“SQL优化”与“索引优化”
CTO强烈禁止使用Calendar,那用啥?
What do the values 1, 2, and 3 in nodetype mean?
微服务:事务管理
Introduction to ADAS
leetcode-6134:找到离给定两个节点最近的节点
How to get page data
SkiaSharp's WPF self-painted five-ring bouncing ball (case version)
Explain / Desc 执行计划分析