1.学习动态路由IS-IS,BGP的配置命令,并实验
2.学习策略路由和路由策略的配置命令,并实验
3.复习静态路由的配置
4.复习动态路由 RIP,OSPF,EIGRP的配置
附加:下午两点半做考试题目(边讲边做)
实验模拟器:Cisco Packet Tracer v8.2
交换机Multilayer Switch0:
Switch(config)#int f0/1
Switch(config-if)#no sw
Switch(config-if)#ip add 192.168.10.254 255.255.255.0
Switch(config-if)#int f0/2
Switch(config-if)#no switchport
Switch(config-if)#ip add 192.168.20.254 255.255.255.0
Switch(config-if)#int f0/24
Switch(config-if)#no sw
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
路由器Router1:
Router(config)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.1 255.255.255.0
路由器Router2:
Router(config)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.30.254 255.255.255.0
静态路由命令:
ip route <目标ip> <子网掩码> <回路ip>
交换机Multilayer Switch0:
Switch(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.2
Switch(config)#ip route 192.168.30.0 255.255.255.0 192.168.2.2
路由器Router1
Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.1.1
Router(config)#ip route 192.168.20.0 255.255.255.0 192.168.1.1
Router(config)#ip route 192.168.30.0 255.255.255.0 192.168.2.2
路由器Router2
Router(config)#ip route 192.168.10.0 255.255.255.0 192.168.1.1
Router(config)#ip route 192.168.20.0 255.255.255.0 192.168.1.1
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
ping 192.168.20.1
Pinging 192.168.20.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Ping statistics for 192.168.20.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>ping 192.168.30.1
Pinging 192.168.30.1 with 32 bytes of data:
Request timed out.
Request timed out.
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Ping statistics for 192.168.30.1:
Packets: Sent = 4, Received = 2, Lost = 2 (50% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 2ms, Average = 2ms
实验模拟器:Cisco Packet Tracer v8.2
交换机Multilayer Switch0:
Switch(config)#int f0/1
Switch(config-if)#no switchport
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#int f0/2
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config-if)#int f0/24
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
路由器Router0:
Router(config)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.1 255.255.255.0
路由器Router1:
Router(config)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.30.254 255.255.255.0
Router(config-if)#
交换机Multilayer Switch0:
Switch(config)#ip routing
Switch(config)#router rip
Switch(config-router)#version 2
Switch(config-router)#network 192.168.10.0
Switch(config-router)#network 192.168.20.0
Switch(config-router)#network 192.168.1.0
路由器Router0:
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
路由器Router1:
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.30.0
Cisco Packet Tracer PC Command Line 1.0
C:\>ping 192.168.20.1
Pinging 192.168.20.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Ping statistics for 192.168.20.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>ping 192.168.30.1
Pinging 192.168.30.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Ping statistics for 192.168.30.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 2ms, Average = 2ms
动态路由rip配置完成,全网互通已经实现
实验模拟器:Cisco Packet Tracer v8.2
交换机Multilayer Switch0:
Switch(config)#int f0/1
Switch(config-if)#no switchport
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#int f0/2
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config-if)#int f0/24
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
路由器Router0:
Router(config)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.1 255.255.255.0
路由器Router1:
Router(config)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.30.254 255.255.255.0
Router(config-if)#
交换机Multilayer Switch0:
Switch(config)#route eigrp 1
Switch(config-router)#network 192.168.10.0
Switch(config-router)#network 192.168.20.0
Switch(config-router)#network 192.168.1.0
路由器Router0:
Router(config)#router eigrp 1
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
路由器Router1:
Router(config)#router eigrp 1
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.30.0
C:\>ping 192.168.30.1
Pinging 192.168.30.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Ping statistics for 192.168.30.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 2ms, Average = 2ms
C:\>ping 192.168.20.1
Pinging 192.168.20.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Ping statistics for 192.168.20.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
动态路由EIGRP配置完成,全网互联已经实现
实验模拟器:Cisco Packet Tracer v8.2
交换机Multilayer Switch0:
Switch(config)#int f0/1
Switch(config-if)#no switchport
Switch(config-if)#ip address 192.168.10.254 255.255.255.0
Switch(config-if)#int f0/2
Switch(config-if)#ip address 192.168.20.254 255.255.255.0
Switch(config-if)#int f0/24
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
路由器Router0:
Router(config)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.1 255.255.255.0
路由器Router1:
Router(config)#int s0/0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#int g0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.30.254 255.255.255.0
Router(config-if)#
交换机Multilayer Switch0:
Switch(config)#router ospf 1
Switch(config-router)#network 192.168.10.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.20.0 0.0.0.255 area 0
Switch(config-router)#network 192.168.1.0 0.0.0.255 area 0
路由器Router0:
Router(config)#router ospf 1
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
路由器Router1:
Router(config)#router ospf 1
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#network 192.168.30.0 0.0.0.255 area 0
C:\>ping 192.168.20.1
Pinging 192.168.20.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Reply from 192.168.20.1: bytes=32 time<1ms TTL=127
Ping statistics for 192.168.20.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>ping 192.168.30.1
Pinging 192.168.30.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Reply from 192.168.30.1: bytes=32 time=2ms TTL=125
Ping statistics for 192.168.30.1:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 2ms, Average = 2ms
动态路由OSPF配置完成,全网互通已经实现
实验模拟器:EVE-ng
SW1(config)#int range e0/1-3
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#switchport mode trunk
SW2(config)#int range e0/1-3
SW2(config-if-range)#switchport trunk encapsulation dot1q
SW2(config-if-range)#switchport mode trunk
SW2(config)#int range e0/1-2
SW2(config-if-range)#switchport trunk encapsulation dot1q
SW2(config-if-range)#switchport mode trunk
SW1(config)#int range e0/1-2
SW1(config-if-range)#channel-group 1 mode on
SW1(config-if-range)#
SW2(config)#int range e0/1-2
SW2(config-if-range)#channel-group 1 mode on
SW2(config-if-range)#
SW1(config)#spanning-tree mode rapid-pvst
SW1(config)#spanning-tree vlan 10 priority 4096
SW1(config)#spanning-tree vlan 20 priority 4096
SW1(config)#spanning-tree vlan 30 root primary
SW1(config)#spanning-tree vlan 40 root primary
SW2(config)#spanning-tree mode rapid-pvst
SW2(config)#spanning-tree vlan 10 priority 4096
SW2(config)#spanning-tree vlan 20 priority 4096
SW2(config)#spanning-tree vlan 30 root primary
SW2(config)#spanning-tree vlan 40 root primary
此时通过show run 发现SW1,SW2的生成树vlan优先级相同,因此两边会发生冲突。
此时将SW2的vlan30,40的优先级改为主,10,20的优先级为备即可解决
SW2(config)#no spanning-tree vlan 10 priority 4096
SW2(config)#no spanning-tree vlan 20 priority 4096
SW2(config)#no spanning-tree vlan 30 root primary
SW2(config)#no spanning-tree vlan 40 root primary
SW2(config)#spanning-tree vlan 30 priority 4096
SW2(config)#spanning-tree vlan 40 priority 4096
SW2(config)#spanning-tree vlan 10 root primary
SW2(config)#spanning-tree vlan 20 root primary
SW1(config)#int vlan 10
SW1(config-if)#standby 10 priority 100
SW1(config-if)#standby 10 ip 192.168.10.254
SW1(config)#int vlan 20
SW1(config-if)#standby 20 priority 100
SW1(config-if)#standby 20 ip 192.168.20.254
SW1(config)#int vlan 30
SW1(config-if)#standby 30 priority 110
SW1(config-if)#standby 30 ip 192.168.30.254
SW1(config)#int vlan 40
SW1(config-if)#standby 40 priority 110
SW1(config-if)#standby 40 ip 192.168.40.254
SW2(config)#int vlan 10
SW2(config-if)#standby 10 priority 110
SW2(config-if)#standby 10 ip 192.168.10.254
SW2(config)#int vlan 20
SW2(config-if)#standby 20 priority 110
SW2(config-if)#standby 20 ip 192.168.20.254
SW2(config)#int vlan 30
SW2(config-if)#standby 30 priority 100
SW2(config-if)#standby 30 ip 192.168.30.254
SW2(config)#int vlan 40
SW2(config-if)#standby 40 priority 100
SW2(config-if)#standby 40 ip 192.168.40.254
配置完成
1.学习动态路由IS-IS,BGP的配置命令,并实验
2.学习策略路由和路由策略的配置命令,并实验
7月3日