在Catalyst 2948G-L3交换机上配置IP上行链路重定向( 三 )


Catalyst 2948G-L3:
2948G-L3(config)#router eigrp 10
2948G-L3(config-router)#network 192.168.1.0
2948G-L3(config-router)#passive-interface FastEthernet 1
2948G-L3(config-router)#passive-interface FastEthernet 2
2948G-L3(config-router)#passive-interface FastEthernet 3

!--- Output suppressed.

2948G-L3(config-router)#passive-interface FastEthernet 46
2948G-L3(config-router)#passive-interface FastEthernet 47
2948G-L3(config-router)#passive-interface FastEthernet 48
2948G-L3(config-router)#exit
2948G-L3(config)#interface GigabitEthernet 49
2948G-L3(config-if)#ip summary-address eigrp 10 192.168.1.0 255.255.255.0
2948G-L3(config-if)#
Catalyst 4908G-L3:

4908G-L3(config)#router eigrp 10
4908G-L3(config-router)#network 192.168.1.0
4908G-L3(config-router)#network 192.168.255.0
4908G-L3(config-router)#no auto-summary
4908G-L3(config-router)#
注重:?/B>假如上行路由器具有通过Catalyst 2948G-L3快速以太网接口返回IP网络的更好通道,就采用该通道,该通道可产生路由环路 。
为了在Catalyst 2948G-L3交换机上完成IP上行链路重定向配置,您必须配置指向上行路由器的接口IP地址的静态路由 。
在本例中,Catalyst 4908G-L3上的上行路由器接口是1号千兆以太网接口 。1号千兆以太网接口的IP地址为192.168.1.254 。(请注重:在 ip route 命令中,您不能指定出局接口-您必须指定下一跳IP地址 。)
2948G-L3(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.254
2948G-L3(config)#
本例显示在配置IP上行链路重定向之前和之后从1号客户服务器(在1号快速以太网接口上)的跟踪路由(traceroute)采用的是到48号客户服务器(在1号快速以太网接口上)的通道 。
IP上行链路重定向之前的跟踪路由:
Customer1[192.168.1.2]#traceroute 192.168.1.190

Type escape sequence to abort.
Tracing the route to 192.168.1.190

1 192.168.1.1 4 msec 0 msec 4 msec
2 192.168.1.190 4 msec *; 0 msec
Customer1[192.168.1.2]#
如上所示,Catalyst 2948G-L3上跟踪程序转给1号快速以太网接口(192.168.1.1)送达48号客户的服务器(192.168.1.190) 。
在IP上行链路重定向之后的路由跟踪程序:
Customer1[192.168.1.2]#traceroute 192.168.1.190

Type escape sequence to abort.
Tracing the route to 192.168.1.190

1 192.168.1.1 4 msec 0 msec 0 msec
2 192.168.1.254 0 msec 0 msec 4 msec
3 192.168.1.253 0 msec 4 msec 0 msec
4 192.168.1.190 4 msec *; 0 msec
Customer1[192.168.1.2]#
如上所示,跟踪程序通过Catalyst 2948G-L3上的1号快速以太网接口(192.168.1.1) 重定向到上行Catalyst 4908G-L3上的1号千兆以太网接口(192.168.1.254),然后路由回Catalyst 2948G-L3上的49号千兆以太网接口(192.168.1.253),最终到达48号客户的服务器(192.168.1.190) 。
应用访问控制列表
需要时,您可以在接口gig 49上应用ALC来控制客户服务器之间的访问 。在本例中,在49号千兆以太网接口上采用输出访问列表,以便答应ICMP PING(回波与回波应答),但是拒绝客户服务器之间的所有其它IP通信 。
2948G-L3(config)#Access-list 101 permit icmp 192.168.1.0 0.0.0.255 192.168.1.0 0.0.0.255 echo
2948G-L3(config)#access-list 101 permit icmp 192.168.1.0 0.0.0.255 192.168.1.0 0.0.0.255 echo-reply
2948G-L3(config)#access-list 101 deny ip 192.168.1.0 0.0.0.255 192.168.1.0 0.0.0.255
2948G-L3(config)#access-list 101 permit ip any any
2948G-L3(config)#interface GigabitEthernet 49
2948G-L3(config-if)#ip access-group 101 out
2948G-L3(config-if)#
注重:?/B>某些类型的IP数据包,例如带有IP选项的数据包是程序交换的 。CPU根据Cisco路由表交换数据包 。程序交换数据包将不采用IP上行链路重定向通道,而且不应用在千兆以太网接口上配置的任何ACL 。

推荐阅读