CCNP精粹系列之三十一--BGP源地址问题二,推荐

                                     
                          源地址
------- 不同自治系统间
试验环境:
试验环境:
R1:lo0    192.168.10.1 255.255.255.0
lo1    172.16.10.1 255.255.0.0
 
   S1/0   202.110.100.1 255.255.255.0
S1/1   202.110.101.1 255.255.255.0
 
R2:
lo0     172.16.20.1 255.255.0.0
 S1/0   202.110.100.2 255.255.255.0
S1/1   202.110.101.2 255.255.255.0
 
R1 上:
 
Router(config)#host R1
R1(config)#int lo0
R1(config-if)#ip addr 192.168.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int lo1
R1(config-if)#ip addr 172.16.10.1 255.255.0.0
R1(config-if)#int s1/0
R1(config-if)#ip addr 202.110.100.1 255.255.255.0
R1(config-if)#encap hdlc
R1(config-if)#clock rate 56000
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int s1/1
R1(config-if)#ip addr 202.110.101.1 255.255.255.0
R1(config-if)#encap hdlc
R1(config-if)#clock rate 56000
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#router bgp 64500
R1(config-router)#neighbor 202.110.100.2 remote-as 64501
R1(config-router)#neighbor 172.16.20.1 remote-as 64501
R1(config-router)#net 192.168.10.0
R1(config-router)#net 172.16.0.0
R1(config-router)#net 202.110.100.0
R1(config-router)#net 202.110.101.0
R1(config-router)#exit
R1(config)#router rip
R1(config-router)#ver 2
R1(config-router)#net 192.168.10.0
R1(config-router)#net 172.16.0.0
R1(config-router)#net 202.110.100.0
R1(config-router)#net 202.110.101.
 
R2 上:
R2(config)#int lo0
R2(config-if)#ip addr 172.16.20.1 255.255.0.0
R2(config-if)#no shut
R2(config-if)#int s1/0
R2(config-if)#ip addr 202.110.100.2 255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#no shut
R2(config-if)#int s1/1
R2(config-if)#ip addr 202.110.101.2 255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#no shut
R2(config-if)#exit
 
 
R2(config)#router bgp 64501
R2(config-router)#neighbor 202.110.100.1 remote-as 64500
R2(config-router)#neighbor 172.16.10.1 remote-as 64500
R2(config-router)#net 172.16.20.0
R2(config-router)#net 202.110.100.0
R2(config-router)#net 202.110.101.0
R2(config-router)#exit
R2(config)#router rip
 
R2(config)#router rip
R2(config-router)#ver 2
R2(config-router)#net 172.16.20.0
R2(config-router)#net 202.110.100.0
R2(config-router)#net 202.110.101.0
R2 上测试:
 
R2#show ip ro
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
 
C    202.110.100.0/24 is directly connected, Serial1/0
R    192.168.10.0/24 [120/1] via 202.110.100.1, 00:00:02, Serial1/0
     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       172.16.20.0/24 is directly connected, Loopback0
R       172.16.0.0/16 [120/1] via 202.110.100.1, 00:00:02, Serial1/0
 
 
再次举例说明:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

你可能感兴趣的:(路由,休闲,BGP,交换,ccnp)