当前位置:网站首页>实验。。。。
实验。。。。
2022-08-01 09:16: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 VPN到私网路由器上
连接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上要在vpn空间里写静态 并在BGP里进行双向重发布,使R2学习到R1路由通过标签传递给R4的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
R5手写到分公司R1的静态:
[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
边栏推荐
- 解析MySQL数据库:“SQL优化”与“索引优化”
- Gethostbyname \ getaddrinfo DNS domain name IP address is not safe
- USB Protocol (2) Terminology
- net stop/start mysql80 拒绝访问
- 372. 超级次方
- Ogg synchronizes oracle to mysql, there may be characters that need to be escaped in the field, how to configure escape?
- Leicester Weekly 304 6135. The longest ring in the picture Inward base ring tree
- 报告:想学AI的学生数量已涨200%,老师都不够用了
- [Tear AHB-APB Bridge by hand]~ Why aren't the lower two bits of the AHB address bus used to represent the address?
- PerViT: 神经网络也能像人类利用外围视觉一样观察图像!
猜你喜欢
随机推荐
改版去不图床 Token 的获取
UXDB如何返回当前数据库所有表的记录数?
正则表达式符号
Install GBase 8 c database, the error shows "Resource, how to solve?
leetcode 42. Catch the rain
Redis学习
Manual upgrade and optimization tutorial of Lsky Pro Enterprise Edition
Shell executes SQL to send emails
STM32个人笔记-嵌入式C语言优化
leetcode-6134:找到离给定两个节点最近的节点
Pod environment variables and initContainer
【无标题】
leetcode-6132: Make all elements in array equal to zero
【编程之外】当遮羞布被掀开,当人们开始接受一切
What do the values 1, 2, and 3 in nodetype mean?
XX市消防救援指挥中心实战指挥平台多链路聚合解决方案实例
热修复技术可谓是百花齐放
Microsoft Azure & NVIDIA IoT developers season I | Azure IoT & NVIDIA Jetson development foundation
The socket option
毕业论文写作技巧








