預配置,圖上的rip改成eigrp,固然rip也行
R1上的配置
en
conf t
no ip do lo
line c 0
no exec-t
logg syn
host R1
int lo0
ip add 1.1.1.1 255.255.255.0
int s2/1
ip add 12.0.0.1 255.255.255.0
no shide
R2上的配置
en
conf t
no ip do lo
line c 0
no exec-t
logg syn
host R2
int lo0
ip add 2.2.2.2 255.255.255.0
int s2/1
ip add 12.0.0.2 255.255.255.0
no sh
int s2/2
ip add 23.0.0.2 255.255.255.0
no sh測試
R3上的配置
en
conf t
no ip do lo
line c 0
no exec-t
logg syn
host R3
int lo0
ip add 3.3.3.3 255.255.255.0
int s2/1
ip add 23.0.0.3 255.255.255.0
no sh
int s2/2
ip add 34.0.0.3 255.255.255.0
no sh字體
R4上的配置
en
conf t
no ip do lo
line c 0
no exec-t
logg syn
host R4
int lo0
ip add 4.4.4.4 255.255.255.0
int s2/1
ip add 34.0.0.4 255.255.255.0
no sh
int s2/2
ip add 45.0.0.4 255.255.255.0
no sh3d
R5上的配置
en
conf t
no ip do lo
line c 0
no exec-t
logg syn
host R5
int lo0
ip add 5.5.5.5 255.255.255.0
int s2/2
ip add 45.0.0.5 255.255.255.0
no sh
實驗過程:
第一步:先讓R二、R三、R4上的EIGRP跑起來調試
R2(config)#router ei 11
R2(config-router)#net 2.2.2.2
R2(config-router)#net 23.0.0.2
R2(config-router)#no aucode
R3(config)#router ei 11
R3(config-router)#net 2.2.2.2
R3(config-router)#net 23.0.0.3
R3(config-router)#net 34.0.0.3
R3(config-router)#no aurouter
R4(config)#router ei 11
R4(config-router)#net 4.4.4.4
R4(config-router)#net 34.0.0.4
R4(config-router)#no au
第二步:再讓各路由器上的BPG跑起來blog
R1(config)#router b 100
R1(config-router)#nei 12.0.0.2 remot 200接口
R2(config)#router b 200
R2(config-router)#nei 12.0.0.1 remot 100
R2(config-router)#nei 3.3.3.3 remot 200
R2(config-router)#nei 3.3.3.3 up lo0
R2(config-router)#net 2.2.2.ip
R4(config)#router b 200
R4(config-router)#nei 3.3.3.3 remot 200
R4(config-router)#nei 3.3.3.3 up lo0
R4(config-router)#nei 45.0.0.5 remot 500
R5(config)#router b 500
R5(config-router)#nei 45.0.0.4 remot 200
咱們在R3上用一種簡單的方式
R3(config-router)#router b 200
R3(config-router)#nei libo peer-group
R3(config-router)#nei libo remot 200
R3(config-router)#nei libo up lo0
R3(config-router)#nei 2.2.2.2 peer libo
R3(config-router)#nei 4.4.4.4 peer libo
R3(config-router)#end
第三步:查看鄰居創建狀況
R1#sh ip b s
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.0.0.2 4 200 10 10 1 0 0 00:06:31 0
R2#sh ip b s
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3.3.3.3 4 200 5 5 1 0 0 00:01:45 0
12.0.0.1 4 100 11 11 1 0 0 00:07:39 0
R2#
R2#
R3#sh ip b s
BGP router identifier 3.3.3.3, local AS number 200
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 200 4 4 1 0 0 00:00:40 0
4.4.4.4 4 200 4 4 1 0 0 00:00:28 0
R4#sh ip b s
BGP router identifier 4.4.4.4, local AS number 200
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3.3.3.3 4 200 4 4 1 0 0 00:00:34 0
45.0.0.5 4 500 7 7 1 0 0 00:03:54 0
R5#sh ip b s
BGP router identifier 5.5.5.5, local AS number 500
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
45.0.0.4 4 200 7 7 1 0 0 00:03:57 0
//從上面能夠看出鄰居關係是沒有問題的
第四步:宣告出路由表中沒有的路由
第四步分如下幾步
第一步:先在R1上宣告本身的迴環接口1.1.1.1並在R2上查看
R1(config-router)#net 1.1.1.0 mask 255.255.255.0
R2#sh ip b
BGP table version is 2, local router ID is 2.2.2.2
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
> 1.1.1.0/24 12.0.0.1 0 0 100 i
第二步:再R5上作相同的配置
R5(config-router)#net 5.5.5.0 mask 255.255.255.0
第三步:查看R3上的bgp表
R3#sh ip b
BGP table version is 1, local router ID is 3.3.3.3
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
+>(tcl)#1.1.1.1
+>(tcl)#2.2.2.2
+>(tcl)#3.3.3.3
+>(tcl)#4.4.4.4
+>(tcl)#5.5.5.5
+>(tcl)#12.0.0.1
+>(tcl)#12.0.0.2
+>(tcl)#23.0.0.2
+>(tcl)#23.0.0.3
+>(tcl)#34.0.0.3
+>(tcl)#45.0.0.4
+>(tcl)#45.0.0.5
+>(tcl)#34.0.0.4
+>(tcl)#} {ping $ip}
Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 52/132/288 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 36/88/136 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/61/100 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 12/41/88 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 12.0.0.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 44/76/116 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 48/94/136 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 23.0.0.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 64/96/192 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 23.0.0.3, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 56/84/104 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 34.0.0.3, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 12/66/92 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 45.0.0.4, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/48/108 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 45.0.0.5, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/72/116 msType escape sequence to abort.Sending 5, 100-byte ICMP Echos to 34.0.0.4, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/43/56 ms