BGP第二次实验(完整版)
BGP第二次实验(完整版)
【实验目的】
1. 了解BGP基本配置
2. 了解BGP同步与非同步的概念,学会把BGP在发布到IGP,从而克服同步带来的问题
3. 学会配置路由反射器
4. 学会配置汇聚BGP路由条目
5. 学会配置前缀列表(prefix list)
6. 学会配置团体字属性
7. 学会配置peer-group
【实验结果链接】
1. 基本配置:AS200-A、AS100-B、AS100-C、AS100-D、AS300-E
BGP信息:AS200-A、AS100-B、AS100-C、AS100-D、AS300-E
2. 启用同步:AS200-A、AS100-B、AS100-C、AS100-D、AS300-E
BGP重发布进RIP:AS200-A、AS100-B、AS100-C、AS100-D、AS300-E
3. 去掉B、D之间的IBGP:AS100-B、AS100-D
配置路由反射器后:AS100-B 、AS100-D
4. 非summary-only聚合:AS300-E
summary-only聚合:AS100-B、AS300-E
5. 前缀列表:AS300-E
6. 配置团体字前:AS300-E
配置团体字后:AS300-E
7. 配置peer-group:AS200-A、AS100-C、AS300-E
8. 最终配置结果:AS200-A、AS100-B、AS100-C、AS100-D、AS300-E
【实验拓扑】
注意:实线框地内容是路由回环端口地网段地址
【实验内容】
一、 BGP基本配置
1. 在各台路由器上配置基本的IP地址,包括回环地址。另外,为了在troubleshooting时便于检测,也配置了虚拟终端。
2. 在路由器AS100-B、AS100-C、AS100-D上配置RIP version2协议,相互之间通告172.16.0.0网络路由信息;
3. 在各台路由器上都启动BGP协议,各AS号如图所示。
4. 下面是各台路由器完成配置后,用show run命令看到的配置结果
1) 路由器AS200-A TOP
hostname As200-A
!
enable password cisco
!
interface Loopback1
ip address 10.10.1.1 255.255.255.0
no ip directed-broadcast
!
interface Loopback2
ip address 10.10.2.1 255.255.255.0
no ip directed-broadcast
!
interface Serial0/0
ip address 172.16.5.1 255.255.255.0
no ip directed-broadcast
clockrate 56000
!
interface Serial0/1
ip address 172.16.6.1 255.255.255.0
no ip directed-broadcast
clockrate 56000
!
router bgp 200
network 10.10.1.0 mask 255.255.255.0
network 10.10.2.0 mask 255.255.255.0
network 172.16.5.0 mask 255.255.255.0
network 172.16.6.0 mask 255.255.255.0
neighbor 172.16.5.2 remote-as 100
neighbor 172.16.6.2 remote-as 100
line vty 0 4
password cisco
login
!
2)路由器AS100-B TOP
hostname AS100-B
!
enable password cisco
!
interface Loopback3
ip address 172.16.2.1 255.255.255.0
no ip directed-broadcast
!
interface FastEthernet0/0
ip address 172.16.16.2 255.255.255.0
no ip directed-broadcast
!
interface Serial0/0
ip address 172.16.4.2 255.255.255.0
no ip directed-broadcast
no ip mroute-cache
no fair-queue
!
interface Serial0/1
ip address 172.16.5.2 255.255.255.0
no ip directed-broadcast
!
router rip
version 2
network 172.16.0.0
!
router bgp 100
network 172.16.2.0 mask 255.255.255.0
network 172.16.4.0 mask 255.255.255.0
network 172.16.5.0 mask 255.255.255.0
network 172.16.16.0 mask 255.255.255.0
neighbor 172.16.4.1 remote-as 100
neighbor 172.16.5.1 remote-as 200
neighbor 172.16.7.2 remote-as 100
neighbor 172.16.16.1 remote-as 300
!
line vty 0 4
password cisco
login
!
3)路由器AS100-C TOP
hostname AS100-C
!
enable password cisco
!
interface Loopback0
ip address 172.16.1.1 255.255.255.0
!
interface Serial0
ip address 172.16.7.1 255.255.255.0
no fair-queue
!
interface Serial2
ip address 172.16.4.1 255.255.255.0
clockrate 56000
!
router rip
version 2
network 172.16.0.0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 172.16.1.0 mask 255.255.255.0
network 172.16.4.0 mask 255.255.255.0
network 172.16.7.0 mask 255.255.255.0
neighbor 172.16.4.2 remote-as 100
neighbor 172.16.7.2 remote-as 100
no auto-summary
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
4)路由器AS100-D TOP
hostname AS100-D
!
enable password cisco
!
interface Loopback0
ip address 172.16.0.1 255.255.255.0
no ip directed-broadcast
!
interface Loopback1
ip address 172.16.3.1 255.255.255.0
no ip directed-broadcast
!
interface Serial0/0
ip address 172.16.7.2 255.255.255.0
no ip directed-broadcast
clockrate 56000
!
interface FastEthernet0/1
no ip address
no ip directed-broadcast
shutdown
duplex auto
speed auto
!
interface Serial0/1
ip address 172.16.6.2 255.255.255.0
no ip directed-broadcast
!
router rip
version 2
network 172.16.0.0
!
router bgp 100
no synchronization
network 172.16.0.0 mask 255.255.255.0
network 172.16.3.0 mask 255.255.255.0
network 172.16.6.0 mask 255.255.255.0
network 172.16.7.0 mask 255.255.255.0
neighbor 172.16.4.2 remote-as 100
neighbor 172.16.6.1 remote-as 200
neighbor 172.16.7.1 remote-as 100
!
ip classless
no ip http server
!
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
no scheduler allocate
end
5)路由器AS300-E TOP
hostname as300-E
!
enable password cisco
!
interface Loopback1
ip address 192.168.2.1 255.255.255.0
!
interface Ethernet0
ip address 172.16.16.1 255.255.255.0
!
router bgp 300
bgp log-neighbor-changes
network 172.16.16.0 mask 255.255.255.0
network 192.168.2.0
neighbor 172.16.16.2 remote-as 100
!
line vty 0 4
password cisco
login
!
5. 用show ip route、show ip bgp以及show ip bgp neighbors命令,看到如下结果
1)路由器AS200-A TOP
? show ip route
AS200-A#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 9 subnets
B 172.16.16.0 [20/0] via 172.16.5.2, 00:03:51
B 172.16.4.0 [20/0] via 172.16.5.2, 00:03:51
C 172.16.5.0 is directly connected, Serial0/0
C 172.16.6.0 is directly connected, Serial0/1
B 172.16.7.0 [20/0] via 172.16.6.2, 00:03:51
B 172.16.0.0 [20/0] via 172.16.6.2, 00:03:12
B 172.16.1.0 [20/0] via 172.16.6.2, 00:03:51
B 172.16.2.0 [20/0] via 172.16.5.2, 00:03:51
B 172.16.3.0 [20/0] via 172.16.6.2, 00:03:12
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.1.0 is directly connected, Loopback1
B 192.168.2.0/24 [20/0] via 172.16.5.2, 00:03:51
? show ip bgp TOP
AS200-A#show ip bgp
BGP table version is 98, local router ID is 172.16.6.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 0.0.0.0 0 32768 i
* 172.16.0.0/24 172.16.5.2 0 0 100 i
*> 172.16.6.2 0 100 i
* 172.16.1.0/24 172.16.5.2 0 100 i
*> 172.16.6.2 0 100 i
* 172.16.2.0/24 172.16.6.2 0 0 100 i
*> 172.16.5.2 0 100 i
* 172.16.3.0/24 172.16.5.2 0 0 100 i
*> 172.16.6.2 0 100 i
* 172.16.4.0/24 172.16.6.2 0 0 100 i
*> 172.16.5.2 0 100 i
* 172.16.5.0/24 172.16.5.2 0 0 100 i
* 172.16.6.2 0 100 i
*> 0.0.0.0 0 32768 i
* 172.16.6.0/24 172.16.6.2 0 0 100 i
* 172.16.5.2 0 100 i
*> 0.0.0.0 0 32768 i
* 172.16.7.0/24 172.16.5.2 0 100 i
Network Next Hop Metric LocPrf Weight Path
*> 172.16.6.2 0 0 100 i
* 172.16.16.0/24 172.16.6.2 0 0 100 i
*> 172.16.5.2 0 100 i
* 192.168.2.0 172.16.6.2 0 100 300 i
*> 172.16.5.2 0 100 300 i
AS200-A#
? show ip bgp neighbors TOP
AS200_A#show ip bgp neighbors
BGP neighbor is 172.16.5.2, remote AS 100, external link
BGP version 4, remote router ID 172.16.2.1
BGP state = Established, up for 01:02:43
Last read 00:00:43, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 71 messages, 0 notifications, 0 in queue
Sent 68 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 13, neighbor version 13
Index 1, Offset 0, Mask 0x2
Route refresh request: received 0, sent 0
10 accepted prefixes consume 400 bytes
Prefix advertised 4, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.5.1, Local port: 11003
Foreign host: 172.16.5.2, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3F3A68):
Timer Starts Wakeups Next
Retrans 68 0 0x0
TimeWait 0 0 0x0
AckHold 68 24 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 3576726283 snduna: 3576727671 sndnxt: 3576727671 sndwnd: 14997
irs: 44572312 rcvnxt: 44573854 rcvwnd: 16308 delrcvwnd: 76
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 20 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, nagle
Datagrams (max data segment is 1460 bytes):
Rcvd: 118 (out of order: 0), with data: 68, total data bytes: 1541
Sent: 94 (retransmit: 0, fastretransmit: 0), with data: 67, total data bytes: 1387
BGP neighbor is 172.16.6.2, remote AS 100, external link
BGP version 4, remote router ID 172.16.3.1
BGP state = Established, up for 01:01:05
Last read 00:00:04, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 69 messages, 0 notifications, 0 in queue
Sent 70 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 13, neighbor version 13
Index 2, Offset 0, Mask 0x4
Route refresh request: received 0, sent 0
10 accepted prefixes consume 400 bytes
Prefix advertised 11, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.6.1, Local port: 179
Foreign host: 172.16.6.2, Foreign port: 11000
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3F46E0):
Timer Starts Wakeups Next
Retrans 66 0 0x0
TimeWait 0 0 0x0
AckHold 66 46 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 2740737216 snduna: 2740738744 sndnxt: 2740738744 sndwnd: 16327
irs: 180027161 rcvnxt: 180028647 rcvwnd: 16365 delrcvwnd: 19
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 90 (out of order: 0), with data: 66, total data bytes: 1485
Sent: 113 (retransmit: 0, fastretransmit: 0), with data: 65, total data bytes: 1527
BGP neighbor is 172.16.6.2, remote AS 100, external link
BGP version 4, remote router ID 172.16.3.1
BGP state = Established, up for 01:01:05
Last read 00:00:04, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 69 messages, 0 notifications, 0 in queue
Sent 70 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 13, neighbor version 13
Index 2, Offset 0, Mask 0x4
Route refresh request: received 0, sent 0
10 accepted prefixes consume 400 bytes
Prefix advertised 11, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.6.1, Local port: 179
Foreign host: 172.16.6.2, Foreign port: 11000
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3F46E0):
Timer Starts Wakeups Next
Retrans 66 0 0x0
TimeWait 0 0 0x0
AckHold 66 46 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 2740737216 snduna: 2740738744 sndnxt: 2740738744 sndwnd: 16327
irs: 180027161 rcvnxt: 180028647 rcvwnd: 16365 delrcvwnd: 19
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 90 (out of order: 0), with data: 66, total data bytes: 1485
Sent: 113 (retransmit: 0, fastretransmit: 0), with data: 65, total data bytes: 1527
2)路由器AS100-B TOP
? show ip route
as100-B#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 9 subnets
C 172.16.16.0 is directly connected, FastEthernet0/0
C 172.16.4.0 is directly connected, Serial0/0
C 172.16.5.0 is directly connected, Serial0/1
B 172.16.6.0 [20/0] via 172.16.5.1, 00:59:48
R 172.16.7.0 [120/1] via 172.16.4.1, 00:00:26, Serial0/0
R 172.16.0.0 [120/2] via 172.16.4.1, 00:00:26, Serial0/0
R 172.16.1.0 [120/1] via 172.16.4.1, 00:00:26, Serial0/0
C 172.16.2.0 is directly connected, Loopback3
R 172.16.3.0 [120/2] via 172.16.4.1, 00:00:26, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.1.0 [20/0] via 172.16.5.1, 01:00:14
B 10.10.1.0 [20/0] via 172.16.5.1, 01:00:14
? show ip bgp TOP
as100-B#show ip bgp
BGP table version is 21, local router ID is 192.168.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i10.10.1.0/24 172.16.6.1 0 100 0 200 i
*> 172.16.5.1 0 0 200 i
*>i172.16.0.0/24 172.16.7.2 0 100 0 i
*>i172.16.1.0/24 172.16.4.1 0 100 0 i
*> 172.16.2.0/24 0.0.0.0 0 32768 i
*>i172.16.3.0/24 172.16.7.2 0 100 0 i
* i172.16.4.0/24 172.16.4.1 0 100 0 i
*> 0.0.0.0 0 32768 i
* 172.16.5.0/24 172.16.5.1 0 0 200 i
*> 0.0.0.0 0 32768 i
* i172.16.6.0/24 172.16.7.2 0 100 0 i
*> 172.16.5.1 0 0 200 i
* i172.16.7.0/24 172.16.7.2 0 100 0 i
*>i 172.16.4.1 0 100 0 i
* 172.16.16.0/24 172.16.16.1 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 192.168.2.0 172.16.16.1 0 0 300 i
as100-B#
? show ip bgp neighbors TOP
RouterB#sh ip bgp neighbors
BGP neighbor is 172.16.4.1, remote AS 100, internal link
BGP version 4, remote router ID 172.16.1.1
BGP state = Established, up for 00:57:09
Last read 00:00:08, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 62 messages, 0 notifications, 0 in queue
Sent 64 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 15, neighbor version 15
Index 1, Offset 0, Mask 0x2
Route refresh request: received 0, sent 0
3 accepted prefixes consume 120 bytes
Prefix advertised 7, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.4.2, Local port: 179
Foreign host: 172.16.4.1, Foreign port: 11001
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3B5D38):
Timer Starts Wakeups Next
Retrans 61 0 0x0
TimeWait 0 0 0x0
AckHold 62 14 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 3399002934 snduna: 3399004309 sndnxt: 3399004309 sndwnd: 15010
irs: 3753617846 rcvnxt: 3753619095 rcvwnd: 15136 delrcvwnd: 1248
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 16 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 122 (out of order: 0), with data: 62, total data bytes: 1248
Sent: 75 (retransmit: 0, fastretransmit: 0), with data: 60, total data bytes: 1374
BGP neighbor is 172.16.5.1, remote AS 200, external link
BGP version 4, remote router ID 10.10.2.1
BGP state = Established, up for 00:58:38
Last read 00:00:38, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 64 messages, 0 notifications, 0 in queue
Sent 67 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 15, neighbor version 15
Index 2, Offset 0, Mask 0x4
Route refresh request: received 0, sent 0
3 accepted prefixes consume 120 bytes
Prefix advertised 10, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.5.2, Local port: 179
Foreign host: 172.16.5.1, Foreign port: 11003
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3B8224):
Timer Starts Wakeups Next
Retrans 65 0 0x0
TimeWait 0 0 0x0
AckHold 63 46 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 44572312 snduna: 44573778 sndnxt: 44573778 sndwnd: 16384
irs: 3576726283 rcvnxt: 3576727595 rcvwnd: 15073 delrcvwnd: 1311
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 20 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 89 (out of order: 0), with data: 63, total data bytes: 1311
Sent: 111 (retransmit: 0, fastretransmit: 0), with data: 64, total data bytes: 1465
BGP neighbor is 172.16.7.2, remote AS 100, internal link
BGP version 4, remote router ID 172.16.3.1
BGP state = Established, up for 00:57:41
Last read 00:00:40, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 64 messages, 0 notifications, 0 in queue
Sent 64 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 15, neighbor version 15
Index 3, Offset 0, Mask 0x8
Route refresh request: received 0, sent 0
6 accepted prefixes consume 240 bytes
Prefix advertised 7, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.4.2, Local port: 11006
Foreign host: 172.16.7.2, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3B8F78):
Timer Starts Wakeups Next
Retrans 62 0 0x0
TimeWait 0 0 0x0
AckHold 63 34 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 645595783 snduna: 645597158 sndnxt: 645597158 sndwnd: 16099
irs: 1969624055 rcvnxt: 1969625422 rcvwnd: 16118 delrcvwnd: 266
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 36 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, nagle
Datagrams (max data segment is 536 bytes):
Rcvd: 93 (out of order: 0), with data: 63, total data bytes: 1366
Sent: 99 (retransmit: 0, fastretransmit: 0), with data: 61, total data bytes: 1374
BGP neighbor is 172.16.16.1, remote AS 300, external link
BGP version 4, remote router ID 192.168.2.1
BGP state = Established, up for 01:04:10
Last read 00:00:10, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 69 messages, 0 notifications, 0 in queue
Sent 74 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 15, neighbor version 15
Index 4, Offset 0, Mask 0x10
Route refresh request: received 0, sent 0
1 accepted prefixes consume 40 bytes
Prefix advertised 12, suppressed 0, withdrawn 1
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.16.2, Local port: 179
Foreign host: 172.16.16.1, Foreign port: 11000
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3B9D24):
Timer Starts Wakeups Next
Retrans 75 0 0x0
TimeWait 0 0 0x0
AckHold 69 23 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 4227790013 snduna: 4227791628 sndnxt: 4227791628 sndwnd: 16232
irs: 1142621887 rcvnxt: 1142623258 rcvwnd: 15014 delrcvwnd: 1370
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 16 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 124 (out of order: 0), with data: 69, total data bytes: 1370
Sent: 98 (retransmit: 0, fastretransmit: 0), with data: 74, total data bytes: 1614
3)路由器AS100-C TOP
? show ip route
AS100-C#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 9 subnets
R 172.16.16.0 [120/1] via 172.16.4.2, 00:00:03, Serial2
C 172.16.4.0 is directly connected, Serial2
R 172.16.5.0 [120/1] via 172.16.4.2, 00:00:03, Serial2
R 172.16.6.0 [120/1] via 172.16.7.2, 00:00:08, Serial0
C 172.16.7.0 is directly connected, Serial0
R 172.16.0.0 [120/1] via 172.16.7.2, 00:00:08, Serial0
C 172.16.1.0 is directly connected, Loopback0
R 172.16.2.0 [120/1] via 172.16.4.2, 00:00:03, Serial2
R 172.16.3.0 [120/1] via 172.16.7.2, 00:00:08, Serial0
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.1.0 [200/0] via 172.16.5.1, 00:01:29
B 192.168.2.0/24 [200/0] via 172.16.16.1, 00:01:29
? show ip bgp TOP
AS100-C#show ip bgp
BGP table version is 15, local router ID is 172.16.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i10.10.1.0/24 172.16.6.1 0 100 0 200 i
*>i 172.16.5.1 0 100 0 200 i
*>i172.16.0.0/24 172.16.7.2 0 100 0 i
*> 172.16.1.0/24 0.0.0.0 0 32768 i
*>i172.16.2.0/24 172.16.4.2 0 100 0 i
*>i172.16.3.0/24 172.16.7.2 0 100 0 i
* i172.16.4.0/24 172.16.4.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.16.5.0/24 172.16.4.2 0 100 0 i
*>i172.16.6.0/24 172.16.7.2 0 100 0 i
* i172.16.7.0/24 172.16.7.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.16.16.0/24 172.16.4.2 0 100 0 i
*>i192.168.2.0 172.16.16.1 0 100 0 300 i
AS100-C#
? show ip bgp neighbors TOP
RouterC# sh ip bgp neighbors
BGP neighbor is 172.16.4.2, remote AS 100, internal link
BGP version 4, remote router ID 172.16.2.1
BGP state = Established, up for 00:59:24
Last read 00:00:24, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 66 messages, 0 notifications, 0 in queue
Sent 64 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 11, neighbor version 11
Index 1, Offset 0, Mask 0x2
Route refresh request: received 0, sent 0
7 accepted prefixes consume 280 bytes
Prefix advertised 3, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.4.1, Local port: 11001
Foreign host: 172.16.4.2, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x36F480):
Timer Starts Wakeups Next
Retrans 65 0 0x0
TimeWait 0 0 0x0
AckHold 62 60 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 3753617846 snduna: 3753619133 sndnxt: 3753619133 sndwnd: 15098
irs: 3399002934 rcvnxt: 3399004347 rcvwnd: 14972 delrcvwnd: 1412
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 16 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, nagle
Datagrams (max data segment is 1460 bytes):
Rcvd: 77 (out of order: 0), with data: 62, total data bytes: 1412
Sent: 126 (retransmit: 0, fastretransmit: 0), with data: 64, total data bytes: 1286
BGP neighbor is 172.16.7.2, remote AS 100, internal link
BGP version 4, remote router ID 172.16.3.1
BGP state = Established, up for 00:59:27
Last read 00:00:27, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 66 messages, 0 notifications, 0 in queue
Sent 64 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 11, neighbor version 11
Index 2, Offset 0, Mask 0x4
Route refresh request: received 0, sent 0
6 accepted prefixes consume 240 bytes
Prefix advertised 3, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.7.1, Local port: 11000
Foreign host: 172.16.7.2, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3700D8):
Timer Starts Wakeups Next
Retrans 65 0 0x0
TimeWait 0 0 0x0
AckHold 65 43 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 1895390095 snduna: 1895391382 sndnxt: 1895391382 sndwnd: 15098
irs: 1847910868 rcvnxt: 1847912273 rcvwnd: 14980 delrcvwnd: 1404
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 16 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, nagle
Datagrams (max data segment is 1460 bytes):
Rcvd: 89 (out of order: 0), with data: 65, total data bytes: 1404
Sent: 109 (retransmit: 0, fastretransmit: 0), with data: 64, total data bytes: 1286
4)路由器AS100-D TOP
? show ip route
AS100-D#sho ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 9 subnets
R 172.16.16.0 [120/2] via 172.16.7.1, 00:00:16, Serial0/0
R 172.16.4.0 [120/1] via 172.16.7.1, 00:00:16, Serial0/0
R 172.16.5.0 [120/2] via 172.16.7.1, 00:00:16, Serial0/0
C 172.16.6.0 is directly connected, Serial0/1
C 172.16.7.0 is directly connected, Serial0/0
C 172.16.0.0 is directly connected, Loopback0
R 172.16.1.0 [120/1] via 172.16.7.1, 00:00:16, Serial0/0
R 172.16.2.0 [120/2] via 172.16.7.1, 00:00:16, Serial0/0
C 172.16.3.0 is directly connected, Loopback1
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.1.0 [20/0] via 172.16.6.1, 00:02:31
B 192.168.2.0/24 [200/0] via 172.16.16.1, 00:02:36
? show ip bgp TOP
AS100-D#show ip bgp
BGP table version is 14, local router ID is 172.16.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 172.16.6.1 0 0 200 i
* i 172.16.5.1 0 100 0 200 i
*> 172.16.0.0/24 0.0.0.0 0 32768 i
*>i172.16.1.0/24 172.16.7.1 0 100 0 i
*>i172.16.2.0/24 172.16.4.2 0 100 0 i
*> 172.16.3.0/24 0.0.0.0 0 32768 i
* i172.16.4.0/24 172.16.4.2 0 100 0 i
*>i 172.16.7.1 0 100 0 i
* 172.16.5.0/24 172.16.6.1 0 0 200 i
*>i 172.16.4.2 0 100 0 i
*> 172.16.6.0/24 0.0.0.0 0 32768 i
* 172.16.6.1 0 0 200 i
*> 172.16.7.0/24 0.0.0.0 0 32768 i
* i 172.16.7.1 0 100 0 i
*>i172.16.16.0/24 172.16.4.2 0 100 0 i
*>i192.168.2.0 172.16.16.1 0 100 0 300 i
AS100-D#
? show ip bgp neighbors TOP
RouterD#sh ip bgp neighbors
BGP neighbor is 172.16.4.2, remote AS 100, internal link
BGP version 4, remote router ID 172.16.2.1
BGP state = Established, up for 01:01:20
Last read 00:00:20, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 68 messages, 0 notifications, 0 in queue
Sent 68 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 14, neighbor version 14
Index 1, Offset 0, Mask 0x2
Route refresh request: received 0, sent 0
7 accepted prefixes consume 280 bytes
Prefix advertised 6, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.7.2, Local port: 179
Foreign host: 172.16.4.2, Foreign port: 11006
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x386BA4):
Timer Starts Wakeups Next
Retrans 68 0 0x0
TimeWait 0 0 0x0
AckHold 65 30 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 1969624055 snduna: 1969625498 sndnxt: 1969625498 sndwnd: 16042
irs: 645595783 rcvnxt: 645597234 rcvwnd: 16023 delrcvwnd: 361
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 32 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 536 bytes):
Rcvd: 107 (out of order: 0), with data: 65, total data bytes: 1450
Sent: 100 (retransmit: 0, fastretransmit: 0), with data: 67, total data bytes: 1442
BGP neighbor is 172.16.6.1, remote AS 200, external link
BGP version 4, remote router ID 10.10.2.1
BGP state = Established, up for 01:00:42
Last read 00:00:42, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 69 messages, 0 notifications, 0 in queue
Sent 68 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 14, neighbor version 14
Index 2, Offset 0, Mask 0x4
Route refresh request: received 0, sent 0
3 accepted prefixes consume 120 bytes
Prefix advertised 11, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.6.2, Local port: 11000
Foreign host: 172.16.6.1, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x387744):
Timer Starts Wakeups Next
Retrans 67 1 0x0
TimeWait 0 0 0x0
AckHold 64 21 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 180027161 snduna: 180028628 sndnxt: 180028628 sndwnd: 16384
irs: 2740737216 rcvnxt: 2740738725 rcvwnd: 16346 delrcvwnd: 38
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, nagle
Datagrams (max data segment is 1460 bytes):
Rcvd: 111 (out of order: 0), with data: 64, total data bytes: 1508
Sent: 89 (retransmit: 1, fastretransmit: 0), with data: 65, total data bytes: 1466
BGP neighbor is 172.16.7.1, remote AS 100, internal link
BGP version 4, remote router ID 172.16.1.1
BGP state = Established, up for 01:01:09
Last read 00:00:09, hold time is 180, keepalive interval is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(new)
Address family IPv4 Unicast: advertised and received
Received 66 messages, 0 notifications, 0 in queue
Sent 68 messages, 0 notifications, 0 in queue
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 14, neighbor version 14
Index 3, Offset 0, Mask 0x8
Route refresh request: received 0, sent 0
3 accepted prefixes consume 120 bytes
Prefix advertised 6, suppressed 0, withdrawn 0
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 172.16.7.2, Local port: 179
Foreign host: 172.16.7.1, Foreign port: 11000
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
Event Timers (current time is 0x3884A4):
Timer Starts Wakeups Next
Retrans 68 0 0x0
TimeWait 0 0 0x0
AckHold 66 23 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 1847910868 snduna: 1847912311 sndnxt: 1847912311 sndwnd: 14942
irs: 1895390095 rcvnxt: 1895391420 rcvwnd: 15060 delrcvwnd: 1324
SRTT: 300 ms, RTTO: 303 ms, RTV: 3 ms, KRTT: 0 ms
minRTT: 16 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: passive open, nagle, gen tcbs
Datagrams (max data segment is 1460 bytes):
Rcvd: 113 (out of order: 0), with data: 66, total data bytes: 1324
Sent: 91 (retransmit: 0, fastretransmit: 0), with data: 67, total data bytes: 1442
5)路由器AS300-E TOP
? show ip bgp
as300-E#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 9 subnets
C 172.16.16.0 is directly connected, Ethernet0
B 172.16.4.0 [20/0] via 172.16.16.2, 00:14:04
B 172.16.5.0 [20/0] via 172.16.16.2, 00:14:04
B 172.16.6.0 [20/0] via 172.16.16.2, 00:14:04
B 172.16.7.0 [20/0] via 172.16.16.2, 00:14:04
B 172.16.0.0 [20/0] via 172.16.16.2, 00:06:05
B 172.16.1.0 [20/0] via 172.16.16.2, 00:14:04
B 172.16.2.0 [20/0] via 172.16.16.2, 00:14:04
B 172.16.3.0 [20/0] via 172.16.16.2, 00:06:06
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.1.0 [20/0] via 172.16.16.2, 00:14:04
C 192.168.2.0/24 is directly connected, Loopback1
? show ip bgp TOP
as300-E#show ip bgp
BGP table version is 37, local router ID is 192.168.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 172.16.16.2 0 100 200 i
*> 172.16.0.0/24 172.16.16.2 0 100 i
*> 172.16.1.0/24 172.16.16.2 0 100 i
*> 172.16.2.0/24 172.16.16.2 0 0 100 i
*> 172.16.3.0/24 172.16.16.2 0 100 i
*> 172.16.4.0/24 172.16.16.2 0 0 100 i
*> 172.16.5.0/24 172.16.16.2 0 0 100 i
*> 172.16.6.0/24 172.16.16.2 0 100 200 i
*> 172.16.7.0/24 172.16.16.2 0 100 i
* 172.16.16.0/24 172.16.16.2 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 192.168.2.0 0.0.0.0 0 32768 i
as300-E#
二、 BGP同步
1. BGP同步含义
在BGP协议中,对于处于同一个自治系统域的BGP路由器,设为A和B。假设A向B通告关于某个目的网段的路由更新,B接收到之后首先在自己的IGP表中搜索,看IGP路由信息中有无到达该目的网段的路由信息。如果有,B就会将A发给它的IBGP路由更新信息通告给EBGP邻居;否则,就不会通告给EBGP。这就是所谓的同步,即是IBGP与IGP之间必须同步。
2. 关闭AS200-A上的172.16.5.1端口。在AS100-B,AS100-C,AS100-D三台路由器上启动BGP同步,配置为:
AS100-B(config)#router bgp 100
AS100-B(config-router)#synchronization
启动同步后,我们可以看到AS200-A学不到192.168.2.0网段的BGP信息,AS300-E学不到10.10.1.0,10.10.2.0网段的信息的BGP表为:
1) 路由器AS200-A TOP
? show ip route
As200-A#show ip bgp
BGP table version is 17, local router ID is 10.10.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 0.0.0.0 0 32768 i
*> 10.10.2.0/24 0.0.0.0 0 32768 i
*> 172.16.0.0/24 172.16.6.2 0 0 100 i
*> 172.16.2.0/24 172.16.6.2 0 100 i
*> 172.16.3.0/24 172.16.6.2 0 0 100 i
*> 172.16.4.0/24 172.16.6.2 0 100 i
* 172.16.6.0/24 172.16.6.2 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 172.16.7.0/24 172.16.6.2 0 0 100 i
*> 172.16.16.0/24 172.16.6.2 0 100 i
? show ip bgp TOP
AS200_A#show ip bgp
BGP table version is 24, local router ID is 10.10.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 0.0.0.0 0 32768 i
*> 10.10.2.0/24 0.0.0.0 0 32768 i
*> 172.16.0.0/24 172.16.6.2 0 0 100 i
*> 172.16.1.0/24 172.16.6.2 0 100 i
*> 172.16.2.0/24 172.16.6.2 0 100 i
*> 172.16.3.0/24 172.16.6.2 0 0 100 i
*> 172.16.4.0/24 172.16.6.2 0 100 i
*> 172.16.6.0/24 172.16.6.2 0 0 100 i
*> 172.16.7.0/24 172.16.6.2 0 0 100 i
*> 172.16.16.0/24 172.16.6.2 0 100 i
2)路由器AS100-B TOP
在路由器AS100-B上是可以看到10.10.1.0/24和10.10.2.0/24网段的
? show ip bgp
as100-B#show ip bgp
BGP table version is 11, local router ID is 172.16.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i10.10.1.0/24 172.16.6.1 0 100 0 200 i
* i10.10.2.0/24 172.16.6.1 0 100 0 200 i
*>i172.16.0.0/24 172.16.7.2 0 100 0 i
*> 172.16.0.0/22 0.0.0.0 32768 i
*>i172.16.1.0/24 172.16.4.1 0 100 0 i
*> 172.16.2.0/24 0.0.0.0 0 32768 i
*>i172.16.3.0/24 172.16.7.2 0 100 0 i
*> 172.16.4.0/24 0.0.0.0 0 32768 i
*>i172.16.6.0/24 172.16.7.2 0 100 0 i
*>i172.16.7.0/24 172.16.7.2 0 100 0 i
* 172.16.16.0/24 172.16.16.1 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 192.168.2.0 172.16.16.1 0 0 300 i
as100-B#
3)路由器AS100-C TOP
AS100-C#show ip bgp
BGP table version is 70, local router ID is 172.16.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i10.10.1.0/24 172.16.6.1 0 100 0 200 i
* i10.10.2.0/24 172.16.6.1 0 100 0 200 i
*>i172.16.0.0/24 172.16.7.2 0 100 0 i
* i172.16.0.0/22 172.16.4.2 100 0 i
*> 172.16.1.0/24 0.0.0.0 0 32768 i
*>i172.16.2.0/24 172.16.4.2 0 100 0 i
*>i172.16.3.0/24 172.16.7.2 0 100 0 i
* i172.16.4.0/24 172.16.4.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.16.6.0/24 172.16.7.2 0 100 0 i
* i172.16.7.0/24 172.16.7.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.16.16.0/24 172.16.4.2 0 100 0 i
* i192.168.2.0 172.16.16.1 0 100 0 300 i
4) 路由器AS100-D TOP
AS100-D#show ip bgp
BGP table version is 12, local router ID is 172.16.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 172.16.6.1 0 0 200 i
*> 10.10.2.0/24 172.16.6.1 0 0 200 i
*> 172.16.0.0/24 0.0.0.0 0 32768 i
* i172.16.0.0/22 172.16.4.2 100 0 i
*>i172.16.1.0/24 172.16.7.1 0 100 0 i
*>i172.16.2.0/24 172.16.4.2 0 100 0 i
*> 172.16.3.0/24 0.0.0.0 0 32768 i
*>i172.16.4.0/24 172.16.4.2 0 100 0 i
*> 172.16.6.0/24 0.0.0.0 0 32768 i
* 172.16.6.1 0 0 200 i
*> 172.16.7.0/24 0.0.0.0 0 32768 i
*>i172.16.16.0/24 172.16.4.2 0 100 0 i
* i192.168.2.0 172.16.16.1 0 100 0 300 i
AS100-D#
5)路由器AS300-E TOP
在路由器AS300-E上看不到10.10.1.0/24和10.10.2.0/24网段
as300-E#show ip bgp
BGP table version is 18, local router ID is 192.168.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0/24 172.16.16.2 0 100 i
*> 172.16.0.0/22 172.16.16.2 0 100 i
*> 172.16.2.0/24 172.16.16.2 0 0 100 i
*> 172.16.3.0/24 172.16.16.2 0 100 i
*> 172.16.4.0/24 172.16.16.2 0 0 100 i
*> 172.16.6.0/24 172.16.16.2 0 100 i
*> 172.16.7.0/24 172.16.16.2 0 100 i
* 172.16.16.0/24 172.16.16.2 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 192.168.2.0 0.0.0.0 0 32768 i
as300-E#
3.同步问题的解决
在启用同步后,可以通过把BGP的内容重发布到IGP来克服同步带来的问题。
在AS100-B与AS100-D上配置:
router rip
version 2
redistribute bgp 100 metric 2
network 172.16.0.0
配置后可以看到AS200-A与AS300-E上又学到了对方的路由条目,结果为:
? 路由器AS200-A TOP
AS200-A#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
B 172.16.16.0/24 [20/0] via 172.16.6.2, 00:17:41
B 172.16.4.0/24 [20/0] via 172.16.6.2, 00:17:41
C 172.16.6.0/24 is directly connected, Serial0/1
B 172.16.7.0/24 [20/0] via 172.16.6.2, 00:22:08
B 172.16.0.0/22 [20/0] via 172.16.6.2, 00:09:12
B 172.16.0.0/24 [20/0] via 172.16.6.2, 00:22:08
B 172.16.2.0/24 [20/0] via 172.16.6.2, 00:17:41
B 172.16.3.0/24 [20/0] via 172.16.6.2, 00:22:08
10.0.0.0/24 is subnetted, 2 subnets
C 10.10.1.0 is directly connected, Loopback1
C 10.10.2.0 is directly connected, Loopback3
B 192.168.2.0/24 [20/0] via 172.16.6.2, 00:09:12
AS200-A#show ip bgp
BGP table version is 19, local router ID is 10.10.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 0.0.0.0 0 32768 i
*> 10.10.2.0/24 0.0.0.0 0 32768 i
*> 172.16.0.0/24 172.16.6.2 0 0 100 i
*> 172.16.0.0/22 172.16.6.2 0 100 i
*> 172.16.2.0/24 172.16.6.2 0 100 i
*> 172.16.3.0/24 172.16.6.2 0 0 100 i
*> 172.16.4.0/24 172.16.6.2 0 100 i
* 172.16.6.0/24 172.16.6.2 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 172.16.7.0/24 172.16.6.2 0 0 100 i
*> 172.16.16.0/24 172.16.6.2 0 100 i
*> 192.168.2.0 172.16.6.2 0 100 300 i
As200-A#
? 路由器AS100-B TOP
as100-B#show ip bgp
BGP table version is 11, local router ID is 172.16.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i10.10.1.0/24 172.16.6.1 0 100 0 200 i
* i10.10.2.0/24 172.16.6.1 0 100 0 200 i
*>i172.16.0.0/24 172.16.7.2 0 100 0 i
*> 172.16.0.0/22 0.0.0.0 32768 i
*>i172.16.1.0/24 172.16.4.1 0 100 0 i
*> 172.16.2.0/24 0.0.0.0 0 32768 i
*>i172.16.3.0/24 172.16.7.2 0 100 0 i
*> 172.16.4.0/24 0.0.0.0 0 32768 i
*>i172.16.6.0/24 172.16.7.2 0 100 0 i
*>i172.16.7.0/24 172.16.7.2 0 100 0 i
* 172.16.16.0/24 172.16.16.1 0 0 300 i
*> 0.0.0.0 0 32768 i
*> 192.168.2.0 172.16.16.1 0 0 300 I
? 路由器AS100-C TOP
AS100-C#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 9 subnets, 2 masks
R 172.16.16.0/24 [120/1] via 172.16.4.2, 00:00:10, Serial2
C 172.16.4.0/24 is directly connected, Serial2
R 172.16.6.0/24 [120/1] via 172.16.7.2, 00:00:15, Serial0
C 172.16.7.0/24 is directly connected, Serial0
R 172.16.0.0/22 [120/2] via 172.16.4.2, 00:00:10, Serial2
R 172.16.0.0/24 [120/1] via 172.16.7.2, 00:00:15, Serial0
C 172.16.1.0/24 is directly connected, Loopback0
R 172.16.2.0/24 [120/1] via 172.16.4.2, 00:00:10, Serial2
R 172.16.3.0/24 [120/1] via 172.16.7.2, 00:00:15, Serial0
R 10.0.0.0/8 [120/2] via 172.16.7.2, 00:00:15, Serial0
R 192.168.2.0/24 [120/2] via 172.16.4.2, 00:00:10, Serial2
AS100-C#show ip bgp
BGP table version is 72, local router ID is 172.16.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* i10.10.1.0/24 172.16.6.1 0 100 0 200 i
* i10.10.2.0/24 172.16.6.1 0 100 0 200 i
*>i172.16.0.0/24 172.16.7.2 0 100 0 i
*>i172.16.0.0/22 172.16.4.2 100 0 i
*> 172.16.1.0/24 0.0.0.0 0 32768 i
*>i172.16.2.0/24 172.16.4.2 0 100 0 i
*>i172.16.3.0/24 172.16.7.2 0 100 0 i
* i172.16.4.0/24 172.16.4.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.16.6.0/24 172.16.7.2 0 100 0 i
* i172.16.7.0/24 172.16.7.2 0 100 0 i
*> 0.0.0.0 0 32768 i
*>i172.16.16.0/24 172.16.4.2 0 100 0 i
*>i192.168.2.0 172.16.16.1 0 100 0 300 i
AS100-C#
? 路由器AS100-D TOP
AS100-D#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 9 subnets, 2 masks
R 172.16.16.0/24 [120/2] via 172.16.7.1, 00:00:07, Serial0/0
R 172.16.4.0/24 [120/1] via 172.16.7.1, 00:00:07, Serial0/0
C 172.16.6.0/24 is directly connected, Serial0/1
C 172.16.7.0/24 is directly connected, Serial0/0
R 172.16.0.0/22 [120/3] via 172.16.7.1, 00:00:07, Serial0/0
C 172.16.0.0/24 is directly connected, Loopback0
R 172.16.1.0/24 [120/1] via 172.16.7.1, 00:00:07, Serial0/0
R 172.16.2.0/24 [120/2] via 172.16.7.1, 00:00:07, Serial0/0
C 172.16.3.0/24 is directly connected, Loopback1
10.0.0.0/24 is subnetted, 2 subnets
B 10.10.1.0 [20/0] via 172.16.6.1, 00:22:01
B 10.10.2.0 [20/0] via 172.16.6.1, 00:22:01
R 192.168.2.0/24 [120/3] via 172.16.7.1, 00:00:12, Serial0/0
AS100-D#show ip bgp
BGP table version is 14, local router ID is 172.16.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.10.1.0/24 172.16.6.1 0 0 200 i
*> 10.10.2.0/24 172.16.6.1 0 0 200 i
*> 172.16.0.0/24 0.0.0.0 0 32768 i
*>i172.16.0.0/22 172.16.4.2 100 0 i
*>i172.16.1.0/24 172.16.7.1 0 100 0 i
*>i172.16.2.0/24 172.16.4.2 0 100 0 i
*> 172.16.3.0/24 0.0.0.0 0 32768 i
*>i172.16.4.0/24 172.16.4.2 0 100 0 i
*> 172.16.6.0/24 0.0.0.0 0 32768 i
* 172.16.6.1 0 0 200 i
*> 172.16.7.0/24 0.0.0.0 0 32768 i
*>i172.16.16.0/24 172.16.4.2 0 100 0 i
*>i192.168.2.0 172.16.16.1 0 100 0 300 i
AS100-D#
5)路由器AS300-E TOP
as300-E#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
C 172.16.16.0/24 is directly connected, Ethernet0
B 172.16.4.0/24 [20/0] via 172.16.16.2, 00:20:02
B 172.16.6.0/24 [20/0] via 172.16.16.2, 00:15:08
B 172.16.7.0/24 [20/0] via 172.16.16.2, 00:15:08
B 172.16.0.0/24 [20/0] via 172.16.16.2, 00:15:08
B 172.16.0.0/22 [20/0] via 172.16.16.2, 00:20:02
B 172.16.2.0/24 [20/0] via 172.16.16.2, 00:20:02
B 172.16.3.0/24 [20/0] via 172.16.16.2, 00:15:08
C 192.168.2.0/24 is directly connected, Loopback1
as300-E#show ip bgp
BGP table version is 18, local router ID is 192.168.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0/24 172.16.16.2 0 100 i
*> 172.16.0.0/22 172.16.16.2 0 100 i
*> 172.16.2.0/24 172.16.16.2 0 0 100 i
*> 172.16.3.0/24 172.16.16.2 0 100 i
*> 172.16.4.0/24 172.16.16.2 0 0 100 i
*> 172.16.6.0/24 172.16.16.2 0 100 i
*> 172.16.7.0/24 172.16.16.2 0 100 i
* 172.16.16.0/24 172.16.16.2 0 0 100 i
*> 0.0.0.0 0 32768 i
*> 192.168.2.0 0.0.0.0 0 32768 i
[ 本帖最后由 rswzy 于 2007-6-23 16:22 编辑 ]
附件: 您所在的用户组无法下载或查看附件
搜索更多相关主题的帖子:
BGP 实验
男人要永遠感謝在他20多嵗時候曾經陪在他身邊的女人,因爲20多嵗的男人處在一生中的最低點, 沒錢、沒事業,而20多嵗的女人卻是她一生中最燦爛的時候……