发新话题
打印

分布列表1

本主题由 网络小菜鸟 于 2008-12-21 00:52 移动

分布列表1

R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  172.16.12.1     YES manual up                    up      
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  1.1.1.1         YES manual up                    up   

R2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
Serial1/0                  172.16.12.2     YES manual up                    up      
Serial1/1                  172.16.23.2     YES manual up                    up      
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  2.2.2.2         YES manual up                    up   

R3#show ip interface bri
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
Serial1/0                  172.16.23.3     YES manual up                    up      
Serial1/1                  unassigned      YES unset  administratively down down   
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  3.3.3.3         YES manual up                    up      


R1 :
config t
router eigrp 100
no auto-summary
net 172.16.12.0 0.0.0.255
net 1.1.1.1 0.0.0.0

R2:
config t
router eigrp 100
no auto-summary
net 172.16.12.0 0.0.0.255
net 172.16.23.0 0.0.0.255
net 2.2.2.2 0.0.0.0

R3
config t
no aut-summary
net 172.16.23.0 0.0.0.255
net 3.3.3.3 0.0.0.0

(1):在R2上实行distribute-list,配置如下:
config t
access-list 1 permit 1.1.1.1 0.0.0.0
router eigrp 100
distribute-list 1 permit out s1/1
如下是R2 R3的路由表:

R2#show ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/2297856] via 172.16.12.1, 00:07:23, Serial1/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
D       3.3.3.3 [90/2297856] via 172.16.23.3, 00:10:13, Serial1/1
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.23.0 is directly connected, Serial1/1
C       172.16.12.0 is directly connected, Serial1/0

R3#show ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/2809856] via 172.16.23.2, 00:08:25, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.23.0 is directly connected, Serial1/0
//看到没有,2.2.2.2这条路由不存在了呀,被distribute-list 给隐含DENY掉了

(2),在R1上实行distribut-list ,允许3.3.3.3的路由通过.
R1:
config t
access-list 1 permit 3.3.3.3 0.0.0.0
router eigrp 100
distribute-list 1 in s1/1

如下是其路由表:
R1#show ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
D       3.3.3.3 [90/2809856] via 172.16.12.2, 00:12:47, Serial1/1
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.12.0 is directly connected, Serial1/1
只有3.3.3.3通过了,2.2.2.2被干掉了.

TOP

有问题请大家指正!!!
R1-------------------------R2————————R3
    172.16.12.0                       172.16.23.0
LOOP0:1.1.1.1/32      LOOP0:2.2.2.2/32    LOOP0:3.3.3.3

TOP

BGP邻居的形成

R1------(-R2--------R3--------R4-)==============R5(一条串口,一条以太口)
AS10         OSPF AS20                                          AS 30



R1#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  10.10.12.1      YES manual up                    up      
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  1.1.1.1         YES manual up                    up      
Loopback10                 172.16.10.1     YES manual up                    up      

R2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
Serial1/0                  10.10.12.2      YES manual up                    up      
Serial1/1                  10.10.23.2      YES manual up                    up      
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  2.2.2.2         YES manual up                    up      

R2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
Serial1/0                  10.10.12.2      YES manual up                    up      
Serial1/1                  10.10.23.2      YES manual up                    up      
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback0                  2.2.2.2         YES manual up                    up      


R1:
router bgp 10
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
network 172.16.10.1 mask 255.255.255.255
neighbor 10.10.12.2 remote-as 20
neighbor 10.10.12.2 ebgp-multihop 255
no auto-summary

R2:

router ospf 1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 10.10.23.0 0.0.0.255 area 0
!
router bgp 20
no synchronization
bgp log-neighbor-changes
network 2.2.2.2 mask 255.255.255.255
neighbor 3.3.3.3 remote-as 20
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 4.4.4.4 remote-as 20
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 10.10.12.1 remote-as 10
neighbor 10.10.12.1 ebgp-multihop 255
no auto-summary

R3:

R3#show run | begin router
router ospf 1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 10.10.23.0 0.0.0.255 area 0
network 10.10.34.0 0.0.0.255 area 0
!
router bgp 20
no synchronization
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
neighbor 2.2.2.2 remote-as 20
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 20
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
!

R4:
router ospf 1
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 10.10.34.0 0.0.0.255 area 0
!
router bgp 20
no synchronization
bgp log-neighbor-changes
network 192.168.45.0
neighbor 2.2.2.2 remote-as 20
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 3.3.3.3 remote-as 20
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 5.5.5.5 remote-as 30
neighbor 5.5.5.5 ebgp-multihop 255
neighbor 5.5.5.5 update-source Loopback0
no auto-summary
!
ip classless
ip route 5.5.5.5 255.255.255.255 10.10.45.5
ip route 5.5.5.5 255.255.255.255 192.168.45.5
ip http server
!         
!   

R5:

R5#show run | begin router   
router bgp 30
no synchronization
bgp log-neighbor-changes
network 5.5.5.5 mask 255.255.255.255
neighbor 4.4.4.4 remote-as 20
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
!
ip classless
ip route 4.4.4.4 255.255.255.255 192.168.45.4
ip route 4.4.4.4 255.255.255.255 10.10.45.4      


R1#show ip bgp summary
BGP router identifier 1.1.1.1, local AS number 10
BGP table version is 7, main routing table version 7
6 network entries using 582 bytes of memory
6 path entries using 216 bytes of memory
4 BGP path attribute entries using 240 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1086 total bytes of memory
BGP activity 15/9 prefixes, 17/11 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.10.12.2      4    20     102      92        7    0    0 00:13:32        4


R2#show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 20
BGP table version is 13, main routing table version 13
6 network entries using 582 bytes of memory
6 path entries using 216 bytes of memory
4 BGP path attribute entries using 240 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1086 total bytes of memory
BGP activity 15/9 prefixes, 16/10 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.3         4    20     109     125       13    0    0 00:20:15        1
4.4.4.4         4    20     128     136       13    0    0 00:17:27        2
10.10.12.1      4    10      93     103       13    0    0 00:14:01        2

R3#show ip bgp summary
BGP router identifier 3.3.3.3, local AS number 20
BGP table version is 13, main routing table version 13
6 network entries using 582 bytes of memory
6 path entries using 216 bytes of memory
4 BGP path attribute entries using 240 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1086 total bytes of memory
BGP activity 12/6 prefixes, 17/11 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4    20     125     109       13    0    0 00:20:42        3
4.4.4.4         4    20     117     102       13    0    0 00:17:54        2

R4#show ip bgp summary
BGP router identifier 4.4.4.4, local AS number 20
BGP table version is 9, main routing table version 9
6 network entries using 582 bytes of memory
6 path entries using 216 bytes of memory
4 BGP path attribute entries using 240 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1086 total bytes of memory
BGP activity 16/10 prefixes, 17/11 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.2.2.2         4    20     137     129        9    0    0 00:18:18        3
3.3.3.3         4    20     103     118        9    0    0 00:18:18        1
5.5.5.5         4    30      77      89        9    0    0 00:18:08        1

R5#show ip bgp summary
BGP router identifier 5.5.5.5, local AS number 30
BGP table version is 21, main routing table version 21
6 network entries using 582 bytes of memory
6 path entries using 216 bytes of memory
4 BGP path attribute entries using 240 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1086 total bytes of memory
BGP activity 12/6 prefixes, 13/7 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
4.4.4.4         4    20      89      77       21    0    0 00:18:29        5





R1#show ip bgp
BGP table version is 7, local router ID is 1.1.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
*> 1.1.1.1/32       0.0.0.0                  0         32768 i
*> 2.2.2.2/32       10.10.12.2               0             0 20 i
*> 3.3.3.3/32       10.10.12.2                             0 20 i
*> 5.5.5.5/32       10.10.12.2                             0 20 30 i
*> 172.16.10.1/32   0.0.0.0                  0         32768 i

R2#show ip bgp   
  Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       10.10.12.1               0             0 10 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*>i3.3.3.3/32       3.3.3.3                  0    100      0 i
*>i5.5.5.5/32       4.4.4.4                  0    100      0 30 i
*> 172.16.10.1/32   10.10.12.1               0             0 10 i
*>i192.168.45.0     4.4.4.4                  0    100      0 i

R3#show ip bgp
  Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       2.2.2.2                  0    100      0 10 i
*>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
*>i5.5.5.5/32       4.4.4.4                  0    100      0 30 i
*>i172.16.10.1/32   2.2.2.2                  0    100      0 10 i
*>i192.168.45.0     4.4.4.4                  0    100      0 i

R4#show ip bgp
  Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.1/32       2.2.2.2                  0    100      0 10 i
*>i2.2.2.2/32       2.2.2.2                  0    100      0 i
*>i3.3.3.3/32       3.3.3.3                  0    100      0 i
*> 5.5.5.5/32       5.5.5.5                  0             0 30 i
*>i172.16.10.1/32   2.2.2.2                  0    100      0 10 i
*> 192.168.45.0     0.0.0.0                  0         32768 i

R5#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       4.4.4.4                                0 20 10 i
*> 2.2.2.2/32       4.4.4.4                                0 20 i
*> 3.3.3.3/32       4.4.4.4                                0 20 i
*> 5.5.5.5/32       0.0.0.0                  0         32768 i
*> 172.16.10.1/32   4.4.4.4                                0 20 10 i
*> 192.168.45.0     4.4.4.4                  0             0 20 i
发新话题
版块跳转