试题九
三层交换机与路由器间RIP动态路由协议的配置
三层交换机:
Switch>en
Switch#conf
Switch(config)#ip routing
Switch(config)#vlan 10
Switch(config-vlan)#exit
Switch(config)#int ra fa 0/10
Switch(config-if-range)#sw acc vlan 10
Switch(config-if-range)#no sh
Switch(config-if-range)#exit
Switch(config)#vlan 20
Switch(config-vlan)#exit
Switch(config)#int ra fa 0/20
Switch(config-if-range)#sw acc vlan 10
Switch(config-if-range)#exit
Switch(config)#int vlan 10
Switch(config-if)#ip add 192.168.10.1 255.255.255.0
Switch(config-if)#no sh
Switch(config-if)#exit
Switch(config)#int vlan 20
Switch(config-if)#ip add 192.168.20.1 255.255.255.0
Switch(config-if)#no sh
Switch(config)#router rip
Switch(config-router)#network 192.168.10.0
Switch(config-router)#network 192.168.20.0
路由器:
Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/1
Router(config-if)#ip add 192.168.20.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#exit
Router(config)#int f0/0
Router(config-if)#ip add 192.168.30.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#router rip
Router(config-router)#network 192.168.30.0
Router(config-router)#network 192.168.20.0
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router#