创建GRE隧道
R1:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int tunnel 1
Router(config-if)#
%LINK-5-CHANGED: Interface Tunnel1, changed state to up
Router(config-if)#ip address 1.1.1.1 255.255.255.252
Router(config-if)#no shut
Router(config-if)#tunnel ?
destination destination of tunnel
mode tunnel encapsulation method
source source of tunnel packets
Router(config-if)#tunnel source se0/3/0
Router(config-if)#tunnel destination 200.100.1.2
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up
Router(config-if)#end
R2:
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int tunnel 1
Router(config-if)#
%LINK-5-CHANGED: Interface Tunnel1, changed state to up
Router(config-if)#ip address 1.1.1.2 255.255.255.252
Router(config-if)#tunnel source se0/2/0
Router(config-if)#tunnel destination 200.100.1.1
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up
R2:
Router#ping 1.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/7/15 ms
BGP配置:
A和B为IBGP,即拥有相同的AS号,BC是EBGP,AS号不同,大概配置如下:A:router bgp 64512neighbor 20.1.1.1 remote-as 64512 //与B建立邻居network 10.1.1.0 mask 255.255.255.0 //发布内网网段B:router bgp 64512neighbor 20.1.1.2 remote-as 64512 //与A建立邻居neighbor 20.1.1.2 next-hop-self //改变传递的路由的下一跳为自己neighbor 30.1.1.2 remote-as 64513 //与C建立邻居C:router bgp 64513neighbor 30.1.1.1 remote-as 64512 //与B建立邻居network 40.1.1.0 mask 255.255.255.0 //发布内网网段这样PC1就能ping通PC2了
标签:隧道,1.1,1.2,tunnel,创建,255.255,GRE,Router,config From: https://blog.51cto.com/u_16476617/9057678