
神州数码11动态路由.pdf
4页1RIP实验PC#1::192.168.1.100Switch 20/0/1Switch 1PC#2::192.168.2.100VLAN 10::192.168.1.1VLAN 10::192.168.2.10/0/1RIP::VLAN 20 192.168.10.1-2Switch 1• Switch(Config)#vlan 20 – Switch(Config-Vlan20)#switchport interface ethernet 0/0/1 • Switch(Config)#vlan 10 – Switch(Config-Vlan10)#switchport interface ethernet 0/0/10-20 • Switch(Config)#interface vlan 10 – Switch(Config-If-Vlan10)#ip address 192.168.1.1 255.255.255.0 • Switch(Config)#interface vlan 20 – Switch(Config-If-Vlan20)#ip address 192.168.10.1 255.255.255.0 • Switch(Config)#router rip – Switch(Config-router-rip)#exit • Switch(Config)#interface vlan 10 – Switch(Config-If-Vlan10)#ip rip work • Switch(Config)#interface vlan 20 – Switch(Config-If-Vlan20)#ip rip work2Switch 2• Switch(Config)#vlan 20 – Switch(Config-Vlan20)#switchport interface ethernet 0/0/1 • Switch(Config)#vlan 10 – Switch(Config-Vlan10)#switchport interface ethernet 0/0/10-20 • Switch(Config)#interface vlan 10 – Switch(Config-If-Vlan10)#ip address 192.168.2.1 255.255.255.0 • Switch(Config)#interface vlan 20 – Switch(Config-If-Vlan20)#ip address 192.168.10.2 255.255.255.0 • Switch(Config)#router rip – Switch(Config-router-rip)#exit • Switch(Config)#interface vlan 10 – Switch(Config-If-Vlan10)#ip rip work • Switch(Config)#interface vlan 20 – Switch(Config-If-Vlan20)#ip rip work使用show命令查看• show ip route • show ip rip • show ip protocols3Backbone Area 0.0.0.0 VLAN 20::192.168.4.1-2OSPF实验PC#1::192.168.1.100Switch 20/1/10/1/1Switch 1PC#2::192.168.2.100VLAN 10::192.168.1.1VLAN 10::192.168.2.1Switch 1• vlan 10 – switchport interface ethernet 0/0/15-20 • vlan 20 – switchport interface ethernet 0/0/1 • interface vlan 10 – ip address 192.168.1.1 255.255.255.0 • interface vlan 20 – ip address 192.168.10.1 255.255.255.0 • router ospf – network 192.168.10.0 255.255.255.0 area 0 – redistribute ospfase connectted • interface vlan 20 – ip ospf enable area 04Switch 2• vlan 10 – switchport interface ethernet 0/0/15-20 • vlan 20 – switchport interface ethernet 0/0/1 • interface vlan 10 – ip address 192.168.2.1 255.255.255.0 • interface vlan 20 – ip address 192.168.10.2 255.255.255.0 • router ospf – network 192.168.10.0 255.255.255.0 area 0 – redistribute ospfase connectted • interface vlan 20 – ip ospf enable area 0OSPF(Backbone)• 使用show命令查看: – show ip route – show ip ospf – show ip ospf database – show ip ospf interface – show ip ospf neighbor – show ip ospf routing – show ip protocols。
