Configuring IBGP and EBGP Sessions, Local Preference and MED

简介:

wKioL1NY002gS80DAAEyGT8Y1PY044.jpg

ISP#show run 
Building configuration... 

Current configuration : 1476 bytes 

version 12.4 
service timestamps debug datetime msec 
service timestamps log datetime msec 
no service password-encryption 

hostname ISP 

boot-start-marker 
boot-end-marker 


no aaa new-model 


ip cef 
no ip domain lookup 

interface Loopback0 
ip address 192.168.100.1 255.255.255.0 

interface FastEthernet0/0 
no ip address 
shutdown 
duplex half 

interface Serial1/0 
ip address 192.168.1.5 255.255.255.252 
serial restart-delay 0 

interface Serial1/1 
ip address 192.168.1.1 255.255.255.252 
serial restart-delay 0 


router bgp 200 
no synchronization 
bgp log-neighbor-changes 
network 192.168.1.0 mask 255.255.255.252 
network 192.168.1.4 mask 255.255.255.252 
network 192.168.100.0 
neighbor 192.168.1.2 remote-as 64512 
neighbor 192.168.1.6 remote-as 64512 
no auto-summary 


no ip http server 
no ip http secure-server 

control-plane 

gatekeeper 
shutdown  


line con 0 
exec-timeout 0 0 
logging synchronous 
stopbits 1 
line aux 0 
stopbits 1 
line vty 0 4 


end 

Sanjose1# show run 
Building configuration... 

Current configuration : 1788 bytes 

version 12.4 
service timestamps debug datetime msec 
service timestamps log datetime msec 
no service password-encryption 

hostname Sanjose1 

boot-start-marker 
boot-end-marker 


no aaa new-model 


ip cef 
no ip domain lookup 

interface Loopback0 
ip address 172.16.64.1 255.255.255.0 

interface FastEthernet0/0 
no ip address 
shutdown 
duplex half 

interface Serial1/0 
ip address 192.168.1.6 255.255.255.252 
serial restart-delay 0 

interface Serial1/1 
ip address 172.16.1.1 255.255.255.0 
serial restart-delay 0 


router eigrp 64512 
network 172.16.0.0 
no auto-summary 

router bgp 64512 
no synchronization 
bgp log-neighbor-changes 
network 172.16.0.0 
neighbor 172.16.32.1 remote-as 64512 
neighbor 172.16.32.1 update-source Loopback0 
neighbor 172.16.32.1 next-hop-self 
neighbor 192.168.1.5 remote-as 200 
neighbor 192.168.1.5 route-map zhang in 
neighbor 192.168.1.5 route-map zhang-out out 
no auto-summary 

ip default-network 192.168.100.0               默认路由 
ip route 172.16.0.0 255.255.0.0 Null0          路由汇总到null0 

no ip http server 
no ip http secure-server 

route-map zhang-out permit 10 
set metric 50 

route-map zhang permit 10 
set local-preference 150 

control-plane 

gatekeeper 
shutdown 


line con 0 
exec-timeout 0 0 
logging synchronous 
stopbits 1 
line aux 0 
stopbits 1 
line vty 0 4 


end 


Sanjose2# show run 
Building configuration... 

Current configuration : 1749 bytes 

version 12.4 
service timestamps debug datetime msec 
service timestamps log datetime msec 
no service password-encryption 

hostname Sanjose2     路由器名 Sanjose2 

boot-start-marker 
boot-end-marker 


no aaa new-model 


ip cef 
no ip domain lookup 

interface Loopback0 
ip address 172.16.32.1 255.255.255.0 

interface FastEthernet0/0 
no ip address 
shutdown 
duplex half 

interface Serial1/0 
ip address 172.16.1.2 255.255.255.252 
serial restart-delay 0 

interface Serial1/1 
ip address 192.168.1.2 255.255.255.252 
serial restart-delay 0 


router eigrp 64512             配置eigrp 64512 
network 172.16.0.0 
no auto-summary 

router bgp 64512               启动bgp 64512 
no synchronization 
bgp log-neighbor-changes 
network 172.16.0.0 
neighbor 172.16.64.1 remote-as 64512               
neighbor 172.16.64.1 update-source Loopback0   更新源 lo0 
neighbor 172.16.64.1 next-hop-self 
neighbor 192.168.1.1 remote-as 200          
neighbor 192.168.1.1 route-map yun in         应用路由策略 
neighbor 192.168.1.1 route-map yun-out out    应用路由策略 
no auto-summary 

ip route 172.16.0.0 255.255.0.0 Null0         路由汇总到 null0 

no ip http server 
no ip http secure-server 

route-map yun-out permit 10                   路由策略 permit 10 
set metric 75                                设置metric值 75 

route-map yun permit 10 
set local-preference 125 

control-plane 


gatekeeper 
shutdown 


line con 0 
exec-timeout 0 0 
logging synchronous 
stopbits 1 
line aux 0 
stopbits 1 
line vty 0 4 
!          

end 


Sanjose2#show ip bgp 
BGP table version is 14, local router ID is 172.16.32.1 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
             r RIB-failure, S Stale 
Origin codes: i - IGP, e - EGP, ? - incomplete 

  Network          Next Hop            Metric LocPrf Weight Path 
*> 172.16.0.0       0.0.0.0                  0         32768 i 
* i                 172.16.64.1              0    100      0 i 
r>i192.168.1.0/30   172.16.64.1              0    150      0 200 i 
r                   192.168.1.1              0    125      0 200 i 
*>i192.168.1.4/30   172.16.64.1              0    150      0 200 i 
*                   192.168.1.1              0    125      0 200 i 
*>i192.168.100.0    172.16.64.1              0    150      0 200 i 
*                   192.168.1.1              0    125      0 200  


ISP#show ip bgp  
BGP table version is 7, local router ID is 192.168.100.1 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
             r RIB-failure, S Stale 
Origin codes: i - IGP, e - EGP, ? - incomplete 

  Network          Next Hop            Metric LocPrf Weight Path 
*  172.16.0.0       192.168.1.2             75             0 64512 i 
*>                  192.168.1.6             50             0 64512 i 
*> 192.168.1.0/30   0.0.0.0                  0         32768 i 
*> 192.168.1.4/30   0.0.0.0                  0         32768 i 
*> 192.168.100.0    0.0.0.0                  0         32768 i 





ISP#tclsh 
ISP(tcl)#foreach address { 
+>192.168.100.1 
+>172.16.64.1 
+>172.16.32.1 
+>192.168.1.1 
+>192.168.1.2 
+>192.168.1.5 
+>192.168.1.6 
+>172.16.1.1 
+>172.16.1.2 
+>} { 
+>ping $address } 

Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.100.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 172.16.64.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/62/164 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 172.16.32.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/44/108 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/32/72 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/32/68 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.5, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/36/68 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.6, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/64 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/60/108 ms 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 172.16.1.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/72/176 ms 
ISP(tcl)#tclquit 
















本文转自zhang25yun51CTO博客,原文链接:http://blog.51cto.com/1585654/1402031 ,如需转载请自行联系原作者




相关文章
|
小程序
微信小程序项目实例——备忘录
微信小程序项目实例——备忘录
|
6月前
|
人工智能 编解码 监控
游戏显卡驱动,NVIDIA App ,0xc000007b,amd显卡驱动下载,解决游戏慢,游戏卡等问题
本文介绍了游戏显卡驱动的重要性及安装方法,涵盖NVIDIA和AMD显卡驱动下载与更新,解决游戏卡顿、闪退及报错0xc000007b等问题。提供三款工具推荐,支持自动识别与手动精准安装,优化游戏性能,提升体验。
644 5
|
12月前
|
开发框架 JavaScript 前端开发
鸿蒙开发:什么是ArkTs?
本小结主要简单介绍了ArkTs语言的相关知识,都是一些概念性质的内容,大家作为一个了解即可
624 61
|
图形学 异构计算
Siemens NX何时支持GPU光线追踪与图形加速?
NX的Ray Tracing Studio在NX 1847及更早版本中不支持NVIDIA RTX板的GPU加速,仅依赖CPU,性能较慢。从NX 1872起支持GPU加速。自2023年6月版起,若无GPU,NX将显示图形配置错误并记录到syslog文件,建议使用支持的GPU以避免未定义行为。更多支持的硬件和图形信息,请参阅鼎森电脑整理的文件“NX-Graphics-Certification-Table_20241207.xlsx”。链接:https://pan.baidu.com/s/1_FpOoJU_IrExnhVXyzB4cw?pwd=676s 提取码: 676s
576 1
|
存储 人工智能 测试技术
Minstrel自动生成结构化提示,让AI为AI写提示词的多代理提示生成框架
在人工智能迅速发展的背景下,有效利用大型语言模型(LLMs)成为重要议题。9月发布的这篇论文提出了LangGPT结构化提示框架和Minstrel多代理提示生成系统,旨在帮助非AI专家更好地使用LLMs。LangGPT通过模块化设计提高提示的泛化能力和可重用性,Minstrel则通过多代理协作自动生成高质量提示。实验结果显示,这两种方法显著提升了LLMs的性能,特别是在大规模模型上效果显著。
530 2
Minstrel自动生成结构化提示,让AI为AI写提示词的多代理提示生成框架
|
自然语言处理 Python
如何使用自然语言处理库`nltk`进行文本的基本处理
这段Python代码展示了如何使用`nltk`库进行文本的基本处理,包括分词和词频统计。首先需要安装`nltk`库,然后通过`word_tokenize`方法将文本拆分为单词,并使用`FreqDist`类统计每个单词的出现频率。运行代码后,会输出每个词的出现次数,帮助理解文本的结构和常用词。
383 1
|
安全 数据安全/隐私保护
什么是URL?
什么是URL?
2525 0
|
传感器 自动驾驶 安全
深入解析SOME/IP协议在汽车行业的应用案例
深入解析SOME/IP协议在汽车行业的应用案例
739 0
|
弹性计算 安全 数据安全/隐私保护
远程桌面连接Windows实例,提示“为安全考虑,已锁定该用户账户,原因是登录尝试或密码更改尝试过多”错误解决方案
远程桌面连接Windows实例,提示“为安全考虑,已锁定该用户账户,原因是登录尝试或密码更改尝试过多”错误解决方案
3166 0

热门文章

最新文章