学员提问:
给交换机做路由有二个方法,一个是把交换机的端口启用三层(no switchport)原后再配置路由协议,一个是给交换机的Vlan配置IP再用这个IP来配置路由,这二种哪个好点?
如果要在这些交换机上做Port trunking,上面的路由配置会对链路绑定有影响吗?port trunking是在二层的吧,如果开启了路由,会不会都走某一个指定的IP(端口)了?
捷盈讲师及学员解答:
如果又要实现port trunking(load-balance),又能实现路由(OSPF),应该怎样做呢?找了一下,绑定的端口也可以通过给channel-group设置IP,但是这个IP能用于路由吗?
L3 EtherChannel要首先create port-channel,然后no sw把port-channel变成L3 interface,加上IP地址。再进入physical interface,必须no ip add去掉physical interface的IP信息,然后直接channel-group加入EtherChannel就行了。
For L3 EtherChannel:
Switch# configure terminal
Switch(config)# interface port-channel 5
Switch(config-if)# no switchport
Switch(config-if)# ip address 172.10.20.10 255.255.255.0
Switch(config-if)# interface range gigabitethernet0/1 -2
Switch(config-if-range)# no ip address
Switch(config-if-range)# channel-group 5 mode desirable
Switch(config-if-range)# end
L3 EtherChannel要首先create port-channel,然后no sw把port-channel变成L3 interface,加上IP地址。再进入physical interface,必须no ip add去掉physical interface的IP信息,然后直接channel-group加入EtherChannel就行了。
For L3 EtherChannel:
Switch# configure terminal
Switch(config)# interface port-channel 5
Switch(config-if)# no switchport
Switch(config-if)# ip address 172.10.20.10 255.255.255.0
Switch(config-if)# interface range gigabitethernet0/1 -2
Switch(config-if-range)# no ip address
Switch(config-if-range)# channel-group 5 mode desirable
Switch(config-if-range)# end

